V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
timqian
10.02D

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

  •  
  •   timqian · Jun 2, 2016 · 2209 views
    This topic created in 3629 days ago, the information mentioned may be changed or developed.

    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

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5747 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 06:54 · PVG 14:54 · LAX 23:54 · JFK 02:54
    ♥ Do have faith in what you're doing.