替换要求:保留替换前的原有大小写
string title = "红外on传感on器oNS412 深圳On现货";
Regex reg = new Regex("on", RegexOptions.IgnoreCase | RegexOptions.Multiline);
title = reg.Replace(title, "<font color='red'>$0</font>");
string title = "红外on传感on器oNS412 深圳On现货";
Regex reg = new Regex("on", RegexOptions.IgnoreCase | RegexOptions.Multiline);
title = reg.Replace(title, "<font color='red'>$0</font>");