Re: posix style regexp?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Cindy <ctmoore(at)uci(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: posix style regexp?
Date: 2002-09-18 21:50:16
Message-ID: 15436.1032385816@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Cindy <ctmoore(at)uci(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Jowett 2002-09-18 22:22:54 Re: [GENERAL] Postgres 7.3b1 + JDBC3 (2002-09-05) truncates SQL
Previous Message Tom Lane 2002-09-18 21:48:45 Re: Permissions with multiple groups...