3.0.0 • Published 4 years ago

execall v3.0.0

Weekly downloads
2,439,343
License
MIT
Repository
github
Last release
4 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-parserdfeuk-frontenddfeuk-frontend-manualmakreostylelint-processor-arbitrary-tagsstylelint-processor-jekylluimotweeter-client@0x6b/textlint-rule-normalize-whitespaces128981semzub@bolt-app/gatsby-source-wordpress-experimental@decisiv/styled-components-static-styleszubtesttodayvue-translation-managervue3-marktext@lofcz/sweetalert2-neutral@leetcode/stylelint@magecom/gatsby-source-wordpress-experimental-fork-media-items-fix@muyajs/core@mapbox/stylelint-processor-arbitrary-tags@mapbox/eslint-plugin-script-tags@marktext/muya@nhatnguyenqn/stop-tabs@fabwcie/ckeditor5-preview@jser/post-parser@progital/gatsby-source-wordpress-experimental@sbaldwin24/stylelint-config@phmu/gatsby-source-wordpress-experimental@pixel-point/gatsby-source-wordpress@pixel-point/gatsby-source-wordpress-experimental@oriduk/ckeditor5-rebuild-oriduk@oriduk/ckeditor5-rebuild-musicanote@parkcedar/leaflet@silver0542/directus-extension-cma-components-editor@silencerweb/gatsby-source-wordpress-experimentalpatreon-list-scrapingparse-helpparse-columnsnode-novelpostcss-external-varsqmk-premapsindresorhus.jsiconfont-dlhtml-gethengistgw2e-scrapingmarkdown-block-editorkill-tabskill-chromekilltabsmeditmemocast-fork@throttleup/gatsby-source-wordpress@types/execall@validatem-f0x/core@validatem/core@zalastax/nolb-exechrome-killercleanup-svg-iconscli-beltckeditor5-build-classic-ticketckeditor5-build-classic-v-editcross-scriptdelenitiveritatiscss-urlsdelverybase-editorec0lint-cssec0lint-styleec0lint-style-config-postcsseslint-plugin-fest-tagseslint-plugin-script-tagsfetch-youtube-uploadsfacilitatorgatsby-source-wordpressgatsby-source-wordpress-experimental
3.0.0

4 years ago

2.0.0

6 years ago

1.0.0

10 years ago