Test, validate and match regular expressions
This regex matches a four-digit numeric code followed by a hyphen and an optional sequence of uppercase words, which may be separated by spaces or hyphens. It is designed to identify formatted insurance payment identifiers such as '2000-INSURANCE PAYMENT' or '1234-PREMIUM'. Common use cases include extracting or validating payment codes from log files, invoices, or text documents.