I want to remove everything inside <font size=1>Text</font> tags.
I want to remove everything that has a font size of one.
So it's possible that a tag could be <font size=1 color=blue>Text</font>
What is the regular expression to do this?
My attempt:
$text = "Hi my name is Rayn and I <font size=1 color=blue>Where are we? Why are we here? What is going on?</font> this and that and them and her"; $text = preg_replace("/<font size=1.*?>.*<\/font>/","",$text); echo $text;
I guess it's possible to have <font color=blue size=1> too...how can your code figure out conditions where there are tags before and after size?
<font color=blue size=1> or <font size=1 color=blue>
$text = preg_replace("/<font .?size=1.?>.*</font>/","",$text);
Diego