I'm using System.Text.RegularExpressions.Regex.IsMatch(testString, regexPattern) to do some searches in strings.
Is there a way to specify in the regexPattern string that the pattern should ignore case? (I.e. without using Regex.IsMatch(testString, regexPattern, RegexOptions.IgnoreCase))
" " C is a computer programming language. That means that you can use C to create lists of instructions for a computer to follow. C is one of thousands of programming languages currently in use.
In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr.
(?i)
within the pattern begins case-insensitive matching, (?-i)
ends it. That is,
(?i)foo(?-i)bar
matches FOObar
but not fooBAR
.
EDIT: I should have said (?-i)
starts case-sensitive matching - if you want the whole pattern to be case-insensitive then you don't need to "end" the (?i)
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With