Find shortest matches between two strings

后端 未结 4 1255
走了就别回头了
走了就别回头了 2020-11-22 16:30

I have a large log file, and I want to extract a multi-line string between two strings: start and end.

The following is sample from the

4条回答
  •  醉酒成梦
    2020-11-22 17:17

    You could do (?s)start.*?(?=end|start)(?:end)?, then filter out everything not ending in "end".

提交回复
热议问题