Regular Expressions 101

Community Patterns

GitLab conventional commits

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?<type>build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|¯\\_\(\)_\/¯)(?<scope>\(\w+\)?((?=:\s)|(?=!:\s)))?(?<breaking>!)?(?<subject>:\s.*)?|^(?<merge>Merge \w+)
/
gm

Description

conventional commits regex for gitlab

Submitted by anonymous - a year ago