cyphix
02-13-2006, 04:51 PM
Hey guys.. having some problem with this regex..... example..
Original text:
Text here:<BR> More text
I am trying to remove the "<BR> " part but also account for lowercase, <br />/<br/>'s & also zero or more & not always just the two; but all my code seems to do is remove the <BR> tag & leave the 's.......
Here is what I have tried..
$ff = preg_replace('~<br(/| /)?( )*>~i', ' ', $ff);
also tried..
$ff = preg_replace('~(<br(/| /)?( )*)>~i', ' ', $ff);
..but they both gave the same result.
Thanks for any help! :)
Original text:
Text here:<BR> More text
I am trying to remove the "<BR> " part but also account for lowercase, <br />/<br/>'s & also zero or more & not always just the two; but all my code seems to do is remove the <BR> tag & leave the 's.......
Here is what I have tried..
$ff = preg_replace('~<br(/| /)?( )*>~i', ' ', $ff);
also tried..
$ff = preg_replace('~(<br(/| /)?( )*)>~i', ' ', $ff);
..but they both gave the same result.
Thanks for any help! :)