0.0.7 • Published 6 years ago

@hon2a/get-regexp-matches v0.0.7

Weekly downloads
150
License
MIT
Repository
github
Last release
6 years ago

get-regexp-matches

Execute a regular expression on a string until all matches are found and return them.

Use

Install using

npm install @hon2a/get-regexp-matches

Use with a regular expression with the "global" flag set to get all matches

import { getRegexpMatches } from '@hon2a/get-regexp-matches'

const regExp = /ab/g
const text = 'aab abbbab'
getRegexpMatches(regExp, text)
// returns array yielded by repeatedly running `regExp.exec(text)` until exhausted

Development

Install

Install dependencies using:

npm install

Develop

After you modify sources, run the following (or set up your IDE to do it for you):

  • format the code using npm run format
  • lint it using npm run lint
  • test it using npm test

and fix the errors, if there are any.

Publish

Publishing is done in two steps:

  1. Create a new version tag and push it to the repository:
    npm version <patch|minor|major>
    git push --follow-tags
  2. Build and publish the new version as a npm package:
    npm publish --access public
0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

7 years ago