让我们有一个文本,我们希望在双引号之间匹配所有字符串; 但在这些双引号内,可以引用双引号.例:
"He said \"Hello\" to me for the first time"
Run Code Online (Sandbox Code Playgroud)
使用正则表达式,您如何有效地匹配它?
我一直在谷歌搜索并试图自己得到这个,但不能完全得到它...
问题:可以使用什么正则表达式来选择文本BETWEEN(但不包括)分隔符文本.举个例子:
Start Marker=ABC
Stop Marker=XYZ
---input---
This is the first line
And ABCfirst matched hereXYZ
and then
again ABCsecond matchXYZ
asdf
------------
---expected matches-----
[1] first matched here
[2] second match
------------------------
Run Code Online (Sandbox Code Playgroud)
谢谢
regex ×2