解析方案使用:Regex.Replace Regex.Replace 语法: public static string Replace(string input,string pattern,string replacement,RegexOptions options); 示例: public void TeStr() { var s = "28雷币,信心满满,强烈推一场比
解析方案使用:Regex.Replace
Regex.Replace 语法:
public static string Replace(string input,string pattern,string replacement,RegexOptions options);
示例:
public void TeStr()
{
var s = "28雷币,信心满满,强烈推一场比赛,精选比赛,28币跟上稳稳中奖,附带比分和进球数最近10中8,28币!超强信心!超级稳胆!附比分!28币,";
var y = s.Replace("28雷币,", "").Replace("28币", "").Replace("28币[\uff01]","").Replace("28币," ,"");
var s1 = "58币推荐几场必胜比赛!";
var u= Regex.Replace(s, "28币!", "").Replace("28币,","").Replace("28雷币,","");
var y1 = s1.Replace("58币,", "");
//var z = y.StartsWith("!");
//var value = y.Substring(1,y.Length-1);
Console.WriteLine(u);
}