javaScript中的正则写入格式 第一种方式: var patt = new RegExp("正则表达式")第二种方式: var patt = /正则表达式/验证方法: patt.test("内容")