I have a lot of strings that I am going to loop through and be changing various characters in. One thing I need to do is convert numbers at the beginning of the string to their string representation. Example: '10_hello_1'
to 'ten_hello_1'
. There will always be a '_' after a number. I have tried various things such as: $a.replace('\d{2}_','')
(just to at least delete the beginning numbers) but that does not work.
I have even thought of breaking this down further and using a '$a.startswith()` clause but can not get powershell to ask "does this start with any arbitrary number".
I have found a lot about string manipulation on the web I just can't piece it altogether. Thanks!