Groovy web console

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

domain_split

Published 3 months ago by facundo espinosa
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def domain = "MLU-MICROWAVES"

def domain_split = domain.split('-')

// Imprimir directamente lo del split
println(domain_split)

// Es exactamente lo mismo que esto
println([domain_split[0], domain_split[1]])