After 3 hours of trying to figure this out on my own...without success...I figure it's time to throw in towel and ask for some help!
Is there a way, using regexp, to grab the text that exists between two different key words? 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]
I can do this using the following regexp:
regexp @re pitch[^(v)]*
This is fine if I have no other values that contain the letter "v". Ideally what I'd like to do is have it parse based on the entire word, something like:
regexp @re pitch[^(velocity)]*
but I can't figure out how to make regexp look for the entire word (in the above it treats each letter of "velocity" as an or, e.g. stop at "v" or "e" or "l" or ...
I've tried all sorts of combinations of , (), ""...and just can't get it to work. Any suggestions?