using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
public class Program
{
public static void Main()
string value = @"30-
150 Kraków, Polska";
var postCode = Regex.Match(value, @"^([0-9][0-9]-[0-9][0-9][0-9])");
Console.WriteLine(postCode.ToString());
}