text -> extracted list of words

From: Nabil Sayegh <postgresql(at)e-trolley(dot)de>
To: pgsql-novice(at)postgresql(dot)org
Subject: text -> extracted list of words
Date: 2003-10-01 16:52:38
Message-ID: 3F7B0656.9050209@e-trolley.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi all,

I'm looking for a way to extract all words out of a text-field.
Delimiter: all except alphanumeric + dash + underscore

e.g.

SELECT extr('Hello World. This is a foo_bar test','-_a-zA-Z0-9');
'Hello'
'World'
'This'
'is'
'a'
'foo_bar'
'test'
7 rows

Of course I could do this in the app but in the db it would be much handier.
Is there already such a function ?

TIA
--
e-Trolley Sayegh & John, Nabil Sayegh
Tel.: 0700 etrolley /// 0700 38765539
Fax.: +49 69 8299381-8
PGP : http://www.e-trolley.de

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2003-10-01 17:38:53 Re: Ideal Hardware?
Previous Message Jason Hihn 2003-10-01 15:13:15 Ideal Hardware?