【发布时间】:2014-10-18 14:25:32
【问题描述】:
我有这段文字:
Blah
Blah
Blah
Blah //// CODE --- do not change Blah
Blah
Blah
Blah
Blah //// CODE --- do not change Blah
I
Want
This
Text
Matched
我只想匹配其中的这一部分(检测到 last //// CODE --- 之后的所有行):
I
Want
This
Text
Matched
我尝试过使用(?<=\/\/\/\/ CODE ---).*、but this is no good。我想我错过了某种技巧。无论如何,什么是匹配我想要的文本的正则表达式?我正在使用 .NET (C#)。
【问题讨论】: