Trying to sort(ascending order) the list of strings in natural / human readable order. Something like below.
def list = ['f3', 'f10', 'f1', 'f12', 'f2', 'f34', 'f22','f20','f50', 'f5']
list.sort()
I could find sample java code in GitHub. But looking for groovy way. Any help is appreciated.
Desired output:
f1, f2, f3, f5, f10, f12, f20, f22, f34, f50
Result: