Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
`
^((build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|¯\\_\(ツ\)_/¯)(\(\w+\))?(!)?(: (.*\s*)*))|(Merge (.*\s*)*)|(Initial commit$)
`
m
Unit Tests
must include colon
include colon without type
breaking change
build(three)!: test
Merge plus something
Initial commit
initial commit lowercase fail
must have description
no whitespace
just name
one noun in type
don't start with whitespace
Merge
from
master
\n
###
new
line
→ regex does match