Groovy web console

subscribe to the feed Subscribe
to this
site
merge_branch_pattern (via #groovywebconsole)
tweet this snippet Tweet
this
script

merge_branch_pattern

Published 5 days ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def str = '(?i)^remotes/origin(?!(/integration))(?!/release)(/master|.+/(feature)|/bugfix/.+)'

def v1 = 'remotes/origin/release'
println "${v1}: \t\t\t ${v1 ==~ str}"
def v2 = 'remotes/origin/release/4.2.300'
println "${v2}: \t\t ${v2 ==~ str}"
def v3 = 'remotes/origin/release/soarsched-4225'
println "${v3}: \t\t ${v3 ==~ str}"
def v4 = 'remotes/origin/master'
println "${v4}: \t\t\t\t ${v4 ==~ str}"
def v5 = 'remotes/origin/master/test'
println "${v5}: \t\t\t ${v5 ==~ str}"
def v6 = 'remotes/origin/integration'
println "${v6}: \t\t\t ${v6 ==~ str}"
def v6a = 'remotes/origin/rc5'
println "${v6a}: \t\t\t\t ${v6a ==~ str}"
def v7 = 'remotes/origin/sp1'
println "${v7}: \t\t\t\t ${v7 ==~ str}"
def v7a = 'remotes/origin/sp1/feature'
println "${v7a}: \t\t\t ${v7a ==~ str}"
def v8 = 'remotes/origin/sp1/soarsched-4223'
println "${v8}: \t\t ${v8 ==~ str}"
def v9 = 'remotes/origin/sp1/soarsched-4240'
println "${v9}: \t\t ${v9 ==~ str}"
def v10 = 'remotes/origin/feature-name/feature'
println "${v10}: \t\t ${v10 ==~ str}"
def v11 = 'remotes/origin/feature-name/jira-key'
println "${v11}: \t\t ${v11 ==~ str}"
def v12 = 'remotes/origin/bugfix/soarsched-4237'
println "${v12}: \t\t ${v12 ==~ str}"
def v13 = 'remotes/origin/testbranch/test'
println "${v13}: \t\t ${v13 ==~ str}"