1. Jonathan Ashwell
  2. Valentina Database ADK
  3. Montag, April 05 2021, 03:09 PM
  4.  Abonnieren via E-Mail
I've been using Valentina.EscapeString() for Regex searches, but the searches fail if they have characters like (, ), or ? I see these characters aren't being escaped properly to

\(
\)
\?

I can add the \ myself and now the Regex searches work.

What does Valentina.escapestring do, then? Should I roll my own escape method?
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Hello Jonathan,

Valentina.EscapeString() escapes ' and \ characters. The returned string can be safely used as a string (single-quoted) literal in the SQL query.
Kommentar
There are no comments made yet.
Jonathan Ashwell Akzeptierte Antwort
Thanks. So the answer is yes, we must escape any other reserved characters ourselves.
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
Hi Jon,

we have seen that existed attempts to add REGEX chars to this function Valentina.EscapeString()
But later they were removed. We need to return back to this point I think
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories