以下是我正在寻找的一些例子.
JS:
@H_404_5@'foo bar baz'.match(/^[\s\S]+?(?=baz|$)/);蟒蛇:
@H_404_5@re.match('^[\s\S]+?(?=baz|$)','foo bar baz')>注意:两个例子都匹配’foo bar’
非常感谢.
以下是我正在寻找的一些例子.
JS:
@H_404_5@'foo bar baz'.match(/^[\s\S]+?(?=baz|$)/);蟒蛇:
@H_404_5@re.match('^[\s\S]+?(?=baz|$)','foo bar baz')>注意:两个例子都匹配’foo bar’
非常感谢.
(?=re)
before text matchingre
(NOT SUPPORTED)
此外,从WhyRE2开始:
As a matter of principle,RE2 does not support constructs for which only backtracking solutions are known to exist. Thus,backreferences and look-around assertions are not supported.