1 unstable release
0.1.0 | Jan 12, 2021 |
---|
#1915 in Text processing
11KB
263 lines
mr-regex: Minimalist ASCII Regex-engine with 300 lines of Rust
- 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())
Dependencies
~30KB