Re: trouble with regular expression

From: Pushker Chaubey <pchaubey(at)vertex(dot)co(dot)in>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: trouble with regular expression
Date: 2008-06-05 06:44:08
Message-ID: 48478B38.5020103@vertex.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Tom,
Thanks a lot! It worked.

Tom Lane wrote:
> Pushker Chaubey <pchaubey(at)vertex(dot)co(dot)in> writes:
>
>> (Please note that I just replaced similar to with ~*)
>>
>
> They're not the same ... SIMILAR TO is SQL-spec which is almost entirely
> unlike POSIX.
>
> You can get there using the undocumented similar_escape function:
> "a SIMILAR TO b" is actually implemented as "a ~ similar_escape(b,null)",
> so "a ~* similar_escape(b,null)" should do what you want.
>
> regards, tom lane
>
>

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy the original message all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

Please do not print this email unless it is absolutely necessary.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Allgood, John 2008-06-05 14:10:56 JDBC on Postgres 8.3
Previous Message Tom Lane 2008-06-04 18:37:29 Re: trouble with regular expression