Re: Using the REPLACE command to replace all vowels - Mailing list pgsql-general

From Magnus Hagander
Subject Re: Using the REPLACE command to replace all vowels
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCEA0F958@algol.sollentuna.se
Whole thread Raw
In response to Using the REPLACE command to replace all vowels  ("EbGrooveCb" <cbaumann@cmsgrp.com>)
Responses Re: Using the REPLACE command to replace all vowels  (Wayne Conrad <wconrad@yagni.com>)
Re: Using the REPLACE command to replace all vowels  (Geoffrey <esoteric@3times25.net>)
List pgsql-general
> Is there a way to make seperate replacements in 1 field in
> one command in SQL?
>
> I need to remove all vowels (a,e,i,o,u) in a field. How would
> I go about that?

Try something like
SELECT regexp_replace(your_string,'[aeiou]','','g') ...

(btw, if you want all vowels, don't forget 'y' :-P)

//Magnus

pgsql-general by date:

Previous
From: Erik Myllymaki
Date:
Subject: logfiles filling up
Next
From: Wayne Conrad
Date:
Subject: Re: Using the REPLACE command to replace all vowels