# regexp.execall

> Array of RegExp.prototype.exec results

Latest version **1.0.2** (published 2015-06-23) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-06-23 |
| First published | 2014-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Eugene Sharygin |
| Maintainers | eush77 |
| Keywords | regex, regexp, re, regular, expression, exec, match, matches, execall, all, find, findall, immutable, string, str, multiple, many, global |

## Links

- npm: https://www.npmjs.com/package/regexp.execall
- Repository: https://github.com/eush77/regexp.execall
- Issues: https://github.com/eush77/regexp.execall/issues
- npm.io page: https://npm.io/package/regexp.execall

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2015-06-23
- 1.0.1 — 2015-06-23
- 1.0.0 — 2015-06-18
- 0.1.1 — 2015-05-17
- 0.1.0 — 2014-10-17

## README

# regexp.execall [![Build Status][travis-badge]][travis] [![Dependency Status][david-badge]][david]

[![npm](https://nodei.co/npm/regexp.execall.png)](https://nodei.co/npm/regexp.execall/)

[travis-badge]: https://travis-ci.org/eush77/regexp.execall.svg
[travis]: https://travis-ci.org/eush77/regexp.execall
[david-badge]: https://david-dm.org/eush77/regexp.execall.png
[david]: https://david-dm.org/eush77/regexp.execall

Applies [`RegExp.prototype.exec`][exec] iteratively. Returns array of matches.

No fancy custom return format to learn.

## Example

```js
var execAll = require('regexp.execall');

execAll(/\w+/g, 'foo bar')
//=> [ [ 'foo', index: 0, input: 'foo bar' ],
//     [ 'bar', index: 4, input: 'foo bar' ] ]
```

Subgroups are handled just as you expect:

```js
execAll(/\$(\d+)/g, '$200 and $400')
//=> [ [ '$200', '200', index: 0, input: '$200 and $400' ],
//     [ '$400', '400', index: 9, input: '$200 and $400' ] ]
```

## API

### execAll(regexp, string)


Returns array of matches in the exact format of [`RegExp.prototype.exec`][exec]. If `regexp` is non-global, the resulting array contains either one or zero elements.

It is basically equivalent to the following snippet:

```js
var matches = [], match;

while ((match = regexp.exec(string)) != null) {
  matches.push(match);
}
```

[exec]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec

## Install

```
npm install regexp.execall
```

## License

MIT

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