[V4MD] regex & escape

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


At 17:06 17.12.2003, you wrote:
>USER do input 'm?ller's (data)'
>Yes?

Correct

>You need escape this USER INPUT only
>And you get
>
>     'm\?ller's \(data\)'
>
>Aha, I see problem...
>
>Hmm, then really, it is USER must give you input

No, the user does not know anything about regex and
I just want to parse it automatically.

>    'm?ller's \(data\)'

What I'm doing now is to use ValentinaEscapeString(string, FALSE)
and escape the "(" and ")" and "." and some other characters manually.

So the search should return the records, but it doesn't.
Example:

I have a couple of records where the name "petrova" appears.
This query returns 2 records (correct):

LIKE '(?i)petrova'

These queries, using the regex do not return ANY records:

LIKE '(?i)petr*va'

LIKE '(?i)petr?va'

But they should, or not? I tried in viSQL, vStudio and V4MD.

Martin.





More information about the Valentina mailing list