Skip to content

Latest commit

 

History

History
executable file
·
21 lines (13 loc) · 616 Bytes

README.md

File metadata and controls

executable file
·
21 lines (13 loc) · 616 Bytes

Reregex, yet another minimal regex implementation

Many standard regex features are supported, such as non-greedy matching (e.g. .*?), character set ranges ([a-z]), alternations ((a|bb)+), and graphviz dot-formatted NFA-like diagrams.

Capture groups, Lookarounds and Unicode-aware features are not supported. The engine ins't particularly fast either.

Example: Visualize regex

cargo run --example dot -- '-?([1-9][0-9]*)?[13579]' > odd.dot
dot -Tpng odd.dot > odd.png

Visualization

Example: Grep

cat README.md | cargo run --example grep -- '`[^`]+`'