Test, validate and match regular expressions
Matches strings consisting of 1-8 digits or hyphens, optionally followed by a hyphen and another 1-8 character segment of digits or hyphens. With the multiline flag, it validates each line individually. Commonly used for validating order codes, reference numbers, or product identifiers that follow a segmented numeric format separated by dashes.