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.
我需要创建一个可以匹配以下模式的正则表达式。我正在阅读一个大文件,需要获取与模式匹配的字符串。基本上之间的任何字符串AND++(*)
AND++(*)
AND++("adventure"), AND++("Regular"+AND+"Show"), AND++("any"+AND+"given"+AND+"sunday") , AND++("the"+AND+"greatest"+AND+"story"+AND+"ever"+AND+"told")
(?<=AND\+\+\().*?(?=\))
将捕获报价中包含的所有内容,前提AND++(是之前和)之后。
AND++(
)
(?<=AND\+\+\()是积极的后视
(?<=AND\+\+\()
(?=\))是积极的前瞻
(?=\))
编辑
对于每场比赛,只需执行以下操作:
match = match.Replace("\"","").Replace("+AND+"," ");