replace() and Regular Expressions

From: "DEV" <dev(at)umpa-us(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: replace() and Regular Expressions
Date: 2005-10-31 18:11:20
Message-ID: 20051031181148.633B4DB573@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is is possible to use replace along with regular expression to remove any
and all punctuation from a field?

If so how?

I have tried: SELECT replace ('Brian\'s Co, INC.',
'Y*([.]',''),SUBSTRING('XY1234Z', 'Y*([0-9]{1,3})');

The second field substring works with out a problem the replace does not!
How man I make that work?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2005-10-31 18:12:45 Re: SQL injection
Previous Message Alex Turner 2005-10-31 18:10:57 Re: SQL injection