News for hackers. Stuff that matters.
Re:Efficiency of regular expressions by Shorel on Friday January 21, 2011 @10:01AM (#2127499)
What about .*? instead ?

This makes the match non greedy.

Re:Efficiency of regular expressions by roel_v on Friday January 21, 2011 @11:00AM (#2127693)
But only supported in some regex implementations (I think it started only in Perl?). Maybe support in modern implementations is wider spread. I think that the sed that was commonly distributed with Linux distros around 2000 didn't support it, I have a vague recollection of spending a frustrating afternoon getting sed to imitate what my Perl regexes did.