Perhaps using quotemeta on the user's input before you supply it to DBI's execute method?
In reply to Re^3: postgres reg expression quoting
by BrowserUk
in thread postgres reg expression quoting
by zdzieblo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |