Skip to content
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

corrected misleading variable name #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hiteshbedre
Copy link

When we define ^ in a square bracket it negate the matches.
Example:
[^abc] : matches any char except a, b or c.
[^a-z] : matches any character except lower alphabets
[^a-z0-9] : matches any character except lower alphabets and numbers

So changed name of variable to non_alphanumeric.
Here I have created playground for same scenario: https://regex101.com/r/zmEBu2/1

@hiteshbedre
Copy link
Author

If I assume you wanted to match only alphanumeric string only then we just need alter the pattern to [a-z0-9] keeping variable name same.

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.

1 participant