BBCode using Preg_Replace
View Single Post
04-07-2008, 12:10 AM
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
"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.
View Public Profile
Send a private message to delayedinsanity
Visit delayedinsanity's homepage!
Find More Posts by delayedinsanity