零宽断言表示匹配字符的时候再添加一些定位条件,使匹配更精准。
w+(?=ing)
ing
w+(?!ing)
(?<=re)w+
re
(?<!re)w+
(?<=s)d+(?=s)
本文参考:https://www.w3cschool.cn/rxoyts/l17fcozt.html