private static readonly Regex AddressRegex = new Regex(@"^(.+?)\s+([0-9][ 0-9a-zA-Z\/-]*)\s*$"); public static (string street, string number) GetStreetNameAndNumber(string addressLine) { var match = AddressRegex.Match(addressLine); if (!match.Success) return (addressLine, null); return (match.Groups[1].Value, match.Groups[2].Value); }
823120cookie-checkC# Split streetname and number from address line