请教一下:
我用这个替换不了fc@
string Str = @"My QQC is Magci,QC short mgc. fc@ I like c sharp!";
Pattern = @"\bfc@\b";
Matches = Regex.Replace(Str, Pattern, "HHHH"); 但我把@放在中间就可以替换了,不知是什么原因string Str = @"My QQC is Magci,QC short mgc. f@c I like c sharp!";
Pattern = @"\bf@c\b";
Matches = Regex.Replace(Str, Pattern, "HHHH");
这样可以
我用这个替换不了fc@
string Str = @"My QQC is Magci,QC short mgc. fc@ I like c sharp!";
Pattern = @"\bfc@\b";
Matches = Regex.Replace(Str, Pattern, "HHHH"); 但我把@放在中间就可以替换了,不知是什么原因string Str = @"My QQC is Magci,QC short mgc. f@c I like c sharp!";
Pattern = @"\bf@c\b";
Matches = Regex.Replace(Str, Pattern, "HHHH");
这样可以
Pattern = @"\bfc@\b";
//改为
Pattern = @"\bfc@";