I have code like this:
def a = [".15", "7..", "402", "..3"]
c = a.permutations() as List
println c[0].join()
Which outputs 7....3402.15. In this one, I need to get only numbers, i.e 7,3402,15. Even more notably I need there sums i.e in our example we would get 7,9,6.
How this can be done in groovy?
As a quick response, one solution would be: