[V4MD] regex & escape

Martin Kloss martin.kloss at gmx.de
Wed Dec 17 14:13:20 CST 2003


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.




More information about the Valentina mailing list