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

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 (view raw or flat)
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

pgsql-jdbc by date

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

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