nfa_regex 1.0.1

Simple NFA regex engine for text processing.
Documentation
  • Coverage
  • 100%
    9 out of 9 items documented7 out of 8 items with examples
  • Size
  • Source code size: 88.22 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.19 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • ashutost/rust_nfa_regex
    1 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ashgamer10

nfa_regex

Simple non finite automata regular expression (NFA regex) engine.

Usage

Add this to your Cargo.toml:

[dependencies]
nfa_regex = "1.0.0"

Add this to your crate root:

extern crate nfa_regex;

E.g. Create regex variable to match numeric type:

let mut r = nfa_regex::Regex::new("[\\+\\-]?[0-9]+(\\.[0-9]+)?([eE][\\+\\-]?[0-9]+)?").unwrap();
assert_eq!(r.match_pattern("-2.6e-6"), true);
assert_eq!(r.search_pattern_and_get_slice("pi = 3.141593, etc."), ("pi = ", "3.141593", ", etc."));

Features

Supported regex operators:

Repeatition: +, *, ?, {m,n}
Or:          |
Not:         ^ (only used inside '[]')
Escape:      \
Bracket:     []
Grouping:    ()

Functions:

  • Match pattern to input string.
  • Search pattern into input string.
  • Replace pattern found into input string.

Releases

See RELEASES.md

Compatibility

The nfa_regex crate is created and tested with rustc 1.51.0 and greater.

License

Licensed under

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed under Apache-2.0, without any additional terms or conditions.