| От | Heiko Wundram |
|---|---|
| Тема | Re: Regular expression character escape |
| Дата | |
| Msg-id | 4F47B649.2080801@modelnine.org обсуждение исходный текст |
| Ответ на | Re: Regular expression character escape (Ronan Dunklau <rdunklau@gmail.com>) |
| Ответы |
Re: Regular expression character escape
|
| Список | pgsql-general |
Am 24.02.2012 17:04, schrieb Ronan Dunklau:
> On 24/02/2012 16:38, David Johnston wrote:
>> You could (should?) write the escaping routine on the server side in a user-defined function:
>>
>> WHERE some_col ~ ('^' || make_regexp_literal(user_submitted_stringliteral) || '\d*$')
>
> I totally agree, but I hoped I could use an already existing function
> without having to read the whole spec to figure what should and should
> not be escaped.
Use the corresponding function of your programming language/framework of
choice. E.g. Python delivers this as re.escape().
--
--- Heiko.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера