问个很蛋疼的正则问题 abc user ii cc
dad us er uer
user ww, cd@
如何匹配不为user的单词
分享到:更多
------解决方案--------------------
string s = @"abc user ii cc
dad us er uer
user ww, cd@";
MatchCollection matches = Regex.Matches(s, @"\b(?!user\b)\w+\b");
foreach (Match match in matches)
Response.Write(match.Value + "<br/>");