# regjsparser

> Parsing the JavaScript's RegExp in JavaScript.

Latest version **0.13.2** (published 2026-06-13) · BSD-2-Clause license · 0 weekly downloads

## Install

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

Provides the command `regjsparser`.

## Health

**Score 60/100 (C)** — status: active.

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

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.13.2 |
| Published | 2026-06-13 |
| First published | 2013-11-03 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 71.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 84 |
| Author | 'Julian Viereck' |
| Maintainers | jviereck |

## Links

- npm: https://www.npmjs.com/package/regjsparser
- Repository: https://github.com/jviereck/regjsparser
- Issues: https://github.com/jviereck/regjsparser/issues
- npm.io page: https://npm.io/package/regjsparser

## Dependencies (1)

- [jsesc](https://npm.io/package/jsesc.md) ~3.1.0

## Recent versions

- 0.13.2 (latest) — 2026-06-13
- 0.13.1 — 2026-04-04
- 0.13.0 — 2025-09-21
- 0.12.0 — 2024-10-30
- 0.11.2 — 2024-10-27
- 0.11.1 — 2024-10-05
- 0.11.0 — 2024-09-18
- 0.10.0 — 2023-03-13
- 0.9.1 — 2022-07-09
- 0.9.0 — 2022-06-26
- 0.8.4 — 2022-02-02
- 0.8.3 — 2021-12-23
- 0.8.2 — 2021-12-14
- 0.8.1 — 2021-12-09
- 0.8.0 — 2021-12-08
- … 25 more at https://npm.io/package/regjsparser/versions

## README

# RegJSParser

Parsing the JavaScript's RegExp in JavaScript.

## Installation

```bash
npm install regjsparser
```

## Usage

```js
var parse = require('regjsparser').parse;

var parseTree = parse('^a'); // /^a/
console.log(parseTree);

// Toggle on/off additional features:
var parseTree = parse('^a', '', {
  // SEE: https://github.com/jviereck/regjsparser/pull/78
  unicodePropertyEscape: true,

  // SEE: https://github.com/jviereck/regjsparser/pull/83
  namedGroups: true,

  // SEE: https://github.com/jviereck/regjsparser/pull/89
  lookbehind: true
});
console.log(parseTree);
```

## Testing

To run the tests, run the following command:

```bash
npm test
```

To create a new reference file, execute…

```bash
node test/update-fixtures.js
```

…from the repo top directory.

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