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;
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uSU87CnVzaW5nIFN5c3RlbS5UZXh0LlJlZ3VsYXJFeHByZXNzaW9uczsKCnB1YmxpYyBjbGFzcyBUZXN0CnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKCXsKICAgICAgICBDb25zb2xlLldyaXRlTGluZShGaW5kRGlzcG9fSW5JbmZvKCIxMi8xMS8yMDE1OiBMaWVmZXJ0ZXJtaW4gNzE5OTQgOiAzMC4xMS4yMDE1IC0+IDI3LjExLjIwMTUiKSk7Cgl9Cglwcml2YXRlIHN0YXRpYyBzdHJpbmcgRmluZERpc3BvX0luSW5mbyhzdHJpbmcgdGV4dCkKICAgIHsKICAgICAgICBSZWdleCBwYXR0ZXJuID0gbmV3IFJlZ2V4KEAiXGJbMC05XXs1fVxiIik7CiAgICAgICAgTWF0Y2ggbWF0Y2ggPSBwYXR0ZXJuLk1hdGNoKHRleHQpOwogICAgICAgIGlmIChtYXRjaC5TdWNjZXNzKQogICAgICAgIAlyZXR1cm4gbWF0Y2guVmFsdWU7CiAgICAgICAgZWxzZQogICAgICAgIAlyZXR1cm4gc3RyaW5nLkVtcHR5OwogICAgfQp9