Skip to content

spencertipping/caterwaul-regexp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A library to construct parse trees from Javascript regular expressions. You can
use it to figure out things about the kinds of strings that will match; for
instance:

> caterwaul.regexp(/foo(bar)?\w+/).structure()
'("," ("," foo ("?" ("(" bar))) ("+" \w))'
> caterwaul.regexp(/foo(bar)\1+(?!bif)/).minimum_length()
9
>

Like most Caterwaul parsers, this one returns instances of Caterwaul syntax
trees. The main difference is that these trees have regexp-specific methods.

About

A regular expression parser for Caterwaul

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published