KennethSoona <ke***********@gmx.net> wrote:
content=Regex.Replace(content, @"/*Offline*/", @"//Offline");
content=Regex.Replace(content, @"//Online", @"/*Online*/");
Second line works fine but the first didn't!
I think the problem are the "*" in the first line.
Yup.
Is it a bug?
Yes, but in your code rather than the regex code :) It's because * is a
special character in regular expressions. Try:
content=Regex.Replace(content, @"/\*Offline\*/", "//Offline");
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too