Regular Expressions 101

Community Patterns

Community Library Entry

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 - 2 years ago