Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^(((I|i)nitial|(F|f)irst)\scommit)|((I|i)nit)$|^(?=.{6,72}$)(feat|(bug|hot)?fix|docs|perf|style|wip|test|revert|chore|ci|refactor|build)(\([a-zA-Z0-9\-\s,]{1,50}\))?:\s(.{1,50})$
/
gm

Description

GIT commit title naming convention (strict), conforms to Conventional Commits (https://www.conventionalcommits.org/en/v1.0.0/)

Submitted by hexrw - a year ago