I have retrieved an array of strings that are
0.0.1
0.0.10
0.0.2
Since this is string with multiple dots I had to remove dots to compare them which I did it following way
$array = $r.Links.outerText.replace('/','') |
Where {$_ -notmatch $filter} |
% {$_ -replace('\.', '')} |
sort {[double]$_}
This gives me
001
002
010
but now I want to retrieve the original value of the last value which is 0.0.10. How should I do that? or is there any other approach to sort without replacing the dots?