Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- preg_replace problem
March 7, 2005, 7:09 pm
rate this thread
Re: preg_replace problem
The Kleene star ('*') is, by default, greedy. In other
words, it matches zero or more of whatever came before while
the rest of the pattern still matches. Your first
subpattern matches the entire subject string, and so the
others match nothing.