https://github.com/danielberndt/match-all
return all regexp-match objects for a string
https://github.com/danielberndt/match-all
Last synced: 4 months ago
JSON representation
return all regexp-match objects for a string
- Host: GitHub
- URL: https://github.com/danielberndt/match-all
- Owner: danielberndt
- Created: 2018-01-08T12:48:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-08T12:52:15.000Z (over 7 years ago)
- Last Synced: 2025-02-20T19:47:17.679Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# match-all
return all regexp-match objects for a string
## install
```
npm i @danielberndt/match-all;
```## usage:
```javascript
import matchAll from "@danielberndt/match-all";const matches = matchAll("f:1 o:2 o:3", /\w:(\d+)/);
console.log(matches.length); // -> 3
console.log(matches[0][1]); // -> '1'
```