正则表达式或 regex 用于匹配字符串的各个部分。下面是创建的 正则表达式 的备忘单。 测试正则表达式 使用该.test()方法 let testString = "My test string"; let testRegex = /string/; testRegex.test(testString); 复制代码 测试多项匹配 使用OR运算符(|) const regex ...
正则表达式或 regex 用于匹配字符串的各个部分。下面是创建的 正则表达式 的备忘单。 测试正则表达式 使用该.test()方法 let testString = "My test string"; let testRegex = /string/; testRegex.test(testString); 复制代码 测试多项匹配 使用OR运算符(|) const regex ...