111,120
社区成员
发帖
与我相关
我的任务
分享 string temp = "我是发牢骚的看法较为了房间10234sdfjlkwefl未来房价是登录";
Match m = Regex.Match(temp, "(?i)((?<english>[a-z0-9])|(?<chinese>[^a-z0-9]))+");
for (int i = 0; i < m.Groups["english"].Captures.Count; i++)
{
Console.WriteLine(m.Groups["english"].Captures[i].Value);
}
for (int j = 0; j < m.Groups["chinese"].Captures.Count; j++)
{
Console.WriteLine(m.Groups["chinese"].Captures[j].Value);
}