Re: regexp_replace - replace non-numbers - Mailing list pgsql-general

From Merlin Moncure
Subject Re: regexp_replace - replace non-numbers
Date
Msg-id b42b73150810280756k140da6b8oe82a0347b87af161@mail.gmail.com
Whole thread Raw
In response to regexp_replace - replace non-numbers  (Vincas Dargis <vincas.d@nensis.lt>)
Responses Re: regexp_replace - replace non-numbers  (Vincas Dargis <vincas.d@nensis.lt>)
List pgsql-general
On Tue, Oct 28, 2008 at 10:42 AM, Vincas Dargis <vincas.d@nensis.lt> wrote:
> Hello everyone,
>
> I have problem with regexp_replace ( PostgreSQL 8.3.1). Please try this
> crappy string replacement:
>
> select regexp_replace('abcd1235hgj!@#$^&^&*()[]-=', '[^0-9]*' ,'')
>
> ..and I get:
> "1235hgj!@#$^&^&*()[]-="
>

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

merlin

pgsql-general by date:

Previous
From: Vincas Dargis
Date:
Subject: regexp_replace - replace non-numbers
Next
From: Reid Thompson
Date:
Subject: Re: Piping CSV data to psql when executing COPY .. FROM STDIN