欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

正則表達式匹配中文與雙字節(jié)的代碼

 更新時間:2010年11月17日 22:08:16   作者:  
匹配中文字符與匹配雙字節(jié)字符的代碼,需要的朋友可以參考下。
匹配中文字符
[\u4e00-\u9fa5]
C#
復(fù)制代碼 代碼如下:

class Class1
{
static void Main()
{
string s = "中文 chinese";
Regex regx = new Regex("[\u4e00-\u9fa5]+");
Match m = regx.Match(s);
Console.WriteLine(m.Groups[0].Value); // 中文
Console.ReadKey();
}
}

匹配雙字節(jié)字符(包括漢字)
[^\x00-\xff]

相關(guān)文章

最新評論