I get an input for a town name and postal code.
I want to check if this input is in the correct format (specified below). Checking if the town exists is not needed.
I wanted to use a RegEx (Regular Expression) to check it, but I couldn't find a correct solution.
Valid Input Formats:
<Town Name> <Post Code>
<Town Name>, <Post Code>
Example Inputs:
Hamburg, 22850
Cambridge 44922
I want to check if the letters and the numbers are separated by a space (with an optional comma straight after the town name).