110,545
社区成员
发帖
与我相关
我的任务
分享
string date = "一九捌222捌";
string[] patterns = new string[10]{"[〇0零]",
"[一壹1]","[贰二2]","[3三叁]",
"[肆4四]","[5伍五]","[六6陆]",
"[柒七7]","[八捌8]","[九9玖]"};
for(int i = 0; i < patterns.Length; i ++)
{
date = Regex.Replace(date, patterns[i], i.ToString());
}
string result=Regex.Replace(yourString,"[〇零0]","0");
result=Regex.Replace(result,"[一壹1]","0");
...
...