这是ASP的:
re.Pattern="\[color=(.[^\[]*)\](.[^\[]*)\[\/color\]"
strContent=re.Replace(strContent,"<font color=$1>$2</font>")现在换成C#怎么写?
re.Pattern="\[color=(.[^\[]*)\](.[^\[]*)\[\/color\]"
strContent=re.Replace(strContent,"<font color=$1>$2</font>")现在换成C#怎么写?
Regex re=new Regex(@"\[color=(.[^\[]*)\](.[^\[]*)\[\/color\]");
strContent=re.Replace(strContent,"<font color=$1>$2</font>")