crdoconnor / xeger

Library to generate random strings from regular expressions.
Other
121 stars 21 forks source link

Handle regex qualifier incoherent with Xeger limit #10

Closed poussik closed 6 years ago

poussik commented 6 years ago

Handle regex qualifier incoherent with Xeger limit. Useful when mixing greedy operator with small limit (ex: limit=5) and explicit qualifier like {12,16}. Fix the issue #6 .

I do think it should not raise an assertion error, probably a warning log would be useful.

crdoconnor commented 6 years ago

Awesome, thanks @poussik

crdoconnor commented 6 years ago

I think it's fine how you have it -- if you use {12,16} it doesn't violate the principle of least astonishment that it actually returns between 12 and 16.