111,126
社区成员
发帖
与我相关
我的任务
分享
Regex regex = new Regex(@"(?i)^((a1)|(b2)|(c3)|(D4)|(e5)).*$");
Match match = regex.Match(deviceType);
if (match.Success)
{
success = true;
}
Regex re = new Regex("^((a1)|(b2)|(c3)|(D4)|(e5)).*$", RegexOptions.IgnoreCase);
if(re.IsMatch("你的字符串"))
{
//符合
}
else
{
不符合
}
string pattern = @"(?i)^(a1|b2|c3|D4|e5).*?$";