Hello everyone!

Here's my grep challenge. Turn:

<!--begin variable: variable_blah-->
blah blah
blah blah
blah blah
blah blah

<!--begin variable: variable_blah2-->
blah 2 blah 2
blah 2 blah 2
blah 2 blah 2
blah 2 blah 2

into:
(variable_blah) (blah blah blah blah blah blah blah blah)
(variable_blah2) (blah 2 blah 2 blah 2 blah 2 blah 2 blah 2 blah 2 )

Where the "blahs" (that are not part of the variable name) contain 
practically anything but the next comment "<!--begin variable:". 
Also the "blahs" maintain their \n and such (I just flattened those 
values out for demo purposes here).

I've tried:"/<!--begin variable:?([\w\s]*)-->([\w\s]*)/m", but that 
misses out on any punctuation and "/<!--begin 
variable:?([\w\s]*)-->(.*)/m" gives me some other weirdness-- it 
doesn't find anything at all for the second substring.

Any suggestions!

Thanks cowboys!
Sondra

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to