[关闭]
@Belinda 2015-04-23T02:51:20.000000Z 字数 413 阅读 1170

正则表达式

实习笔记


RegExp 对象用于规定在文本中检索额内容。

var patt1=new RegExp("e");

document.write(patt1.test("The best things in life are free"));

patt1.compile("d");

document.write(patt1.test("The best things in life are free"));

由于字符串中存在 "e",而没有 "d",以上代码的输出是:

邮箱验证正则表达式

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注