Closed Kaljurand closed 3 years ago
The optional "a" in the first pattern seems to confuse the generator to miss the "b". Adding brackets (2nd pattern) avoids the error.
import com.github.curiousoddman.rgxgen.RgxGen; public class MyClass { public static void main(String args[]) { // "": WRONG System.out.println(new RgxGen("a?b|c").iterateUnique().next()); // "b": OK System.out.println(new RgxGen("(a?b)|c").iterateUnique().next()); } }
The optional "a" in the first pattern seems to confuse the generator to miss the "b". Adding brackets (2nd pattern) avoids the error.