using System; using System.IO; using System.Text.RegularExpressions; public class Test { public static void Main() { Console.WriteLine(FindDispo_InInfo("12/11/2015: Liefertermin 71994 : 30.11.2015 -> 27.11.2015")); } private static string FindDispo_InInfo(string text) { Regex pattern = new Regex(@"\b[0-9]{5}\b"); Match match = pattern.Match(text); if (match.Success) return match.Value; else return string.Empty; } }