您可以使用正则表达式(\d{3}\.[A-Za-z]) https://regex101.com/r/Z05cC4/1,这是:\d{3} matches a digit (equal to [0-9]){3} Quantifier — Matches exactly 3 times\. matches the character . literally (case sensitive)Match a single character present in the list below [A-Za-z]A-Z a single character in the range between A (index 65) and Z (index 90) (case sensitive)a-z a single character in the range between a (index 97) and z (index 122) (case sensitive)然后只拿第一组。public static class Program{ private static void Main(string[] args) { string input = @"184.b189.a194.b199.d204.d209.b214.b219.d"; IEnumerable<string> capturedGroups = ExtractNumbers(input); string res = string.Join(Environment.NewLine, capturedGroups); Console.WriteLine(res); } static IEnumerable<string> ExtractNumbers(string Input) { string pattern = @"(\d{3}\.[A-Za-z])"; MatchCollection matches = Regex.Matches(Input, pattern, RegexOptions.Singleline); foreach (Match match in matches) yield return match.Groups[1].Value; }}输出:184.b189.a194.b199.d204.d209.b214.b219.d