Re: POSIX RE starting with a (

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nick Barr <nicky(at)chuckie(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: POSIX RE starting with a (
Date: 2004-08-11 15:03:07
Message-ID: 5470.1092236587@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Nick Barr <nicky(at)chuckie(dot)co(dot)uk> writes:
> intranet=# select track_name from ms_track where track_name ~ '^\(';
> ERROR: invalid regular expression: parentheses () not balanced

You've forgotten that the string-literal parser will eat one level of
backslashing. You need

intranet=# select track_name from ms_track where track_name ~ '^\\(';

to get that backslash into the regex parser.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2004-08-11 15:07:00 Re: POSIX RE starting with a (
Previous Message Prabu Subroto 2004-08-11 14:47:35 Re: the behaviour of timestamp on postgres.