From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fernando Schapachnik <fschapachnik@vianetworks.com.ar>
Cc: Samuel J. Sutjiono <ssutjiono@wc-group.com>
Cc: pgsql-sql@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: Regular Expression for 'and' instead of 'or'
Date: Fri, 22 Feb 2002 15:20:39 -0500
Message-ID: <19463.1014409239@sss.pgh.pa.us> (raw)
In-Reply-To: <20020222151514.E2066@ns1.via-net-works.net.ar>
References: <023101c1bbc3$03a33910$110a010a@headquarters.wcgroup.com>
<20020222151514.E2066@ns1.via-net-works.net.ar>
Fernando Schapachnik <fschapachnik@vianetworks.com.ar> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, fschapachnik@vianetworks.com.ar, ssutjiono@wc-group.com, pgsql-general@postgresql.org
Subject: Re: Regular Expression for 'and' instead of 'or'
In-Reply-To: <19463.1014409239@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox