美文网首页
关于正则表达式的test match exec replace方

关于正则表达式的test match exec replace方

作者: hha123 | 来源:发表于2018-07-15 14:19 被阅读0次

先说这四个方法,语法解析部分后期补上

test match exec replace的区别如下

test match exec replace的区别

match和exec方法的区别

match和exec方法的区别

let reg2=/\bx=(\d+)\b/;let str2 = 'x=5';console.log(str2.match(reg2))

let reg4=/\bx=(\d+)\b/;let str4 = 'x=5';console.log(str4.match(reg4))

下面将一下正则表达式的语法

相关文章

网友评论

      本文标题:关于正则表达式的test match exec replace方

      本文链接:https://www.haomeiwen.com/subject/pojppftx.html