JavaScript正则式练习

使用正则式匹配第一个数字和最后一个数字,使用环视

str2 = 09051 : Fast Food Restaurants - Concession Stands/Snack Bars Delicatessens and Sandwich Shops Donut Shops : 722213 (5812)

python java中直接搞定

reg=/(?<=()d+(?=))/
str2.match(reg)

javascript不支持逆环视...

测试后发现js不支持

原文地址:https://www.cnblogs.com/wancy86/p/6706661.html