May 11, 2004 #1 rjonesX Technical User Joined Jun 18, 2001 Messages 56 Location US I tried preg_replace("\s+"," ", $oldstring); but that isnt really working for me - it gives me an error... any ideas?
I tried preg_replace("\s+"," ", $oldstring); but that isnt really working for me - it gives me an error... any ideas?
May 11, 2004 #2 bastienk Programmer Joined Mar 3, 2004 Messages 326 Location CA trim Bastien Cat, the other other white meat Upvote 0 Downvote
May 11, 2004 #3 DRJ478 IS-IT--Management Joined Aug 10, 2001 Messages 2,264 Location US Your regular expression is flawed, but easy to fix: Code: preg_replace("[b][COLOR=red]/[/color][/b]\s+[b][COLOR=red]/[/color][/b]"," ", $oldstring); All you needed is the expression delimiters. Upvote 0 Downvote
Your regular expression is flawed, but easy to fix: Code: preg_replace("[b][COLOR=red]/[/color][/b]\s+[b][COLOR=red]/[/color][/b]"," ", $oldstring); All you needed is the expression delimiters.