the_silver_searcher
the_silver_searcher copied to clipboard
Smart case takes into account the uppercase letter from an escaped pattern
Setup: Text file containing 'EXAMPLE'
Description: ag 'exampl\D' -> does not match, smart case performs the search case sensitive because it has encountered the uppercase letter D, but in fact '\D' matches any non-digit
Expectation: the search should be performed case insensitive and the '\D' should not count for an uppercase letter because it is an escaped character
The same problem occurs with character properties, such as \p{N}
for example, because N
is considered an upper case letter. I tested ag 2.2.0.
same. Just ran into this bug when using \W
in a search pattern. Was very confusing. Sadly looks like this project is a bit abandoned these days. (though this is the first bug in ag
I've ever noticed in 8+ years of using it)