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

Find regex [A-z] case insensitive does not match correctly. #1007

Open
arleslie opened this issue Sep 30, 2015 · 2 comments
Open

Find regex [A-z] case insensitive does not match correctly. #1007

arleslie opened this issue Sep 30, 2015 · 2 comments

Comments

@arleslie
Copy link

In Python (3.5.0), PHP and JavaScript [A-z] matches all ascii characters between A and z which includes `[ \ ] ^ _ ``

Python 3.4.2 and below has a bug in where it matches like Sublime. https://bugs.python.org/issue3511

I assumed Sublime just used an out of date version of Python but I was informed that Sublime does not use Python's regex for the find dialog.

You can generate all characters it should match via: ''.join([chr(i) for i in range(ord('A'), ord('z'))])

It seems like Sublime (with case insensitivity) is turning /[A-z]/ into /[a-z]/ instead of doing /[A-z]/i .

@FichteFoll
Copy link
Collaborator

1007

(note that z is missing in the test string because the code from above is off by one, but that doesn't matter)

@titoBouzout
Copy link
Collaborator

view ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_abcdefghijklmnopqrstuvwxy`

search:/[A-z]/

tick "regexp" and tick and untick "ignore case"
for an explanation of the bug see item0

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

No branches or pull requests

3 participants