in reply to Re^4: postgres reg expression quoting
in thread postgres reg expression quoting
My apologies. I didn't look at the expression closely enough and jumped to the wrong conclusion. I have a better understanding of it now.
If you're expecting the user to provide text to match literally (as opposed to a regular expression pattern), then you need to convert the text into a regular expression pattern. In Perl, quotemeta would do. It will probably do for your database as well.
my $input = '['; $sth->execute(quotemeta($input));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: postgres reg expression quoting
by Anonymous Monk on Apr 06, 2009 at 16:42 UTC |