Groovy web console

subscribe to the feed Subscribe
to this
site

searchUIM

Published 5 months ago by Gopal with tags groovy
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
}"""

if(COMMAND_RESULT.contains('UIM:NAGIOS-TEST-WEBIO;')){
    def rt=COMMAND_RESULT.find(/(?<=members).*/)
   // rt.add('afasiolo')
    println rt
}
//def result=COMMAND_RESULT.split('UIM:')