我有这个例子:
This is a simple test text.
Yet another line.
START: This is the part that
needs match.
This part does not need
capture.
Wherever else text.
我想匹配这部分:
START: This is the part that
needs capture.
关键是我知道它在START:
那里,它以一个新行结束,它后面只有一个空格。
我尝试了很多组合,从:START: (.*?)
我已经使用了 \r 和任何我能想到的只有在没有空格的情况下才能匹配的东西。
我不是菜鸟问,因为我很懒。我花了几个小时才问。