def lista = ['01.um','02.dois','03.tres']
//opcao 1
assert lista.
collect {it.
take(2)} == ['01','02','03'] assert lista
*.
take(2) == ['01','02','03']
//opcao 2
assert lista.
collect {it.
tokenize(".").
first()} == ['01','02','03']
println "Teste Ok!"
ZGVmIGxpc3RhID0gWycwMS51bScsJzAyLmRvaXMnLCcwMy50cmVzJ10KCgovL29wY2FvIDEKYXNzZXJ0IGxpc3RhLmNvbGxlY3Qge2l0LnRha2UoMil9ID09IFsnMDEnLCcwMicsJzAzJ10KYXNzZXJ0IGxpc3RhKi50YWtlKDIpID09IFsnMDEnLCcwMicsJzAzJ10KCi8vb3BjYW8gMgphc3NlcnQgIGxpc3RhLmNvbGxlY3Qge2l0LnRva2VuaXplKCIuIikuZmlyc3QoKX0gPT0gWycwMScsJzAyJywnMDMnXQoKcHJpbnRsbiAiVGVzdGUgT2shIg==