Forum Moderators: coopster

Message Too Old, No Replies

Get text between two tags or words

Get Text Between Tags

         

sandeeppatil

10:01 am on Jul 7, 2008 (gmt 0)

10+ Year Member



grab the text that exists between two different keywords?
For example, let's say I have the phrase:

pitch [@auto -init 0 -ramp 127 3000 -loop 0] velocity 127 pitch [@auto -init 45 -ramp 50 100 -loop 1] velocity 64

I want to grab everything that is between "pitch" and "velocity", i.e. [@auto -init 0 -ramp 127 3000 -loop 0] and [@auto -init 45 -ramp 50 100 -loop 1]

sandeeppatil

10:06 am on Jul 7, 2008 (gmt 0)

10+ Year Member



This can be achived using preg_match_all function in PHP

[php.net...]

[edited by: coopster at 1:14 pm (utc) on July 7, 2008]
[edit reason] changed link to authoritative domain [/edit]