I am trying to do a replace within a string in PHP. How do you delete the part that is only in the group in PHP?
<font.+?(size.+?.)>
I want to remove size=x where ever it in. The problem is I cannot get the
$text = preg_replace("<font.+?(size.+?.)>","",$text);
function to work.
Example source of this
<font style="background-color: rgb(255, 255, 0);" size="2"><strong><u>text</u></strong></font>
<font size="2">more text</font>
into this
<font style="background-color: rgb(255, 255, 0);" ><strong><u>text</u></strong></font>
<font>more text</font>
I am trying to say. Where ever there is a font tag and if I see size-anything remove the size attribute, but leave everything else i tact.
Thanks again...