Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afeiship/next-match
Math groups with next.
https://github.com/afeiship/next-match
exec group jswork match next nx string
Last synced: 20 days ago
JSON representation
Math groups with next.
- Host: GitHub
- URL: https://github.com/afeiship/next-match
- Owner: afeiship
- License: mit
- Created: 2021-01-13T05:13:57.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-13T05:33:02.000Z (almost 4 years ago)
- Last Synced: 2024-10-28T07:22:36.571Z (2 months ago)
- Topics: exec, group, jswork, match, next, nx, string
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-match
> Math groups with next.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```bash
npm install -S @jswork/next-match
```## usage
```js
import '@jswork/next-match';const str = '/api/v1/{id}/{uuid}/{a.b}';
const regexp = /{(.*?)}/g;nx.match(str, regexp, 0); // [ '{id}', '{uuid}', '{a.b}' ]
nx.match(str, regexp, 1); // ['id', 'uuid', 'a.b']
```## resources
- https://stackoverflow.com/questions/432493/how-do-you-access-the-matched-groups-in-a-javascript-regular-expression## license
Code released under [the MIT license](https://github.com/afeiship/next-match/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/next-match
[version-url]: https://npmjs.org/package/@jswork/next-match[license-image]: https://img.shields.io/npm/l/@jswork/next-match
[license-url]: https://github.com/afeiship/next-match/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-match
[size-url]: https://github.com/afeiship/next-match/blob/master/dist/next-match.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/next-match
[download-url]: https://www.npmjs.com/package/@jswork/next-match