Yes, i thought it was simple, just wasn't escaping a forward slash $string = preg_replace( "/(<br>|<br \/>)/i" , "\n",$string);
"Tom Beddard" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm new to using regular expressions so i'm struggling a bit in making an > expression to replace <br> or <br /> with \n > > $string = preg_replace( "/(<br>|<br />)/i" , "\n",$string); > > which needless to say doesn't work. I'm sure its obvious, just need a bit of > a pointer! > > Cheers > Tom > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php