Closed
Description
Compiled with regex 0.2.1
println!("{:?}", RegexSet::new(&[r"^rooted$"]).unwrap().matches("notrooted"));
println!("{:?}", RegexSet::new(&[r"^rooted$", r".log$"]).unwrap().matches("notrooted"));
println!("{:?}", RegexSet::new(&[r"^rooted$", r"\.log$"]).unwrap().matches("notrooted"));
println!("{:?}", RegexSet::new(&[r"^rooted$", r"\.log$"]).unwrap().matches("notrootedend"));
Output:
SetMatches { matched_any: false, matches: [false] }
SetMatches { matched_any: false, matches: [false, false] }
SetMatches { matched_any: true, matches: [true, false] }
SetMatches { matched_any: false, matches: [false, false] }
Activity
[-]RegexSet don't respect the ^ anchor[/-][+]RegexSet doesn't respect the ^ anchor[/+]RegexSet: fix literal optimization bug
BurntSushi commentedon May 20, 2017
This is a literal optimization bug.
Auto merge of #370 - BurntSushi:ag-fix-358, r=BurntSushi