Re: Regular expression. How to disable

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: David Gagnon <dgagnon(at)siunik(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Regular expression. How to disable
Date: 2005-04-20 18:05:18
Message-ID: 1114020318.20921.588.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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\]

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Gagnon 2005-04-20 18:05:37 Re: Regular expression. How to disable ALL meta-character
Previous Message Scott Marlowe 2005-04-20 17:50:12 Re: Regular expression. How to disable ALL