Groovy web console

subscribe to the feed Subscribe
to this
site

task2

Published 3 weeks ago by gokul
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def output  = """ define contact{        contact_name         IPNOC
alias                           Network Monitoring Center
email                           ip-noc@libertyglobal.com
use    default_user
}"""
def res=[:]
def data1= output.findAll(/(?<=contact_name).*/)  
def data2= output.findAll(/(?<=alias).*/)
//res.put(data1,data2)
data3= data1 +":"+data2
print data3