/// 判斷是否有中文
/// </summary >
/// <param name="str" ></param >
/// <returns ></returns >
public static bool SD_IsIncludeChinese(this string str)
{
Regex regex = new Regex("[\u4e00-\u9fa5]");
Match m = regex.Match(str);
return m.Success;
}
正則表達式[\u4e00-\u9fa5]同樣可以用在javascript等其它技術中。