Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
谁能告诉我如何为这个字符串编写常规的 exp。
TRY MOVIE YES [蝙蝠侠获胜]
(我尝试使用反斜杠 [ 但不起作用)
谢谢
似乎您错误地转义括号:
尝试这个:
string regexTemplate = @"TRY MOVIE YES \[Bat2man WIN\]";
或者
string regexTemplate = "TRY MOVIE YES \\[Bat2man WIN\\]";