regexp replace?

From: CSN <cool_screen_name90001(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: regexp replace?
Date: 2004-05-06 20:59:16
Message-ID: 20040506205916.40737.qmail@web40610.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'd like to create a function that will take strings
like:

abcdef 'quote1' "quote2" / xyz etc.

and return:

abcdef-quote1-quote2-xyz-etc.

Basically remove all characters that aren't
[A-Za-z0-9], -, or ., and replace all spaces with
hyphens. Possible? The only string function that
supports regular expressions is substring and I
couldn't make that do what I want.

TIA,
CSN



__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Denis Braekhus 2004-05-06 21:00:25 Re: vacuumdb is failing with NUMBER OF INDEX TUPLES NOT
Previous Message Josué Maldonado 2004-05-06 20:55:29 Copy entire row on elete