Open
Description
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. The oneOrMore()
method suffers from the similar problem.
I propose to change both zeroOrMore()
and oneOrMore()
to accept a string, much as the maybe()
method does so it can return the correct result.
Metadata
Metadata
Assignees
Labels
No labels