From: | Steve Heaven <steve(at)thornet(dot)co(dot)uk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Regular expression question |
Date: | 2000-12-11 11:09:56 |
Message-ID: | 3.0.1.32.20001211110956.00fd1208@mail.thornet.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Does the regular expression parser have anything equivalent to Perl's \w
word boundary metacharacter?
I want to select tuples where a text field contains a certail whole word.
Using fieldname ~* 'searchword' wont work because it picks up the
searchword emdedded in other words. Using ~*' searchword ' wont find it at
the beginning or end of the string.
So far we have:
field ~*' searchword ' OR field ~*'^searchword ' OR field ~*' searchword$'
but I would like something more elegant.
Steve
--
thorNET - Internet Consultancy, Services & Training
Phone: 01454 854413
Fax: 01454 854412
http://www.thornet.co.uk
From | Date | Subject | |
---|---|---|---|
Next Message | Zeljko Trogrlic | 2000-12-11 11:23:23 | Re: Re: Re: Why PostgreSQL is not that popular as MySQL ? |
Previous Message | Tomas Berndtsson | 2000-12-11 10:48:39 | Re: Simple Question: Case sensitivity |
From | Date | Subject | |
---|---|---|---|
Next Message | Horst Herb | 2000-12-11 12:59:34 | Fwd: Re: CRC, hash & Co. |
Previous Message | Zeugswetter Andreas SB | 2000-12-11 10:58:57 | AW: Using Threads? |