Fix regexps to use case-insensitivity correctly #5

Merged
merged 1 commit into from Jul 10, 2014

Conversation

Projects
None yet
2 participants
@rennex
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 :)

Fix regexps to use case-insensitivity correctly
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

This comment has been minimized.

Show comment
Hide comment
@philr

philr Jul 10, 2014

Member

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.

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