How to Check if a String Starts with a Number in PowerShell
To check if a string starts with a number in PowerShell, use -match with the pattern ^\d. The caret anchors the match to the start, and \d is any digit: For strict 0 to 9 only, use ^[0-9] instead, because \d accepts digits from other alphabets too. I tested every example in PowerShell 7 and … Read more