3.0.0 • Published 5 years ago

execall v3.0.0

Weekly downloads
2,439,343
License
MIT
Repository
github
Last release
5 years ago

execall

Find multiple RegExp matches in a string

Instead of having to iterate over RegExp#exec, immutable, and with a nicer result format.

Install

$ npm install execall

Usage

import execAll from 'execall';

execAll(/(\d+)/g, '$200 and $400');
/*
[
	{
		match: '200',
		subMatches: ['200'],
		index: 1
	},
	{
		match: '400',
		subMatches: ['400'],
		index: 10
	}
]
*/

API

execAll(regexp, string)

Returns an object[] with a match, sub-matches, and index.

regexp

Type: RegExp

Regular expression to match against the string.

string

Type: string

Related

@everything-registry/sub-chunk-1627temporary-mailwiz-react-markdown-editorwafrtex-lintvocabulary-recommendervscode-test-set-contentaodownjser-item-category-parsericonfont-dlhtml-gethengistgw2e-scrapingmarkdown-block-editorkill-tabskill-chromekilltabsmeditmemocast-fork@throttleup/gatsby-source-wordpress@types/execall@validatem-f0x/core@validatem/core@zalastax/nolb-exedfeuk-frontenddfeuk-frontend-manualmakreostylelint-processor-arbitrary-tagsstylelint-processor-jekylluimotweeter-clientzubtesttodayvue-translation-managervue3-marktext@lofcz/sweetalert2-neutral@leetcode/stylelint@nhatnguyenqn/stop-tabspatreon-list-scrapingparse-helpparse-columnsnode-novelpostcss-external-varsqmk-premapsindresorhus.js@parkcedar/leaflet@nuykon/vue-translation-manager@oriduk/ckeditor5-rebuild-musicanote@oriduk/ckeditor5-rebuild-oriduk@fabwcie/ckeditor5-preview@pixel-point/gatsby-source-wordpress@phmu/gatsby-source-wordpress-experimental@pixel-point/gatsby-source-wordpress-experimentalgatsby-source-wordpressgatsby-source-wordpress-experimentalec0lint-cssec0lint-styleec0lint-style-config-postcsseslint-plugin-fest-tagseslint-plugin-script-tagsfetch-youtube-uploadsfacilitator128981semzub@0x6b/textlint-rule-normalize-whitespaces@progital/gatsby-source-wordpress-experimental@bolt-app/gatsby-source-wordpress-experimentalchrome-killercleanup-svg-iconscli-beltckeditor5-build-classic-ticketckeditor5-build-classic-v-editcross-scriptdelenitiveritatiscss-urlsdelverybase-editor@arpitjp/muyajs__core@jser/post-parser@sbaldwin24/stylelint-config@muyajs/core@decisiv/styled-components-static-styles@magecom/gatsby-source-wordpress-experimental-fork-media-items-fix@mapbox/stylelint-processor-arbitrary-tags@mapbox/eslint-plugin-script-tags@marktext/muya@silver0542/directus-extension-cma-components-editor@silencerweb/gatsby-source-wordpress-experimental
3.0.0

5 years ago

2.0.0

7 years ago

1.0.0

10 years ago