Regex conversion on bbcode -
we moving phpbb simpler system , of bbcode needs converting, particularly "quote" code. current phpbb based quote code looks this:
[quote="username":nw4lek0o]the quoted text[/quote:nw4lek0o]
and needs simplified this:
[quote=username]the quoted text[/quote]
so, 2 things: strip double quotes around username, , strip id string opening , closing tag.
i'm not @ regex. help?
use regex:
\[quote="(.+?)":.+?\](.+?)\[/quote:.+?]
and replace with:
[quote=$1]$2[/quote]
Comments
Post a Comment