What version of regex are you using?
1.12.3
Describe the bug at a high level.
The reverse suffix strategy doesn't return the leftmost match first when the first alternate overlaps with the second alternate.
What are the steps to reproduce the behavior?
use regex; // 1.12.3
fn main() {
let r = regex::Regex::new(".abb|b").unwrap();
let m = r.find("zabb").unwrap();
assert_eq!(m.as_str(), "zabb")
}
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=2273db01d4564806836a207fb7af5c52
What is the actual behavior?
The first match is "b".
What is the expected behavior?
The first match should be the leftmost match, "zabb".
What version of regex are you using?
1.12.3
Describe the bug at a high level.
The reverse suffix strategy doesn't return the leftmost match first when the first alternate overlaps with the second alternate.
What are the steps to reproduce the behavior?
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=2273db01d4564806836a207fb7af5c52
What is the actual behavior?
The first match is "b".
What is the expected behavior?
The first match should be the leftmost match, "zabb".