Re: regexp_replace - replace non-numbers

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Vincas Dargis" <vincas(dot)d(at)nensis(dot)lt>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: regexp_replace - replace non-numbers
Date: 2008-10-28 14:56:52
Message-ID: b42b73150810280756k140da6b8oe82a0347b87af161@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 28, 2008 at 10:42 AM, Vincas Dargis <vincas(dot)d(at)nensis(dot)lt> wrote:
> Hello everyone,
>
> I have problem with regexp_replace ( PostgreSQL 8.3.1). Please try this
> crappy string replacement:
>
> select regexp_replace('abcd1235hgj!(at)#$^&^&*()[]-=', '[^0-9]*' ,'')
>
> ..and I get:
> "1235hgj!(at)#$^&^&*()[]-="
>

global flag:
select regexp_replace('abcd1235hgj!(at)#$^&^&*()[]-=', '[^0-9]*' ,'', 'g');

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vincas Dargis 2008-10-28 15:02:33 Re: regexp_replace - replace non-numbers
Previous Message Tom Lane 2008-10-28 14:44:40 Re: getting our bearings on "out of memory. failed on request of size..."