📜  正则表达式 exec 返回 null - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:26.904000             🧑  作者: Mango

代码示例1
// When 'g' flag is set, regex remembers last search index. 
// Before next search need to reset it, otherwise search will return null

re.lastIndex=0;