mr-regex

Crates.iomr-regex
lib.rsmr-regex
version0.1.0
sourcesrc
created_at2021-01-12 01:24:46.960035
updated_at2021-01-12 01:24:46.960035
descriptionMinimalist ASCII Regex-engine with 300 lines of Rust
homepage
repositoryhttps://github.com/MnO2/mr-regex
max_upload_size
id340648
size23,481
Paul Meng (MnO2)

documentation

README

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())
Commit count: 9

cargo fmt