Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2023-12-24 20:12
Flavor·PCRE2 (PHP)

/
^(((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
Open regex in editor

Description

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

Submitted by hexrw