[vim/vim] pattern.txt says `[:upper:]` and `[:lower:]` respect `ignorecase`, but they don't (Issue #19230)

8 views
Skip to first unread message

taylor.fish

unread,
Jan 21, 2026, 2:31:43 AM (2 days ago) Jan 21
to vim/vim, Subscribed
taylordotfish created an issue (vim/vim#19230)

Steps to reproduce

  1. Open :help [:upper:].
  2. Observe that the description says uppercase letters (all letters when 'ignorecase' is used).
  3. Run :set ignorecase.
  4. Run :echo 'a' =~ '[[:upper:]]'.
  5. Observe that the pattern did not match.

The above steps can be repeated for [:lower:], substituting 'A' for 'a' in step 4.

Expected behaviour

I expected the documentation not to say that these character classes match all letters when ignorecase is used. This would make it consistent with :help /ignorecase, which states Note that 'ignorecase', "\c" and "\C" are not used for the character classes., as well as with the actual behavior of the character classes in practice.

Version of Vim

9.1.2101

Environment

Operating system: Debian 13
Terminal: rxvt-unicode v9.31
Value of $TERM: tmux-256color
Shell: GNU bash, version 5.2.37(1)-release

Logs and stack traces


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19230@github.com>

Christian Brabandt

unread,
Jan 21, 2026, 3:11:51 PM (2 days ago) Jan 21
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19230)

That's is however correct behavior when matching text in the buffer using the backtracking regexp engine (e.g. after :set regexpengine=1), but when using an expression operator =~ it is always ignored. Strange


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19230/3780934847@github.com>

taylor.fish

unread,
Jan 22, 2026, 8:18:36 AM (yesterday) Jan 22
to vim/vim, Subscribed
taylordotfish left a comment (vim/vim#19230)

Interesting, for me, after :set regexpengine=1, the behavior of =~ updates too. :set ic re=1 | echo 'a' =~ '[[:upper:]]' prints 1.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19230/3784377405@github.com>

Christian Brabandt

unread,
Jan 22, 2026, 4:12:18 PM (20 hours ago) Jan 22
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19230)

Yeah, I am unsure if we should just document this inconsistency and how. Any idea for a doc patch?
I had a quick look yesterday at the backtracking code, but did not find where this ignorecase setting was applied.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19230/3786700904@github.com>

Reply all
Reply to author
Forward
0 new messages