I am trying to turn HTML into BBCode where there is a matching end tag. The following regex is not doing anything:
$text =~ s~<font color=("|')?((\w|\s)+)("|')?>(.*?)<\/font>~\[color=$2\]$5\[/color\]~ig;Sample input:
<font color="blue"><i><b> <br>Some text</font>, <br>an aP.S. I know the HTML is deprecated, it's legacy code and I haven't the time to work out how to re-parse all the content (of which there is a lot!).
Thanks for any help.
In reply to Regex not working by Beaker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |