Build, test, and debug regular expressions
This regex validates a Danish CPR (Det Centrale Personregister) number, ensuring it strictly follows the DDMMYY-XXXX format. It verifies that the date components contain valid days (01-31) and months (01-12) alongside a two-digit year, followed by an optional hyphen and a four-digit sequence number. It is particularly useful in Danish administrative, healthcare, or e-commerce applications where accurate citizen identification is required.