Groovy web console

subscribe to the feed Subscribe
to this
site

test1

Published 3 weeks ago by gokul
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def COMMAND_RESULT = """define contactgroup{ contactgroup_name webio-admins
alias UIM:NAGIOS-TEST-WEBIO;
members emusic
}
define contactgroup{
contactgroup_name voice_ops
alias UIM:NAGIOS-TEST-WEBIO1;
members emusic,mkopitsch,gmohan
}"""

def data = COMMAND_RESULT.findAll(/(?<=alias).*/)
//def data = COMMAND_RESULT.split(':');
println data
def names = COMMAND_RESULT.findAll(/(?<=members).*/)
names.add("afasiolo");
println names