1. Jonathan Ashwell
  2. Valentina Database ADK
  3. 月, 4月 05 2021, 03:09 PM
  4.  メールで購読
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.

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