pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dirk Jagdmann <jagdmann@gmail.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Tena Sakai <tsakai@gallo.ucsf.edu>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: please help me on regular expression
Date: Wed, 3 Feb 2010 11:43:03 -0800
Message-ID: <5d0f60991002031143t404064e6m597dd0eb187cbf62@mail.gmail.com> (raw)
In-Reply-To: <162867791002021238j31ad8d7cge44bbce28ff451f3@mail.gmail.com>
References: <C78DBD69.918D%tsakai@gallo.ucsf.edu>
	<162867791002021238j31ad8d7cge44bbce28ff451f3@mail.gmail.com>

Be careful when working with backslashes and regular expressions for
the proper (double) escaping!

# select '70a5' ~ e'\\d+\.\\d+';
 ?column?
----------
 t
(1 row)

# select '70a5' ~ e'\\d+\\.\\d+';
 ?column?
----------
 f
(1 row)

# select '70.5' ~ e'\\d+\\.\\d+';
 ?column?
----------
 t

-- 
---> Dirk Jagdmann
----> http://cubic.org/~doj
-----> http://llg.cubic.org



view thread (8+ messages)  latest in thread

Message-ID: <5d0f60991002031143t404064e6m597dd0eb187cbf62@mail.gmail.com>
Permalink:  ../5d0f60991002031143t404064e6m597dd0eb187cbf62@mail.gmail.com/
Also on:    postgresql.org/message-id/5d0f60991002031143t404064e6m597dd0eb187cbf62@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jagdmann@gmail.com, pavel.stehule@gmail.com, tsakai@gallo.ucsf.edu
  Subject: Re: please help me on regular expression
  In-Reply-To: <5d0f60991002031143t404064e6m597dd0eb187cbf62@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox