Test, validate and match regular expressions
This regex validates kebab-case strings, commonly used for naming variables, CSS classes, or URL slugs. It allows an optional leading underscore followed by alphanumeric segments separated by one or more hyphens. The multiline flag ensures it matches across multiple lines.