.NET just doesn't use that way of constructing regular expressions at all. If you need to make a global modifier, it's changed in the constructor of the regular expression class rather than being part of the string.
Like 10 years ago, it was a huge performance hit to enable to the point that it seemed like a bug, so I did not use it.
For now, I'd suggest using the in-line mode modifier (?i) which can be ended with (?-i) but is optional. If you want the entire line to be case insensitive, just put it at the beginning. It seems safe to put the modifier before or after ^.
Comments
.NET just doesn't use that way of constructing regular expressions at all. If you need to make a global modifier, it's changed in the constructor of the regular expression class rather than being part of the string.
Like 10 years ago, it was a huge performance hit to enable to the point that it seemed like a bug, so I did not use it.
For now, I'd suggest using the in-line mode modifier (?i) which can be ended with (?-i) but is optional. If you want the entire line to be case insensitive, just put it at the beginning. It seems safe to put the modifier before or after ^.That's strange it would do that.
Thanks for the answer.