My current PHP regex is
Code: Select all
'/\[quote=(.*)\](.*?)\[\/quote\]/is'Code: Select all
"Quote ($1):<br /><br /><div style='margin:2px 20px;border-style:hidden solid;border-width:2px;padding:2px 15px;'>$2</div>"Code: Select all
[quote=bob]Hello everyone![/quote]Code: Select all
Quote (bob) :
Hello everyone!My problem is that when I have two of these such tags embedded in each other, it produces some... er... odd, but expected results. For example:
Code: Select all
This is the main post
[QUOTE=PersonA]
[QUOTE=PersonB]
This is the embedded quote
[/QUOTE]
This is the first-level quote
[/QUOTE]
This is the main postCode: Select all
This is the main post
Quote (PersonA][QUOTE=PersonB]This is the embedded quote[/QUOTE]) :
This is the first level quote
This is the main postSo I guess my question is, how do I get the php regex to search from the outside in, so it will properly process the same tag types embedded?
Thanks
--Vector
<edit> You can view the undesired effect Here