Test, validate and match regular expressions
This regex validates and parses GitLab conventional commit messages following the conventional commits specification. It captures named groups for type (feat, fix, docs, etc.), optional scope in parentheses, optional breaking change indicator (!), and the commit subject. It also includes an alternative pattern for merge commits and notably supports a humorous shrug emoji type (¯_(ツ)_/¯).