110,539
社区成员
发帖
与我相关
我的任务
分享
Regex re = new Regex("你的正则", RegexOptions.None);
MatchCollection mc = re.Matches("你的匹配的字符串");
foreach (Match ma in mc)
{
//ma.Value
//ma.Groups[索引].value
}
//哪果是验证
if(re.IsMatch("要验证的字符串"))
{
//通过验证
}