@match

Stories List
@alfred_5972f8006661f

正則表達式踩坑

1、正則表達式 只要加了 /g 屬性,在執行 RegExp 的 api 時,都需要注意 reg.lastIndex 屬性值的變化 RegExp.exec(string) 一個指定字符串中執行一個搜索匹配 exec(string): array || null 參數 string 返回值 匹配成功 返回一個數組,此數組的第 0 個元素是與正則表達式相匹配的文本,第 1 個元素是

alfred_5972f8006661f Avatar

@alfred_5972f8006661f

Nickname 前端熟練工