1. Jonathan Ashwell
  2. Valentina Database ADK
  3. Понедельник, Апрель 05 2021, 03:09 PM
  4.  Подписаться через email
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?
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Hello Jonathan,

Valentina.EscapeString() escapes ' and \ characters. The returned string can be safely used as a string (single-quoted) literal in the SQL query.
Комментарий
There are no comments made yet.
Jonathan Ashwell Ответ принят
Thanks. So the answer is yes, we must escape any other reserved characters ourselves.
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
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
Комментарий
There are no comments made yet.
  • Страница :
  • 1


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