I have a list of Strings:
def parsed_list = ['29/29(100%)', '36/36(10%)', '32/32(100%)', '18/18(100%)', '18/18(100%)', '6/6(100%)']
I would like to extract percentage values: 100%, 100%, 100%, 100%, 100%, 100%
I'm trying with these piece of code:
def percentages = parsed_list*.find(/\d %/)
But I get this error: spread not yet supported for CPS transformation
What should I improve?
CodePudding user response:
Try without spread operator
parsed_list.collect{it.find(/\d %/)}