2009/2/12 Andreas <maps.on@gmx.net>:
> Hi,
>
> I need a function that removes characters in strings that aren't in a given
> set of chars.
> e.g
> Input: 12-34/ 56(8)
> I want just numbers so Output should in this case be: 1234568
>
> Is there a solution?
One is:
SELECT regexp_replace('12-34/ 56(8)',E'[^0-9]','','g');
--
Dickson S. Guedes
-
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://guedesoft.net - http://planeta.postgresql.org.br