I've got a number of bbcode tags that have phpbb attributes (5 digit value - assuming text color or something). They look like this in the text:
This is [b:31747]bold[/b:31747] text and so is [b:17171]this[/b:17171].
I cannot get a regex working that finds bracket+b+colon+any_combo_of_5_digits+end_bracket
and lets me replace it with corresponding html. Using php's preg_replace() function, if it makes a difference.
This should work with both opening and closing tags for any type of tag:
The regular expression you need is:
This would replace bold, underline and italic tags.
http://ideone.com/fDCZM