Test, validate and match regular expressions
This PCRE2 regular expression parses lines from a HID (Human Interface Device) Usage Tables document to extract an ID and a name. It captures a 2-digit hexadecimal ID and an optional range endpoint (hyphen and word characters), followed by a usage name (containing spaces, slashes, or hyphens). It optionally ignores a trailing version string. This regex is particularly useful for generating Rust enums or other code structures from HID usage tables.