There are two ways to achieve this:
One is to
set ignorecase, then the pattern regex will ignore the case. Yet, this solution is poor if you are writing a script that may need to be reused by someone.
A better solution is to use the
\c (ignore case)
\C (do not ignore case) modifiers in the regex. This command:
Will always ignore the case of
pattern no matter what you have set
And this command:
Will always perform a case sensitive search for
pattern, even if you have
ignorecase set to true.
Reference (the forward slash is important):