Match Literals
Escaping
Case-insensitive
Regex is case-sensitive by default, to ignore case, add leading (?i)
.
regexp
(?i)ascii
1
cs
_ = new Regex(@"ascii", RegexOptions.IgnoreCase)
1
To partially ignore case, close partial regex using (?i)<regex>(?-i)
The following matches ASCIIascciiascii
but not asciiasciiASCII
regexp
ASCII(?i)aScIi(?-i)ascii
1