Re: Regular expression. How to disable

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Regular expression. How to disable
Дата
Msg-id 1114020318.20921.588.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на Re: Regular expression. How to disable ALL meta-character  (David Gagnon <dgagnon@siunik.com>)
Список 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 по дате отправления:

Предыдущее
От: David Gagnon
Дата:
Сообщение: Re: Regular expression. How to disable ALL meta-character
Следующее
От: "A. Cropi"
Дата:
Сообщение: electronic-izing unicode texts