V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
timqian
V2EX  ›  JavaScript

reg-match-arr: Find regExp matched item array of given string

  •  
  •   timqian · 2016-06-02 22:49:21 +08:00 · 1662 次点击
    这是一个创建于 2889 天前的主题,其中的信息可能已经有所发展或是发生改变。

    install

    $ npm i reg-match-arr
    

    usage example:

    import regMatchArr from 'reg-match-arr'
    const str = 'hi, i am timqian, 600, 564, 112'
    const regExp = /(\d{3})(,)/ig
    regMatchArr(str, regExp) // [ [ '600', ',' ], [ '564', ',' ] ] 
    

    github repo

    npm addr

    用到的 es6/7-npm-package-starter

    https://github.com/ProjecToday/npm-starter

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2478 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 13:28 · PVG 21:28 · LAX 06:28 · JFK 09:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.