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
"
^(?<branchType>hotfix|feature|maint)\/(?<tasMaMi>(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?<isTest>-test)?)\/(?<branchName>[\w\-\.\d]{1,30})$
"
gm
Input 1
hotfix/8.9/newhotfix hotfix/maintfix1 feature/newfeture feature/new-feture_1 hotfix/8.9 hotfix/0.6/preProdFix PR-12 hotfix/8.9/this_branch_name-is_way_To_long hotfix/8.11/test-8.12-KB-flow hotfix/8.12-test/test-8.12-KB-flow
Extraction
hotfix/8.9/newhotfix hotfix/maintfix1 feature/newfeture feature/new-feture_1 hotfix/8.9 hotfix/0.6/preProdFix PR-12 hotfix/8.9/this_branch_name-is_way_To_long hotfix/8.11/test-8.12-KB-flow hotfix/8.12-test/test-8.12-KB-flow