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

Fix regexps to use case-insensitivity correctly #5

Merged
merged 1 commit into from Jul 10, 2014
Merged

Conversation

@rennex
Copy link
Contributor

rennex commented Jun 19, 2014

The regexp /[A-z]/ matches all alphabets, but also six non-alphabetic characters, as demonstrated by ("A".."z").to_a.join
=> "ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz"

I've fixed them by using [A-Za-z] instead, or by making the whole regexp case-insensitive. Note that I'm not 100% sure if some of those regexps should actually match the non-alphabets as well (underscore being a possible candidate), so please check that before merging :)

The regexp /[A-z]/ matches all alphabets, but also six non-alphabetic
characters, as demonstrated by ("A".."z").to_a.join
=> "ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz"
@philr philr merged commit c0be71b into tzinfo:master Jul 10, 2014
@philr
Copy link
Member

philr commented Jul 10, 2014

Thank you for the pull request.

In each of these cases it was the intention to only match [A-Za-z]. I have merged the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.