110,536
社区成员
发帖
与我相关
我的任务
分享
string s = "1234567892384823748124512";
foreach (string item in s.Split(new string[] { "12" }, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Substring(0, 1)))
{
Console.WriteLine(item);
}
string p = @"(?<=12)\d";
string s = "1234567892384823748124512";
foreach (Match m in Regex.Matches(s, p))
{
Console.WriteLine(m.Value);
}