To some string S, we will perform some replacement operations that replace groups of letters with new ones (not necessarily the same size). Each replacement operation has 3 parameters: a starting index i, a source word x and a target word y. The rul…
正则表达式对象常用方法 test() 检索字符串中指定的值.返回 true 或 false. var str="Embrace You" var r1=/you/i.test(str)//i 忽略大小写 console.log(r1)//true 支持正则表达式的String对象的方法 split() 可以将一个字符串拆分为一个数组 方法中可以传递一个正则表达式作为参数,这样方法将会根据正则表达式去拆分字符串 var str="1a2B3d4g5c6" var re…