Hello - I am new to RegEx but it should do what I want and I'm hoping someone lovely will be able to assist! I can't find anything on the interwebs which provides a comprehensive solution, so I'm turning to you...
I have read https://www.bulkrenameutility.co.uk/forum/viewtopic.php?f=3&t=453 which sounds like it should work, and it does to a degree
The expression from above is:
Search: (.+\D\s*)(\d)$
Replace: \10\2
Basically, I have thousands of files with names which follow no real naming convention. I want to find any SINGLE DIGIT NUMBER and add a 0 to the start,so that when the files are listed (in SharePoint) they list correctly.
So currently:
1
2
...
10
Lists as:
1
10
2
...
With leading zeros, it'll be:
01
02
...
10
The code above works, BUT if there is anything after the single digit, it fails.
e.g.
Lesson 1 - becomes Lesson 01
Lesson 1 DNA - doesn't change
You mission: To improve the code to catch all single digits anywhere in a filename?