Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.3/8.9.3) with ESMTP id WAA67871 for ; Wed, 7 Jul 1999 22:19:36 -0400 (EDT) (envelope-from maillist@candle.pha.pa.us) Received: (from maillist@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id WAA22723; Wed, 7 Jul 1999 22:18:30 -0400 (EDT) From: Bruce Momjian Message-Id: <199907080218.WAA22723@candle.pha.pa.us> Subject: Re: [SQL] Escaping w/i regular expressions In-Reply-To: from Peter Eisentraut at "Jun 30, 1999 02:07:26 pm" To: Peter Eisentraut Date: Wed, 7 Jul 1999 22:18:30 -0400 (EDT) CC: pgsql-sql@postgreSQL.org X-Mailer: ELM [version 2.4ME+ PL56 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > 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@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026