Re: [GENERAL] Validating user-input to be inserted in regular expressions

2005-01-25 Thread Michael Fuhr
On Tue, Jan 25, 2005 at 04:28:06PM +0100, Vincenzo Ciancia wrote: > Thank you for your answer. Unfortunately quote_literal is not what I am > looking for, in fact it quotes special characters in the sense of strings, > not in the sense of regular expressions. It sounds like you're looking for the

Re: [GENERAL] Validating user-input to be inserted in regular expressions

2005-01-25 Thread Vincenzo Ciancia
Sean Davis wrote: > Yes, this is a fine place to ask your question.ÂÂSometimesÂitÂdoesÂtake > a day or two to get an answer.ÂÂWillÂquote_literalÂdoÂwhatÂyouÂwant? > > http://www.postgresql.org/docs/8.0/interactive/functions-string.html > > Search on that page for quote_literal. > Thank you for

Re: [GENERAL] Validating user-input to be inserted in regular expressions

2005-01-25 Thread Sean Davis
On Jan 25, 2005, at 8:48 AM, Vincenzo Ciancia wrote: Vincenzo Ciancia wrote: Should I find every possible character in the documentation for regular expressions? Is the answer trivial? I checked the manual and the FAQ, and googled for the answer, but I didn't find it. Is there a more appropriate

Re: [GENERAL] Validating user-input to be inserted in regular expressions

2005-01-25 Thread Vincenzo Ciancia
Vincenzo Ciancia wrote: > Should I find every > possible character in the documentation for regular expressions? Is the answer trivial? I checked the manual and the FAQ, and googled for the answer, but I didn't find it. Is there a more appropriate place where I can ask my question? Thanks Vinc

[GENERAL] Validating user-input to be inserted in regular expressions

2005-01-24 Thread Vincenzo Ciancia
Hi all, I would like to take user input, which should be interpreted literally, and put it inside a regular expression, something like select * from files where path ~ (USER_INPUT || '.*') How should I escape the user input? I mean: I know that I must insert double backslashes before special cha