cpp_regexp 0.3.0

cpp std::regex
docs.rs failed to build cpp_regexp-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: cpp_regexp-0.6.1

cpp std::regex

  • test
  • replace
  • match
  • match_all
use cpp_regexp::{RegExp,Config};
assert!(RegExp::new("^hello$",Default::default()).unwrap().test("hello").unwrap());
let config = Config{
icase:true,
..Default::default()
};
let mut regex = RegExp::new("hello",config).unwrap();
assert!(regex.test("hellO").unwrap());
assert!(RegExp::new("^(((hello$",config).is_err());
assert!(regex.replace("hello world","good").unwrap()=="good world");