postgresql reg exp and unescaped sequence



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

.



Relevant Pages

  • Re: MFC SDI Windows Explorer type application related query?
    ... > thread and update the status bar using a message to the main thread. ... >> My existing project is an MFC Windows explorer type SDI application. ... >> running tree is stopped. ... >> Best Regards ...
    (microsoft.public.vc.mfc.docview)
  • Office Web Components
    ... I am unable to find proper help in internet. ... here is the result of my database query ... Set CSpace = CreateObject ... 'Font and Color of the count of the bar can be done with the commented ...
    (microsoft.public.office.developer.web.components)
  • Re: How to delete history in START/RUN?
    ... Searching from the address bar is set to "Go to the most likely site"! ... I do not remember selecting it. ... Regards. ... > referring to appear only if you begin typing an alphabet. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: sql query in real time...ajax?
    ... If user gets lucky and it ends in 9 seconds then you finish your bar early ... Don't talk to me about Windows OS progress bars....lol. ... a database query. ... it is a lot of effort...the first time. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Why does aspx pages crash my machine?
    ... I'll take a stab at it. ... Regards, ... When I reference http://127.0.0.1/mysite/webform1.aspx ... > click the title bar of applications but that is all. ...
    (microsoft.public.dotnet.framework)