字符串截取问题,求助!!
请问下红色下划线带C的这串数字,我要怎么截取出来呢?
这是我的代码
string t = string.Empty;
Regex reg = new Regex(@"(?is)[\d]{16}");
MatchCollection mc = reg.Matches(s);
foreach (Match m in mc)
{
this.listBox1.Items.Add(Regex.Replace(m.Value, " ", "", RegexOptions.IgnoreCase));
}
------解决方案-------------------- Regex reg = new Regex(@"(?is)[a-z\d]{16}");
------解决方案--------------------Regex reg = new Regex(@"(?is)[\d]{0,}[a-zA-Z]{1,}[\d]{0,16}");