Regular Expressions 101

Community Patterns

Commit linter

0

Regular Expression
PCRE (PHP <7.3)

/
^(?=.{0,72}$)(vim-patch.*|(fix|feat|docs|test|perf|refactor|chore|build)(\([^)]+\))?!?:\s[a-z].*[^.]$)
/
gm

Description

Regex to lint the first line of a commit

Submitted by anonymous - 3 years ago