-
Notifications
You must be signed in to change notification settings - Fork 243
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
zeroOrMore() and oneOrMore() do not generat correct results #36
Comments
|
You shouldn't remove current behaviour because this is expected. Just add alias that can return already grouped value. What for we should have 2 |
IMHO this is wrong. That |
|
The expression:
regex().add("Java").zeroOrMore().build();
should generate the regex:
/(?:Java)*/
, just as the expression:regex().maybe("Java").build();
generates the regex:
/(?:Java)?/
. However, the first expression actually generates the regex:/Java*/
, which is not correct. TheoneOrMore()
method suffers from the similar problem.I propose to change both
zeroOrMore()
andoneOrMore()
to accept a string, much as themaybe()
method does so it can return the correct result.The text was updated successfully, but these errors were encountered: