62,263
社区成员
发帖
与我相关
我的任务
分享
没看懂表达式
如果是大括号{}
或者<%要取的文字%>,这样表达式怎么取其中的字符,?
替换的时候连字符也替换要怎么换啊?
string source = "123456Mark12";
string patten = @"^[\d]+$";
Regex reg = new Regex(patten);
MatchCollection mc = reg.Matches(source);
foreach (Match item in mc)
{
MessageBox.Show(item.Value);
}