Re: Regexp match not working.. (SQL help) - Mailing list pgsql-general

From Tom Lane
Subject Re: Regexp match not working.. (SQL help)
Date
Msg-id 28564.1305129360@sss.pgh.pa.us
Whole thread Raw
In response to Regexp match not working.. (SQL help)  (Phoenix Kiula <phoenix.kiula@gmail.com>)
List pgsql-general
Phoenix Kiula <phoenix.kiula@gmail.com> writes:
> I am using this SQL:

>    SELECT id FROM table1
>    WHERE   mytext   ~*   E'sub1|sub2|sub3|sub4...'
>    LIMIT 10;

> This is basically working, but some of the "mytext" columns being
> returned that do not contain any of these substrings.

[ raised eyebrow... ]  Could we see a concrete example?

One potential issue is that, depending on which PG version and locale
and database encoding you are using, case-insensitive matching might
not work properly on non-ASCII letters.  Other than that, the only
gotcha I can think of is having regexp special characters in the
substrings and failing to escape them properly.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Custom types and JDBC
Next
From: Stanislav Raskin
Date:
Subject: Re: full text search to_tsquery performance with ispell dictionary