# regexp

> Regex Parser

Latest version **1.0.0** (published 2013-08-07) · MIT license · 0 weekly downloads

## Install

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

## 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.0 |
| Published | 2013-08-07 |
| First published | 2013-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | ForbesLindesay |
| Maintainers | forbeslindesay |

## Links

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

## Recent versions

- 1.0.0 (latest) — 2013-08-07
- 0.0.6 — 2013-08-06
- 0.0.5 — 2013-08-06
- 0.0.4 — 2013-08-06
- 0.0.3 — 2013-08-06
- 0.0.2 — 2013-07-21
- 0.0.1 — 2013-07-21

## README

# regexp

Regex parser based on descriptions in http://www.javascriptkit.com/javatutors/redev2.shtml

[![Build Status](https://travis-ci.org/ForbesLindesay/regexp.png?branch=master)](https://travis-ci.org/ForbesLindesay/regexp)
[![Dependency Status](https://gemnasium.com/ForbesLindesay/regexp.png)](https://gemnasium.com/ForbesLindesay/regexp)
[![NPM version](https://badge.fury.io/js/regexp.png)](http://badge.fury.io/js/regexp)

## Installation

    npm install regexp

## Usage

```js
var regexp = require('regexp')
var res = regexp('[a-z]+')
assert.deepEqual(res, { type: 'match',
  offset: 0,
  text: '[a-z]+',
  body:
   [ { type: 'quantified',
       offset: 0,
       text: '[a-z]+',
       body:
        { type: 'charset',
          offset: 0,
          text: '[a-z]',
          invert: false,
          body:
           [ { type: 'range',
               offset: 1,
               text: 'a-z',
               start: 'a',
               end: 'z' } ] },
       quantifier:
        { type: 'quantifier',
          offset: 5,
          text: '+',
          min: 1,
          max: Infinity,
          greedy: true } } ] })
```

## Contributing

To run tests:

```console
$ npm install
$ npm test
```

This will also automatically compile `index.js`.

The key source files are `src/grammer.pegjs` which is compiled using [pegjs](http://pegjs.majda.cz/) and `src/index.js` which is a CommonJS module with a special additional pseudo `import` statement.

## License

  MIT

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