How would one go about writing a one size fits all powershell script that could extract specific numbers from a string? Let's say I have 3 computers and their names are GT0104MTR, GT0040MTR, and GT0444MTR. The numbers 104, 40, and 444 are the characters I want to extract..
How would I ignore any leading zeroes and grab from where the number begins and ends, even if the number ends with a zero?
I hope this makes sense and thanks for anything that points me in the right direction!