View Single Post
Old 05-29-2008, 01:55 AM   #42 (permalink)
delayedinsanity
The Gregarious
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Cana'derr
Posts: 653
Thanks: 24
delayedinsanity is on a distinguished road
Default

Multiline regular expressions... is it best just to use the s modifier? For example, if I wanted to remove all PHP style comments from a file (no, I'm not trying to make a compression function like Kalle's, just playing around with different methods of templating), I'm currently using;

~/\*.*?\*/~s

What about without the s? I got this to work:

~/\*(.*?\r?\n?)+?\*/~

Can you think of a more efficient way?
-m

Last edited by delayedinsanity : 05-31-2008 at 03:32 PM.
delayedinsanity is offline  
Reply With Quote