PowerShell sort array


My array is spits out this.

Any short/simple code to fix it to:


You can sort by expression, take everything after the first letter and cast it to integer:

You can also make the solution more generic by removing any non-digit characters:


PowerShell sort array by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply