Re: posix style regexp? - Mailing list pgsql-general

From Tom Lane
Subject Re: posix style regexp?
Date
Msg-id 15436.1032385816@sss.pgh.pa.us
Whole thread Raw
In response to posix style regexp?  (Cindy <ctmoore@uci.edu>)
List pgsql-general
Cindy <ctmoore@uci.edu> writes:
> I've a question about escaping special characters in a ~ string operation.
> To match the literal ? I would have thought I could put in \?
> but this seems not to work.

You need to double the backslash to get it through the string-literal
parser.  Try
    ... citation ~ 'y"335\\?"z[0-9]+';

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Permissions with multiple groups...
Next
From: Garo Hussenjian
Date:
Subject: Boolean internal representation