Test, validate and match regular expressions
Matches URL paths structured as /slug/id/ where the first segment consists of lowercase letters and hyphens, followed by a second segment of digits, with an optional trailing slash (possessive quantifier). Intended for URL routing or path validation, e.g., /blog-post/123/. Note: the parentheses inside the character classes are treated as literal characters rather than grouping — the cleaner intent would be [a-z\-] and [0-9].