postgresql reg exp and unescaped sequence
- From: "Kai Schlamp" <stroncococcus@xxxxxx>
- Date: 26 Mar 2007 16:06:55 -0700
Hy!
I am trying to do the following database query:
$dbh->selectall_arrayref("SELECT col1 FROM northern_gene WHERE col2 ~*
'$regexp'"");
Problems occur, when for example $regexp="foo ' bar", cause of the
unescaped '
As I don't know what values $regexp will contain, is there a function,
which escapes me all those signs for that regular expression variable.
Also I don't even know how to do this manual ... i tried ....
$regexp="foo \' bar" and $regexp="foo '' bar", but always get the same
syntax error from Postgres.
Hope to find some help here.
Best regards,
Kai
.
- Follow-Ups:
- Re: postgresql reg exp and unescaped sequence
- From: Kai Schlamp
- Re: postgresql reg exp and unescaped sequence
- Prev by Date: RE: Cannot Install DBD ORacle in Win Xp
- Next by Date: Re: postgresql reg exp and unescaped sequence
- Previous by thread: DBD: Pg make test Error
- Next by thread: Re: postgresql reg exp and unescaped sequence
- Index(es):
Relevant Pages
|
|