string filtering in postgres?

From: Kenneth Tilton <kentilton(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: string filtering in postgres?
Date: 2009-04-16 20:37:44
Message-ID: 49E79718.2070103@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I need to normalize a column for search purposes by stripping all
non-alphanumeric characters:

UPDATE my-table SET id_stripped = ??? id;

I have been playing with regexp_replace( id, ????,'');

UPDATE my-table
SET id_stripped = regexp_replace( id, <various>,'');id;

Without much luck. Can this even be done with regex, or should I just
write a custom sql function?

kt

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-04-16 20:48:23 Re: Performance of full outer join in 8.3
Previous Message Steve Atkins 2009-04-16 20:37:36 Re: Looking for advice on database encryption