Closed
Description
AFAICS regex::RegexBuilder
does not incorporate flags into the string representation of the final regex.
let re = regex::RegexBuilder::new("foo").case_insensitive(true).compile().unwrap();
assert_eq!(re.as_str(), "(?i)foo");
panics because "foo" != "(?i)foo"
.
Am I confused about something here? Otherwise this should at least be documented :-)