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

Wrong match when minimum value is omitted in repeating qualifier #62

Closed
etienne-s opened this issue Oct 29, 2017 · 1 comment · Fixed by #98
Closed

Wrong match when minimum value is omitted in repeating qualifier #62

etienne-s opened this issue Oct 29, 2017 · 1 comment · Fixed by #98

Comments

@etienne-s
Copy link

Using R:

grepl("ab{,2}c", "abbbc")
# [1] TRUE

I would expect either FALSE or an "invalid regex" error.

More details can be found in my original Stack Overflow question.

@gdavidbutler
Copy link

The documentation here indicates a missing lower bound is not expected. To return an error change lib/tre-parse.c line 631 to:
if (max >= 0 && (min < 0 || min > max || max > RE_DUP_MAX))

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

Successfully merging a pull request may close this issue.

2 participants