An open API service indexing awesome lists of open source software.

https://github.com/springcomp/iregexp

I-Regexp checker
https://github.com/springcomp/iregexp

Last synced: 5 months ago
JSON representation

I-Regexp checker

Awesome Lists containing this project

README

          

# I-Regexp Checker

IRegexpChecker is pushdown automaton that very quickly determines if a
regular expression using a specified interoperable subset is
syntactically correct.

It supports the [I-Regexp](https://ietf-wg-jsonpath.github.io/iregexp/draft-ietf-jsonpath-iregexp.html) specification.

## Building

```sh
npm install && npx jest --coverage
```

## Usage

```js
import iregexp from '@springcomp/iregexp';

const regex = second as string;
try{
iregexp.ensureExpression(regex);
}
catch (err) {
...
}
```

## Known limitations

This currently fails to check the following expressions as invalid:

- `` [z-a] ``: reversed range.
- `` a{9,3} ``:reversed min/max quantities.