Groovy web console

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

Comparing_list

Published 7 months ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def value= ["/apidom-3.0.jar-hotfix-Ganges_3_1-poms_ui-2017-02-22-18-09-57","/apidom-3.0.jar-hotfix-Ganges_3_1-poms_ui-2017-02-23-15-03-39","/apidom-3.0.jar-hotfix-Ganges_3_1-poms_ui-2017-02-23-16-24-27","/apidom-3.0.jar-hotfix-Ganges_3_1-poms_ui-2017-02-27-14-40-44","/apidom-3.0.jar-hotfix-Ganges_3_1-poms_ui-2017-02-27-16-36-57"]
def employee = ["apple-dev","moto-rel","redmi-h","cool-hot"];
def branch=["dev","rel","hot"]

def myList = []
for(emp in employee) {     
//for(ba in branch) {
if(emp.contains(branch))
print emp
myList.add(emp)
print "\n"
 
//}
}
print myList