Jump to content

Archived

This topic is now archived and is closed to further replies.

duall

help: get data from string

Recommended Posts

hi,

i have some long strings like
[quote]{{{[adena];3504;7154;100}};70};{{{[soul_separator];1;1;0.2693};{[soul_separator_head];1;1;99.7307}};0.3539};{{{[crafted_leather];1;1;4.7683};{[mold_glue];1;1;4.5299};{[mold_hardener];1;1;1.1817};{[thons];1;1;4.5299};{[scrl_of_ench_am_s];1;1;0.0544};{[mithril_arrow];20;60;84.9358}};31.5556}[/quote]

i want to select one line from the string like:
[quote]{{{[soul_separator];1;1;0.2693};{[soul_separator_head];1;1;99.7307}};0.3539}[/quote]

Which starts with {{{[   
And ends with  }};anyNumber}

PS: the line should be selected by a keyword like: [soul_seperator] or [soul_separator_head] or [anyword]

Share this post


Link to post
Share on other sites
You'd be wise to use a regular expression here.

Have a look at the [url=http://www.php.net/manual/en/ref.pcre.php]RegEx[/url] section in the manual.

Regards
Huggie

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.