JS RegExp 正则 使用

46 阅读1分钟

语法

var patt=new RegExp(pattern,modifiers);
或更简单的方法
var patt=/pattern/modifiers;