RE: Regular expression question - Mailing list pgsql-general

From Michael Ansley
Subject RE: Regular expression question
Date
Msg-id 7F124BC48D56D411812500D0B747251480F32E@fileserver002.intecsystems.co.uk
Whole thread Raw
In response to Regular expression question  (Steve Heaven <steve@thornet.co.uk>)
List pgsql-general

Hmmm, what I proposed earlier (CREATE INDEX foo ON employees (UPPER(firstname));) seems to work fine in 7.1 but not 7.0.2.

Cheers...

MikeA


-----Original Message-----
From: Steve Heaven [mailto:steve@thornet.co.uk]
Sent: 11 December 2000 11:10
To: pgsql-general@postgresql.org
Subject: [GENERAL] Regular expression question

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

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
Nick West - Global Infrastructure Manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problems with starting Postgres
Next
From: Matthew
Date:
Subject: Re: Re: Why PostgreSQL is not that popular as MySQL ?