# execall

> Find multiple RegExp matches in a string

Latest version **3.0.0** (published 2021-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install execall
pnpm add execall
yarn add execall
bun add execall
```

## Health

**Score 43/100 (D)** — status: abandoned.

Positive: has types package; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2021-04-08 |
| First published | 2015-05-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/execall) |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 1 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 90 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | regex, regexp, regular, expression, exec, match, matches, execall, all, find, findall, immutable, string, multiple, many, global |

## Links

- npm: https://www.npmjs.com/package/execall
- Repository: https://github.com/sindresorhus/execall
- Homepage: https://github.com/sindresorhus/execall#readme
- Issues: https://github.com/sindresorhus/execall/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/execall

## Dependencies (1)

- [clone-regexp](https://npm.io/package/clone-regexp.md) ^3.0.0

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 3.0.0 (latest) — 2021-04-08
- 2.0.0 — 2019-04-18
- 1.0.0 — 2015-05-31

## README

# 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

```js
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

- [replace-string](https://github.com/sindresorhus/replace-string) - Replace all substring matches in a string

---
_Source: https://npm.io/package/execall · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
