急求正则表达式处理字符串
fawe efaew fe,waf feaw,fe
few,ef few,ff fewfa,we few
fawe efaew fe,waf feaw,fe
few,ef few,ff fewfa,we few
上面实际上是个字符串,含有\t和\r\n
求个正则表达式,能把上面字符串中含有的 , 的项加上单引号,如将 few,ff 变为 'few,ff'
------解决方案--------------------
string result = Regex.Replace("内容", @"([\w]*?,[\w]+)", "\"$1\"");
------解决方案--------------------str=Regex.Replace(str,@"\w+,\w+","'$0'");