$neye ="'"; $neyi = "â??"; $message = eregi_replace($neyi,$neye,$message); PHP: gives ; Warning: eregi_replace() [function.eregi-replace]: REG_BADRPT Does anybody know why ?
I am trying to replace some parts of the text from yahoo pipes. Dont know why but, the ['] comes out as [â??] to php.. I have been unable to solve it with pipes, so I have thought that I do it with php with eregi_replace. And ; "â?.?" or "â?\?" did not work..
Click on the eregi_replace entry in your example - the link will take you to PHP.net, which will explain the command. In a nutshell: 1-regular expressions need a start and end character to mark it - for example, $neyi = "[COLOR="DarkRed"]@[/COLOR]â??[COLOR="DarkRed"]@[/COLOR]"; Code (markup): 2-you also need to 'escape' special characters (like the question mark) with a slash: $neyi = "@â[COLOR="DarkRed"]\[/COLOR]?[COLOR="DarkRed"]\[/COLOR]?@"; Code (markup):