Skip to content

dwnusbaum/regex-derivatives

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

regex-derivatives

Simple regex engine written in Haskell.

Instead of using backtracking or finite automata to match strings, it uses derivatives. The idea and algorithm are taken from a blog post by Matt Might.

Installation

git clone https://github.com/dwnusbaum/regex-derivatives.git
cd regex-derivatives
cabal update && cabal install

Use

regex '[abc]*d?' '123aaacbccbd'
regex 'Str..' "$(cat ./Main.hs)"

The output is colored like the output of ag.

About

Simple regex matcher that uses derivatives to match strings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published