static string GetAllChineseWithPath(string path, string format)
{
StringBuilder strB = new StringBuilder();
//用正则表达式提取中文。
Regex reg1 = new Regex("[\u4e00-\u9fa5]+");
MatchCollection mc1 = reg1.Matches(format);
foreach(Match mt in mc1)
{
format = mt.Value;
if(string.IsNullOrEmpty(format))
continue;
strB.Append(path).Append(",").Append(format).Append("\n");
}
return strB.ToString();
}
} |