public static string IgetNumber(string strQq) { var result = string.Empty; const string pattern = @"[1-9][0-9]{4,}"; var reg = new Regex(pattern, RegexOptions.IgnoreCase); var mc = reg.Matches(str); // if (mc.Count <= 0) return result; var rc = 0; foreach (Match m in mc) { if (rc == 0) { result = m.ToString(); rc = 1; } else { result += "," + m; } } return result; }