Selecting lowercase characters also matches with the upper case but not the other way around #11982
-
SummaryI tried this:
I expected this to only match the lowercase letter but it also matches the uppercase. When I tried selecting Note: I am not familiar with what to expect from regex, when I try the same thing in an online regex interpreter it matches the cases properly, meaning that selecting Reproduction StepsNo response Helix logNo response PlatformLinux Terminal Emulatorzsh 5.9 (x86_64-debian-linux-gnu) Installation Methodreleases page Helix Versionhelix 24.7 (079f544) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That's called smart-case and intentional. It will be case insensitive if everything is lower case and case sensitive if there is any uppercase character in the regex. You can prefix your regex with |
Beta Was this translation helpful? Give feedback.
That's called smart-case and intentional. It will be case insensitive if everything is lower case and case sensitive if there is any uppercase character in the regex. You can prefix your regex with
(?-i)
to disable that behavior or disable the corresponding config option