Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(^(bugfix|feature)\/[a-z0-9]+(-[a-z0-9]+)*(-[0-9]+)?$|^(hotfix|support)\/(\d+.\d+.\d+)$|^(develop|main|release|staging)$)
/
gm

Description

This is the regex for our branch names.

Submitted by stefanfrede - a year ago