Assume I have this:
Regex.Replace(\"aa cc bbbb\",\"aa cc\",\"\",RegexOptions.IgnoreCase);
But I also need to ignore white-spaces. So, I fo
Regex.Replace("aa cc bbbb","aa cc","",RegexOptions.IgnoreCase | RegexOptions.IgnorePatterWhitespace);
Use the |
operator.
Edit :
You got it completely wrong. RegexOption.IgnorePatterWhitespace
ignores the whitespace in the regex so that you can do :
string pattern = @"
^ # Beginning of The Line
\d+ # Match one to n number but at least one..
";
You however think that ingoring whitespace makes "aa cc bbbb"
into "aaccbbbb"
which is thankfully wrong.