在 C# 正则表达式中是否有等同于\Q ...\E 的东西?我找不到它。
最佳答案
如 site 所述,.NET 中没有直接等同于\Q...\E 语法的语法.
相反,您可以使用 Regex.Escape 方法:
Escapes a minimal set of characters (\, *, +, ?, |, {, [, (,), ^, $,., #, and white space) by replacing them with their escape codes.
关于c# - 在 C# 正则表达式中是否有等同于\Q ...\E,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2408396/