http://php.net/preg_replace_all
And be sure to use Ungreedy flag to your pattern:
/pattern/U
On Sat, April 14, 2007 11:22 pm, Travis Moore wrote:
> Okay, so what I have is a BB code type of thing for a CMS, which I for
> obvious reasons can't allow HTML.
>
> Here's the snippet of my function:
>
>
In your regex, you have a greedy matcher, i.e. ".*" will match as much
as it can to satisfy its condition. I believe you can do ".*?" and it
will work, as ".*?" will match as little as it can to be satisfied.
-Logan
-Original Message-
From: Travis Moore [mailto:[EMAIL PROTECTED]
Sent: S
2 matches
Mail list logo