【发布时间】:2018-01-09 07:27:58
【问题描述】:
我有一个像下面这样的大字符串:
一个带有 content-start 内容的新字符串 content-end。带有 blah 的新字符串 blah.a new string with blah blah.
一个带有 blah blah 的新字符串。
一个带有 content- 开始的新字符串 content-end.
一个带有blah blah 的新字符串。一个带有blah blah 的新字符串。
带有内容的新字符串-
在此处开始内容content-end。一个带有 blah blah 的新字符串。
我想分别匹配整个字符串 * 中的 content-start 和 content-end 子字符串,即使它们之间有空格或换行符*。
感谢任何有关此类正则表达式的输入。
【问题讨论】:
-
开始here,然后用minimal reproducible example 发布一个真正的问题,而不仅仅是您的要求。