Thanks to visit codestin.com
Credit goes to postgrespro.com

Re: Regular Expression for 'and' instead of 'or' - Mailing list pgsql-general

From Tom Lane
Subject Re: Regular Expression for 'and' instead of 'or'
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: Regular Expression for 'and' instead of 'or'  (Fernando Schapachnik <[email protected]>)
Responses Strange Postgresql Indexing Behavior
List pgsql-general
Fernando Schapachnik <[email protected]> writes:
> You have to use something like:

> '(socks.*shoes.*nike)|(socks.*nike.*shoes)|...'

> where ... is every other possible combination. Not pretty, but that's
> a limitation of finite automata (or regular expressions, which are
> the same).

Seems a lot easier to do

    WHERE field ~* 'socks' AND field ~* 'shoes' AND field ~* 'nike'

            regards, tom lane

pgsql-general by date:

Previous
From: Medi Montaseri
Date:
Subject: Re: A Replication Idea
Next
From: Fran Fabrizio
Date:
Subject: Re: Does iscachable work?