regexp.execall:迭代地应用RegExp.exec。 标准RegExp接口缺少的一部分

时间:2021-04-30 22:09:09
【文件属性】:
文件名称:regexp.execall:迭代地应用RegExp.exec。 标准RegExp接口缺少的一部分
文件大小:4KB
文件格式:ZIP
更新时间:2021-04-30 22:09:09
JavaScript regexp.exe调用 迭代地应用 。 返回匹配项数组。 没有花哨的自定义返回格式来学习。 例子 var execAll = require ( 'regexp.execall' ) ; execAll ( / \w + / g , 'foo bar' ) //=> [ [ 'foo', index: 0, input: 'foo bar' ], // [ 'bar', index: 4, input: 'foo bar' ] ] 子组的处理与您期望的一样: execAll ( / \$ ( \d + ) / g , '$200 and $400' ) //=> [ [ '$200', '200', index: 0, input: '$200 and $400' ], // [ '$400', '400', index: 9, input: '$200 and
【文件预览】:
regexp.execall-master
----.gitignore(14B)
----package.json(871B)
----.travis.yml(38B)
----LICENSE(1KB)
----index.js(320B)
----README.md(1KB)
----.npmignore(7B)
----test()
--------test.js(1KB)

网友评论