Re: Unexpected Results from regexp_replace

From: Susan Hurst <susan(dot)hurst(at)brookhurstdata(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Unexpected Results from regexp_replace
Date: 2015-11-10 20:27:37
Message-ID: 3738b6ca95a740bd1ad7b8ccef142364@mail.brookhurstdata.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Excellent! I tried the global flag before but I had it in the wrong
place.

Thanks for the quick service, David!

---
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Susan E Hurst
Principal Consultant
Email: susan(dot)hurst(at)brookhurstdata(dot)com
Mobile: 314-486-3261

On 2015-11-10 14:19, David G. Johnston wrote:
> On Tue, Nov 10, 2015 at 1:12 PM, Susan Hurst
> <susan(dot)hurst(at)brookhurstdata(dot)com> wrote:
>
>> What is the trick for removing all instances of unwanted characters
>> and spaces?
>
> ​(g)lobal flag.
>
> SELECT regexp_replace('hello - world n', '[^0-9a-z]+', '', 'g')
> ​;
>
> David J.​

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mammarelli, Joanne T 2015-11-10 20:53:01 attempting to install tds_fw-master on redhat
Previous Message David G. Johnston 2015-11-10 20:19:10 Re: Unexpected Results from regexp_replace