1、案例1
1)通匹符转成正测
'product-service-*.html'.replace(/./g, '\.').replace(/*/g, '.*')
2)正则匹配
reg = new RegExp('product-service-.*.html', 'i')
reg.test('product-service-findcm.html')
1、案例1
1)通匹符转成正测
'product-service-*.html'.replace(/./g, '\.').replace(/*/g, '.*')
2)正则匹配
reg = new RegExp('product-service-.*.html', 'i')
reg.test('product-service-findcm.html')