I’ve got a list about 4,000 items long for hostnames that I’m trying to format. The list came from site ID’s and the hostnames are formatted with the site ID’s. The number part is prefixed with zero’s and has to be 5 digits long including padding. How can I write a regex to match and prepend so the format would match the first 3 entries? Simply adding “s00” wont work once the site ID becomes 4 digits.
s00119rtr1
s00119rtr1
s00120rtr1
120rtr1
120rtr1
120rtr1
121rtr1
121rtr1
121rtr1
124rtr1
124rtr1
Thanks!
Here it is in python: