Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matching fails if there are more than 10 OR's ( | symbol ) in the regex #191

Closed
jonimake opened this issue Mar 28, 2016 · 1 comment
Closed

Comments

@jonimake
Copy link

Not much else to say. The following piece of code will fail:
assert!(Regex::new(r"1|2|3|4|5|6|7|8|9|10|int").unwrap().is_match("int")); //fails

While this won't:
assert!(Regex::new(r"1|2|3|4|5|6|7|8|9|int").unwrap().is_match("int"));

Edit: this is with 0.1.58 and rust 1.7

BurntSushi added a commit that referenced this issue Mar 28, 2016
@BurntSushi
Copy link
Member

This was fixed in my literal detection refactor: 31a317e

I added a regression test in: 49577de

The old code was detecting the following as prefixes: '1', '2', '3', '4', '5', '6', '7', '8', '9'. Which is wrong, because it doesn't include int.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants