curious-odd-man / RgxGen

Regex: generate matching and non matching strings based on regex pattern.
Apache License 2.0
86 stars 14 forks source link

`\p` is not supported (Character classes) #73

Closed puskarpeter closed 1 year ago

puskarpeter commented 1 year ago

Add support for character classes specified with \p. new RgxGen("\\p{InBasicLatin}{0,255}").generate() should generate an example from Unicode characters in BasicLatin class. Currently it fails with NumberFormatException since the expresion in {} is treated as repetition block.

Version 1.4

curious-odd-man commented 1 year ago

Documentation about categories https://www.regular-expressions.info/unicode.html#category

curious-odd-man commented 1 year ago

Hello @puskarpeter ! This is now supported. I would very much like your feedback. You can use snapshot 1.5-SNAPSHOT to try this out. The release 1.5 is planned as soon as I get through with few more items.