RegEx Overlapping String
This question already has an answer here:
Make your quantifier non-greedy (reluctant). Add a ?
like this:
(.*?)
This will instruct the regex to match as few as possible instead of being greedy and matching as many as possible.
链接地址: http://www.djcxy.com/p/76914.html上一篇: 为什么这个正则表达式不贪婪?
下一篇: RegEx重叠字符串