#regex #ascii #line #minimalist #string #df #regex-engine

mr-regex

Minimalist ASCII Regex-engine with 300 lines of Rust

1 unstable release

0.1.0 Jan 12, 2021

#1976 in Text processing

Apache-2.0 OR BSD-3-Clause

11KB
263 lines

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())

Dependencies

~30KB