Skip to content
/ mr-regex Public

Minimalist ASCII Regex-engine with 300 lines of Rust

License

Notifications You must be signed in to change notification settings

MnO2/mr-regex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mr-regex: Minimalist ASCII Regex-engine with 300 lines of Rust

Build Status

  • This library compiles regex to NFA and then runs a DFS to search for the match
  • It only supports ascii strings.
  • Less than 300 lines of safe Rust.

Examples

You can use a convience one line match function.

regex_match("(zz)+", "zz")

Or a more formal interface

let r = Regex::new("(zz)+".as_bytes()).unwrap();
r.is_match("zz".as_bytes())

About

Minimalist ASCII Regex-engine with 300 lines of Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages