moodmosaic / Fare

Port of Java dk.brics.automaton and xeger, mostly used for generating strings that match a specific regular expression.
http://www.brics.dk/automaton/
MIT License
183 stars 43 forks source link

Add common group shortcuts support #36

Closed zvirja closed 6 years ago

zvirja commented 6 years ago

Closes #20

Add support for the following group shortcuts:

Also improved the '\\', '\d' and '\D' support, so group is not matched when backslash is escaped.

In this PR I tried to partially cover the #13 and generate printable ASCII symbols only. Otherwise, if we allow to generate any Unicode chars, very often the result doesn't match the expected regular expression.