Build, test, and debug regular expressions
This PCRE regex captures an optional single-letter country prefix (like 'D-'), a 5-digit German postal code, a separator, and the subsequent location name into distinct named capture groups. It is specifically tailored for parsing German address strings, such as 'D-10115 Berlin' or '80331 München'. This makes it highly effective for data extraction, address validation, and formatting tasks in forms or databases.