110,571
社区成员
发帖
与我相关
我的任务
分享
@"^\d{4}-\d{2}(_[a-z]| [a-z]#\d)?$"
100[\-]10\s{1}[rR][\#][1]|100[\-]10[\-][aA]|100[\-]10
string source = @"1000-10 1000-10-A 1000-10 R#1";
Regex reg = new Regex(@"\d{4}-\d{2}( R#1|-\S*|\u0020)");
MatchCollection mc = reg.Matches(source);
foreach (Match m in mc)
{
MessageBox.Show(m.Value);
}
Regex rx = new Regex(@"^(?<main>\d+\-\d+)\-[a-zA-Z]+$");