You can do this when you define a regex object
Regex exp = new Regex( @"^mp[0-9]{6}$", RegexOptions.IgnoreCase);
Alternatively, you can use the ^(?i)mp[0-9]{6}$ syntax, which will only make a specific regular expression bit case-insensitive. But I personally would use the first option (it is easier to read).
See the msnd documentation for more details .
source share