正则表达式:从Copy到手写

1. RegExp对象 JavaScript有两种方式实例化RegExp对象javascript 字面量 构造函数 字面量 const reg = /all/; console.log(reg); // /all/ 'This is all I have.'.replace(reg, 'ALL'); // This is ALL I have. 构造函数 const reg = new
相关文章
相关标签/搜索