serpro69 / kotlin-faker

Port of a popular ruby faker gem written in kotlin. Generate realistically looking fake data such as names, addresses, banking details, and many more, that can be used for testing and data anonymization purposes.
https://serpro69.github.io/kotlin-faker/
MIT License
453 stars 42 forks source link

Regexify generates invalid value #207

Closed axelfontaine closed 1 month ago

axelfontaine commented 5 months ago

Regex: ^[a-zA-Z\d](?:[a-zA-Z\d]|-(?!-)){0,38}$

Example generated invalid value: ^2]?:0]-?!-?:A]$

serpro69 commented 5 months ago

This could also be an issue in the dependency, not in faker. Similar to #209 .

I'll take a look and see if I can reproduce it and will think if there's a possibility to fix. But feel free to make a PR if you have some ideas on how this could be fixed ;)

axelfontaine commented 5 months ago

Other examples:

Regex: ^AKIA\S{16}$ Generated invalid value: ^AKIA 蘕 篝爈  ᇦ$

Regex: ^\S{40}$ Generated invalid value: ^弌늒⿈褻ᤑᮀゔ|b㫃Ц庴佤$

Regex: ^i-0[\da-f]{16}$ Generated invalid value: ^i-0[a-f]]]]]]]]]]]]]]]]$