Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 02D94633C4B for ; Wed, 3 Feb 2010 16:32:30 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 75669-10 for ; Wed, 3 Feb 2010 20:32:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.egcrc.net (63-193-205-1.egcrc.org [63.193.205.1]) by mail.postgresql.org (Postfix) with ESMTP id 5D08A633BE3 for ; Wed, 3 Feb 2010 16:32:19 -0400 (AST) Received: from EGCRC-EX04.egcrc.org ([::1]) by EGCRC-EX03.egcrc.org ([::1]) with mapi; Wed, 3 Feb 2010 12:32:12 -0800 From: Tena Sakai To: Dirk Jagdmann , Pavel Stehule CC: "pgsql-sql@postgresql.org" Date: Wed, 3 Feb 2010 12:32:11 -0800 Subject: Re: please help me on regular expression Thread-Topic: [SQL] please help me on regular expression Thread-Index: AcqlCRmk9VB3ljw1SEebvO6An7WQagAB/o+Z Message-ID: In-Reply-To: <5d0f60991002031143t404064e6m597dd0eb187cbf62@mail.gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-Entourage/13.3.0.091002 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.085 tagged_above=-10 required=5 tests=BAYES_40=-0.185, RDNS_DYNAMIC=0.1 X-Spam-Level: X-Archive-Number: 201002/28 X-Sequence-Number: 33627 Thank you, Dirk. Regards, Tena Sakai tsakai@gallo.ucsf.edu On 2/3/10 11:43 AM, "Dirk Jagdmann" wrote: > Be careful when working with backslashes and regular expressions for > the proper (double) escaping! >=20 > # select '70a5' ~ e'\\d+\.\\d+'; > ?column? > ---------- > t > (1 row) >=20 > # select '70a5' ~ e'\\d+\\.\\d+'; > ?column? > ---------- > f > (1 row) >=20 > # select '70.5' ~ e'\\d+\\.\\d+'; > ?column? > ---------- > t