View Single Post
Old 05-31-2008, 12:24 PM   #43 (permalink)
Geert
The Contributor
RegEx Guru 
 
Geert's Avatar
 
Join Date: Dec 2007
Location: Belgium
Posts: 58
Thanks: 5
Geert is on a distinguished road
Default

Your second regex is a nice experiment, however, my guess is that it is horribly inefficient because of the combination of (lazy) quantifiers.

Note that there is nothing wrong at all with using the s modifier.

In Friedl's book you'll read about a more efficient way. I believe it also takes into account situations like /* echo '*/'; */.
Geert is offline  
Reply With Quote