-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regexify method doesn't recognise "^" and "$" chars in datafaker before 2.2.0. #1209
Comments
This is not a datafaker issue, it is the issue of underlying library https://github.com/mifmif/Generex which was used before 2.2.0 Starting 2.2.0 we use another library https://github.com/curious-odd-man/RgxGen |
Yes to what @snuyanzin said. We don't really support 1.x anymore, nor do we support such old versions of Java, but if you're willing to make a PR for this, I'm happy to release a new 1.x version. But it's recommended to upgrade. |
I've got it. But Java 11 is LTS. And we counldn't upgrade to new version now. |
You could just concatenate the pre/post-fix after generating the regexified value. |
I did it. But remove prefix and sufffix before calling regexify. |
@maxtar It's a bit beyond the scope of this issue, but Java 11 LTS has only but only extended support available, and has been superseded by Java 17 LTS and Java 21, which is also LTS. Either way, still happy to make a 1.x release when it's fixed. |
Hi @maxtar , we're aware of this issue, and as said before, happy to accept PRs, even on the 1.x branch, but for now I'll close the issue to clean things up a little. |
Describe the bug
Faker().regexify() doesn't take into account "^" and "$" chars.
To Reproduce
will make something like
^4111968277$
Expected behavior
In regex "^" char means start of string and "$" - end of string. regexify must recognise this chars. Result must be
4111968277
.Versions:
The text was updated successfully, but these errors were encountered: