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

From Vincas Dargis
Subject Re: regexp_replace - replace non-numbers
Date
Msg-id 49072989.5030004@nensis.lt
Whole thread Raw
In response to Re: regexp_replace - replace non-numbers  ("Merlin Moncure" <mmoncure@gmail.com>)
List pgsql-general
Merlin Moncure wrote:
> 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
>
>
Thank you!

--


Geros dienos,

Vincas Dargis

Programuotojas
UAB "ProNENSIS"
Metalistų g. 10, Šiauliai, LT - 78136
Tel: +370 41 50 23 33
Faksas: +370 41 42 16 12


pgsql-general by date:

Previous
From: Reid Thompson
Date:
Subject: Re: Piping CSV data to psql when executing COPY .. FROM STDIN
Next
From: "Merlin Moncure"
Date:
Subject: Re: nearest neighbor search from xyz coordinates