Test, validate and match regular expressions
This regular expression matches sequences of one or more digits separated by hyphens, such as “12-34-56” or “2024-03-15”. With the global and multiline flags, it finds all occurrences across multiple lines, making it useful for extracting IDs, dates, or any hyphen-delimited numeric codes from text. It is commonly used in data cleaning, log parsing, or input validation when a simple numeric hyphenated format is expected.