regex = new Regex("(" + str1 + ")", RegexOptions.IgnoreCase);
I use this regular expressions to search the text with ignore case and substrings. But when I
I give symbols as input, I am getting a ArgumentInvalid exception. How can I allow this to search for symbols also? I am using this expression in C#.Net
You need to escape the regex.
Use Regex.Escape
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