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

Support for case-insensitive string generation. #47

Closed nheitz closed 3 years ago

nheitz commented 4 years ago

This library looks like it's going to fulfill a need I have in certain cucumber tests rather nicely. Primarily I am interested in the "Not matching" string functionality...but is there any way to indicate that the constructor argument for "regex" shuld be used in a case insensitive way?

curious-odd-man commented 4 years ago

Hello Nicholas! Thank you for your question.

Unfortunately there is no "case insensitive" option currently. I think I can implement this in a nearest future.

curious-odd-man commented 3 years ago

Hello @nheitz. You can try SNAPSHOT release for the case-insensitive generation. The release of version 1.3 (including this implementation is planned later this year).

curious-odd-man commented 3 years ago

Ah. btw. To enable case insensitive matching use:

        RgxGen rgxGen = new RgxGen("your awesome pattern");
        RgxGenProperties properties = new RgxGenProperties();
        RgxGenOption.CASE_INSENSITIVE.setInProperties(properties, true);
        rgxGen.setProperties(properties);
nheitz commented 3 years ago

amazing. Thank you very much.