Re: [SQL] Escaping w/i regular expressions

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter(at)pathwaynet(dot)com>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] Escaping w/i regular expressions
Date: 1999-07-08 02:18:30
Message-ID: 199907080218.WAA22723@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> How do you escape a ' (apostrophe) within a regular expression, so it does
> not close off the string? Something like
> ... ~ '[0-9.,\']'
> does not seem to work.
> (Pgsql 6.4.2)
>

Seems to work in 6.5:

test=> select * from test where x ~ '[acb\']';
x
-
'
(1 row)

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 1999-07-08 03:01:16 Re: [HACKERS] spinlock freeze again
Previous Message Hiroshi Inoue 1999-07-08 02:07:10 RE: [HACKERS] spinlock freeze again