Re: Using the REPLACE command to replace all vowels

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "EbGrooveCb" <cbaumann(at)cmsgrp(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Using the REPLACE command to replace all vowels
Date: 2006-05-03 07:38:47
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA0F958@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wayne Conrad 2006-05-03 07:56:31 Re: Using the REPLACE command to replace all vowels
Previous Message Erik Myllymaki 2006-05-03 07:02:09 logfiles filling up