trouble with regular expression

Поиск
Список
Период
Сортировка
От Pushker Chaubey
Тема trouble with regular expression
Дата
Msg-id 4846DA2B.2030606@vertex.co.in
обсуждение исходный текст
Ответы Re: trouble with regular expression  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc
Hi experts,

I have a problem regarding  regular expression.

In my database (version 8.0.2 ) I have a value stored as "([t]{0,1})^(t?)+$\"
(Please note that this value uses many characters which have special meaning in regular expression)

Earlier I had a query which used to fetch this value
SELECT "Topic" FROM "schema1"."Topics" WHERE "Topic"  similar to '\\(\\[t\\]{0,1}\\)\\^\\(t?\\)\\+\\$\\\\' ORDER BY "Topic"
This query worked fine and did return the matching value stored in database .

Later on to support, case insensitive value search, I modified the query to
SELECT "Topic" FROM "schema1"."Topics" WHERE "Topic"  ~*     '\\(\\[t\\]{0,1}\\)\\^\\(t?\\)\\+\\$\\\\' ORDER BY "Topic"

(Please note that I just replaced similar to with ~*)

The new query does not work. Please let me know where I am making a mistake.
If there are other approaches to go about case insensitive pattern matching in query, please provide pointers to that.

Thanks in advance.

Regards,
Pushker Chaubey


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.

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: tivvpgsqljdbc@gtech-ua.com
Дата:
Сообщение: Re: How to just "link" to some data feed
Следующее
От: Tom Lane
Дата:
Сообщение: Re: trouble with regular expression