返回

Pratice1

demo

"width-8 width-10 -width-5 width-15.6 width-20-"
// 在不修改字符串的情况下匹配"width-8"、"width-10"、"width-15.6"

answer: /((?<=^)|(?<=\s))width-\d+(?:\.\d+)?((?=$)|(?=\s))/ig