Reg Ex for replacing <br> or <br /> with \n

From: Date: Fri, 27 Dec 2002 15:01:50 +0000
Subject: Reg Ex for replacing <br> or <br /> with \n
Groups: php.general 
Request: Send a blank email to php-general+get-129441@lists.php.net to get a copy of this message
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

« previous php.general (#129441) next »