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

Avoid "fake" range in regex character class #331

Merged
merged 1 commit into from Aug 12, 2015

Conversation

aureliojargas
Copy link
Contributor

Visually, it seems that \w-# is a range.

Moved the dash to the end of the character class, to make it clear it is a literal dash.

Also, moved the # to the start because [^\w#-] is uglier :)

Note: The "line break at EOF" change was inserted by the GitHub web editor.

Visually, it seems that `\w-#` is a range.

Moved the dash to the end of the character class, to make it clear it is a literal dash.

Also, moved the `#` to the start because `[^\w#-]` is uglier :)
LeaVerou added a commit that referenced this pull request Aug 12, 2015
Avoid "fake" range in regex character class
@LeaVerou LeaVerou merged commit 9baf13c into LeaVerou:gh-pages Aug 12, 2015
@LeaVerou
Copy link
Owner

Haha ok, thanks!

@aureliojargas
Copy link
Contributor Author

🎉

@aureliojargas aureliojargas deleted the patch-1 branch August 12, 2015 13:27
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.

None yet

2 participants