Groovy web console

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

Test1

Published 5 months ago by TestyMcTest
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def testRegex = /^guea.*tst[0-9]/
def stageRegex = /^guea.*stg[0-9]/

HOSTNAME = "gueabetwebstg01"

  if (!(HOSTNAME ==~ testRegex) || !(HOSTNAME ==~ stageRegex)) {
     print "matches"
  } else {
     print "nomatch"
  }