Regular Expressions 101

Community Patterns

Basic Git pull request title validator

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(\[WIP\])?(\[PIDSS-\d+]) [[:upper:]].{3,}
/
gm

Description

Validates that there an optional [WIP] followed by a bracketed ticket number, PIDSS-n*, a space, and a string beginning with an uppercase character.

Submitted by David E Nedrow - 10 months ago