3.0.0 • Published 3 years ago

execall v3.0.0

Weekly downloads
2,439,343
License
MIT
Repository
github
Last release
3 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-1627facilitatorfetch-youtube-uploadseslint-plugin-script-tagseslint-plugin-fest-tagsiconfont-dlhtml-getec0lint-styleec0lint-style-config-postcssec0lint-css@fabwcie/ckeditor5-previewgw2e-scrapinghengistgatsby-source-wordpress-experimentalgatsby-source-wordpressjser-item-category-parserkill-chromekilltabskill-tabsparse-columnsparse-helppatreon-list-scrapingnode-novelmakreomarkdown-block-editormemocast-forkmeditqmk-premappostcss-external-vars@textlint-rule/textlint-rule-no-invalid-control-charactercleanup-svg-iconschrome-killertemporary-mailckeditor5-build-classic-ticketckeditor5-build-classic-v-edittex-lintcli-beltstylelint-processor-arbitrary-tagsstylelint-processor-jekyll@0x6b/textlint-rule-normalize-whitespaces@bolt-app/gatsby-source-wordpress-experimentaluimobase-editoraodownsindresorhus.js@zalastax/nolb-exetweeter-clientcross-scriptcss-urlsdelenitiveritatisdelverydfeuk-frontenddfeuk-frontend-manualvscode-test-set-contentvue-translation-manager@decisiv/styled-components-static-stylesvocabulary-recommender@leetcode/stylelint@nhatnguyenqn/stop-tabs@lofcz/sweetalert2-neutral@parkcedar/leaflet@muyajs/corewafrwiz-react-markdown-editor@jser/post-parser@oriduk/ckeditor5-rebuild-musicanote@oriduk/ckeditor5-rebuild-oriduk@sbaldwin24/stylelint-config@phmu/gatsby-source-wordpress-experimental@throttleup/gatsby-source-wordpress@magecom/gatsby-source-wordpress-experimental-fork-media-items-fixvue3-marktext@mapbox/eslint-plugin-script-tags@marktext/muya@mapbox/stylelint-processor-arbitrary-tags@validatem-f0x/core@validatem/core@pixel-point/gatsby-source-wordpress@pixel-point/gatsby-source-wordpress-experimental@silencerweb/gatsby-source-wordpress-experimental@silver0542/directus-extension-cma-components-editor@types/execall@progital/gatsby-source-wordpress-experimental
3.0.0

3 years ago

2.0.0

5 years ago

1.0.0

9 years ago