newbie q: using eregi_replace to replace parentheses
Posted: Wed Aug 28, 2002 9:47 am
Alright, this may be simple, but I just started using PHP yesterday. I'm trying to replace the parentheses in a string of text using eregi_replace. Here's the code:
$TableString = eregi_replace(")"," " , $TableString);
The problem comes up, as you probably guessed, when PHP hits the parentheses I want replace and I get an unbalanced parentheses error. Is there an escape character for parentheses? I tried using a backslash (liek perl -- "\)" ) but I still got the error. Any help you guys can give would be greatly appreciated.
AUaero
$TableString = eregi_replace(")"," " , $TableString);
The problem comes up, as you probably guessed, when PHP hits the parentheses I want replace and I get an unbalanced parentheses error. Is there an escape character for parentheses? I tried using a backslash (liek perl -- "\)" ) but I still got the error. Any help you guys can give would be greatly appreciated.
AUaero