Skip site navigation (1) Skip section navigation (2)

Re: Regular Expression Matching problem...

From: Mario Splivalo <mario(dot)splivalo(at)mobart(dot)hr>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Regular Expression Matching problem...
Date: 2006-01-09 01:22:49
Message-ID: 1136769769.19539.2.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-sql
On Wed, 2006-01-04 at 10:00 -0700, Michael Fuhr wrote:

> What Andreas is saying is that the patterns in the table have too
> many backslashes.  The original query was
> 
> test=> select '+385911234567' ~ '^\\+38591\\d{7}$';
>  ?column? 
> ----------
>  t
> (1 row)
> 
> but if you select just the pattern you get
> 
> test=> select '^\\+38591\\d{7}$';
>     ?column?    
> ----------------
>  ^\+38591\d{7}$
> (1 row)

I was a bit silly here. Dunno why I tought I need to escape the
backslashes when entering regexp as data in table. Thank you for
pointing that out.

	Mike


In response to

pgsql-sql by date

Next:From: David FordDate: 2006-01-09 19:33:24
Subject: system view corrupted, i get "unexpected right parenthesis" for many system tables.
Previous:From: Andrew SullivanDate: 2006-01-08 18:21:14
Subject: Re: INSERT waiting under heavy load

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group