main logo
Subject: [V4MD] regex & escape
Author: Martin Kloss
Posted: 2003/12/17 08:20:00
 
View Entire Thread
New Search


Hi,

I need to do a regex search, but I have to also escape the string so it
will not
blow the SQL statement to pieces. The problem is that I can't seem to figure
out how to use the "?" or "*" characters in the regex search, because they
always get escaped.

Example input: m*ller's

Generate query:

...LIKE '(?i)" & ValentinaEscapeString(myInputString, TRUE) & "'"

which results in:

LIKE '(?i)m\*ller\'s'

That's ok, since the last parameter tells the function to escape for regex,
like stated in the docs. But how can I use the '"*" as a regex operator?
Do I need to set the parameter to FALSE and only quote quotes?
Then the documentation does not make any sense. Or what is it that
I don't get?

Martin.


_______________________________________________
Valentina mailing list
Valentina at lists .D.O.T macserve.net
http://lists.macserve.net/mailman/listinfo/valentina




 
©2003 Martin Kloss
<-- Prior Message New Search Next Message -->