List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:October 11 2002 12:41am
Subject:Re: REGEXP question, newbie
View as plain text  
At 16:04 -0400 10/10/02, Kevin wrote:
>Another question...I know. Second one in 24 hours...I hate it too.
>
>I have a column of data that may begin with an open parenthesis "(". When I
>do this:
>
>     mysql> SELECT * FROM table WHERE column REGEXP "^(text";
>
>I get this:
>
>     ERROR 1139: Got error 'parentheses not balanced' from regexp
>
>So, I try to escape that open parenthesis with a "\":
>
>     mysql> SELECT * FROM table WHERE column REGEXP "^\(text";
>
>Still, I get the same error, 1139. It seems I can't escape the open
>parenthesis! How can I search for a column that begins with a "("?
>
>Any help on this would be appreciated!

In REGEXP patterns, backslashes should be doubled.

>
>--Kevin

Thread
REGEXP question, newbieKevin11 Oct
  • Re: REGEXP question, newbiePaul DuBois11 Oct