escape-regex 1.0.0

Escape regular expression special characters.
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 12.21 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • magiclen
escape-regex-1.0.0 has been yanked.

Escape Regex

Build Status Build status

Escape regular expression special characters in order to make it able to be concatenated safely by users.

Example

extern crate escape_regex;

extern crate regex;

use regex::Regex;

let pattern = "123*456";
let escaped_pattern = escape_regex::escape_string(pattern);

let reg = Regex::new(&escaped_pattern).unwrap();

assert_eq!(true, reg.is_match("0123*4567"));

Crates.io

https://crates.io/crates/escape-regex

Documentation

https://docs.rs/escape-regex

License

MIT