Case insensitive Regex without using RegexOptions enumeration

MSDN Documentation

(?i)taylor matches all of the inputs I specified without having to set the RegexOptions.IgnoreCase flag.

To force case sensitivity I can do (?-i)taylor.

It looks like other options include:

  • i, case insensitive
  • s, single line mode
  • m, multi line mode
  • x, free spacing mode

Leave a Comment