Re: Regular expression. How to disable - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Regular expression. How to disable
Date
Msg-id 1114020318.20921.588.camel@state.g2switchworks.com
Whole thread Raw
In response to Re: Regular expression. How to disable ALL meta-character  (David Gagnon <dgagnon@siunik.com>)
List pgsql-general
On Wed, 2005-04-20 at 13:05, David Gagnon wrote:
> Hi Scott,
>
>
> >I would generally scrub the input before it go to postgresql.  Basically
> >do a simple string_replace type function that replaces anything that
> >ISN'T alphanum with nothing.
> >
> >
> >
> If I change the original string the user may not get what he expects as
> result.  abc[d]  is not the samething than abcd...  am I right?

Then replace it with properly escaped strings:

abc[d] becomes abc\[d\]

pgsql-general by date:

Previous
From: David Gagnon
Date:
Subject: Re: Regular expression. How to disable ALL meta-character
Next
From: "A. Cropi"
Date:
Subject: electronic-izing unicode texts