Regex Returning Too Much
Posted: Sat May 27, 2006 10:15 am
OK... so let's say I have the following string:
I want to use eregi in order to retrieve each of the [n]...[/n] data.
I am trying to use the following:
However, the content of $links is the entire string.
Is there any easy way to say "use the shortest match available"?
Thanks,
Joe
Code: Select all
blablabla[n option1="bla"]this is my string[/n]blablabla[n option2="bla2"]this is another string[/n]blablablaI am trying to use the following:
Code: Select all
eregi("\\[n .+\\].+\\[/n\\]", $fmt, $links);Is there any easy way to say "use the shortest match available"?
Thanks,
Joe