[英]RegEx match certain string until next occurence of this string
我需要匹配一个字符串(让我们将其命名为“/export/home”)和后面的所有内容(包括可选的新行),直到该字符串下一次出现。
我试过/(/export/home.\\n . )(.) / 但它不会匹配从字符串到字符串的正确设置。
例子:
/export/home/bla "123" "bla" test 1
/export/home/bla "123" "bla" test 2
/export/home/bla "123" "bla" test 3
test4
test5
/export/home/bla "123" "bla" test 6
/export/home/bla "123" "bla" test 7
/export/home/bla "123" "bla" test 8
test9
/export/home/bla "123" "bla" test 1
从 /export/home 到下一个 /export/home 的所有内容都应该匹配。 任何帮助表示赞赏,提前致谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.