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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-sql by date

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