将页面翻译成其它语言时,需要将页面上的中文字符检索出来
public string FindContents(string str) { string x = @"[u4E00-u9FFF]+"; MatchCollection Matches = Regex.Matches(str, x, RegexOptions.IgnoreCase); StringBuilder sb = new StringBuilder(); foreach (Match NextMatch in Matches) { str= str.Replace(NextMatch.Value, Html.LangString( NextMatch.Value)); } return str; }