Re: Unexpected Results from regexp_replace

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: susan(dot)hurst(at)brookhurstdata(dot)com
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Unexpected Results from regexp_replace
Date: 2015-11-10 20:19:10
Message-ID: CAKFQuwa=0hMEcrJf0RkNW9TtHQ6d6YeEu2j3QJMVEeVWxua5GQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Susan Hurst 2015-11-10 20:27:37 Re: Unexpected Results from regexp_replace
Previous Message Susan Hurst 2015-11-10 20:12:09 Unexpected Results from regexp_replace