All searches in Emacs normally ignore the case of the text they are searching through; if you specify searching for ‘FOO’, ‘Foo’ and ‘foo’ are also considered a match. Regexps, and in particular character sets, are included: ‘[aB]’ matches ‘a’ or ‘A’ or ‘b’ or ‘B’.
If you want a case-sensitive search, set the variable
case-fold-search
to nil
. Then all letters must match
exactly, including case. case-fold-search
is a per-buffer
variable; altering it affects only the current buffer, but
there is a default value which you can change as well. See Locals.
You can also use Case Sensitive Search from the Options menu
on your screen.