Skip to content

Fix regexify escape backslash in character class#434

Merged
pimjansen merged 3 commits intoFakerPHP:mainfrom
krsriq:BUGFIX/382
Jan 28, 2022
Merged

Fix regexify escape backslash in character class#434
pimjansen merged 3 commits intoFakerPHP:mainfrom
krsriq:BUGFIX/382

Conversation

@krsriq
Copy link

@krsriq krsriq commented Jan 23, 2022

What is the reason for this PR?

This PR removes single escape backslashes from character classes in regexify().

Author's checklist

Summary of changes

Besides the regexify() change I've added a test that covers the respective issue (note that without the code changes in regexify() this added test fails).

Review checklist

  • All checks have passed
  • Changes are approved by maintainer

Copy link

@pimjansen pimjansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pimjansen pimjansen merged commit dc988fe into FakerPHP:main Jan 28, 2022
@krsriq
Copy link
Author

krsriq commented Jan 28, 2022

Thanks @pimjansen

@krsriq krsriq deleted the BUGFIX/382 branch January 28, 2022 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slash is not ignored in regexify() in some cases

2 participants