using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; public class Test { public static void Main() { var text = "ABC_BC_BE08_C1000004_0124"; var result = Regex.Matches(text, @"(?<=^(?:[^_]*_){2,})[^_]+").Cast().Select(x => x.Value); foreach (var s in result) Console.WriteLine(s); } }