From: | "Samuel J(dot) Sutjiono" <ssutjiono(at)wc-group(dot)com> |
---|---|
To: | "Fernando Schapachnik" <fschapachnik(at)vianetworks(dot)com(dot)ar> |
Cc: | <pgsql-sql(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: [SQL] Regular Expression for 'and' instead of 'or' |
Date: | 2002-02-22 18:34:04 |
Message-ID: | 025b01c1bbcf$81dccc40$110a010a@headquarters.wcgroup.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
Thank you very much Fernando. Do you know whether this expression (regex)
use index scan ?
Regards,
Sam
----- Original Message -----
From: "Fernando Schapachnik" <fschapachnik(at)vianetworks(dot)com(dot)ar>
To: "Samuel J. Sutjiono" <ssutjiono(at)wc-group(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>; <pgsql-general(at)postgresql(dot)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(at)vianetworks(dot)com(dot)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(at)postgresql(dot)org)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Fernando Schapachnik | 2002-02-22 18:46:48 | Re: [SQL] Regular Expression for 'and' instead of 'or' |
Previous Message | Sean Chittenden | 2002-02-22 18:26:50 | Re: pg_dumpall perms errata... |
From | Date | Subject | |
---|---|---|---|
Next Message | Fernando Schapachnik | 2002-02-22 18:46:48 | Re: [SQL] Regular Expression for 'and' instead of 'or' |
Previous Message | Fernando Schapachnik | 2002-02-22 18:15:14 | Re: Regular Expression for 'and' instead of 'or' |