javascript字符串常用api使用匯總(二) 本文講述所有能使用正則的字符串api search replace replaceAll split match search 按正則搜索字符串 這個api使用很簡單,就是搜索字符串中符合規則的字符的開頭索引 const rex = /\w+/ const str = 'abc123321' console.log(st