From: Samuel J. Sutjiono <ssutjiono@wc-group.com>
To: Fernando Schapachnik <fschapachnik@vianetworks.com.ar>
Cc: pgsql-sql@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: [SQL] Regular Expression for 'and' instead of 'or'
Date: Fri, 22 Feb 2002 13:34:04 -0500
Message-ID: <025b01c1bbcf$81dccc40$110a010a@headquarters.wcgroup.com> (raw)
References: <023101c1bbc3$03a33910$110a010a@headquarters.wcgroup.com>
<20020222151514.E2066@ns1.via-net-works.net.ar>
Thank you very much Fernando. Do you know whether this expression (regex)
use index scan ?
Regards,
Sam
----- Original Message -----
From: "Fernando Schapachnik" <fschapachnik@vianetworks.com.ar>
To: "Samuel J. Sutjiono" <ssutjiono@wc-group.com>
Cc: <pgsql-sql@postgresql.org>; <pgsql-general@postgresql.org>
Sent: Friday, February 22, 2002 1:15 PM
Subject: Re: [SQL] [GENERAL] Regular Expression for 'and' instead of 'or'
> En un mensaje anterior, Samuel J. Sutjiono escribió:
> > This expression matches the word socks or shoes or nike in product
category
> > where productdescr ~* '(socks|shoes|nike)'
> >
> > Does anybody know what the expression should be if I want to do 'and'
of those key words instead of 'or' ?
>
> 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).
>
> Regards.
>
>
>
> Fernando P. Schapachnik
> Gerente de tecnología de red
> y sistemas de información
> VIA NET.WORKS ARGENTINA S.A.
> fschapachnik@vianetworks.com.ar
> Tel.: (54-11) 4323-3381
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
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: ssutjiono@wc-group.com, fschapachnik@vianetworks.com.ar, pgsql-general@postgresql.org
Subject: Re: [SQL] Regular Expression for 'and' instead of 'or'
In-Reply-To: <025b01c1bbcf$81dccc40$110a010a@headquarters.wcgroup.com>
* 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