This bit of code seems to be working intermittently for me, and I can't nail down what the problem is.
if (($Places[-1] -match "([0-9])") -and ([bool]($Matches[0] -as [int]))) {
some stuff
}
If I make it two different if's it always works, but for the life of me I don't know why this -and version isn't working all the time. I may also be testing excessive conditions, as there really should never be a decimal number there to find, but it seems like this should still work all the time, given a single one or two digit number to be found in the string.
Thoughts?
Gordon