04-07-2008, 12:10 AM
|
#9 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
"I'll teach you a new regex trick. Lazy (opposite of greedy) matching. Matches as less as possible."
I've seen this before, but I keep forgetting about it. It actually solves a problem I asked about here awhile ago, if I were still using a regex for it - since then I've discovered I could use strpos() and substr() to accomplish it quicker.
Next thing I need to learn with regular expressions is assertions and I'll almost be ready to call myself a beginner with them.
-m
|
|
|
|