Implement a "Number Space" Function into the Add (7) Rule

Would you like Bulk Rename Utility to offer new functionality? Post your comments here!

Implement a "Number Space" Function into the Add (7) Rule

Postby spacev2 » Wed Feb 28, 2024 3:38 am

Sometimes I have un-organized file names that look like the following:

ThisFileNameNeedsRenaming01


In the Add (7) Rule, using the "Word Space" function would change the file name to the following:

This File Name Needs Renaming01


However as we can see the numbering in the file name does not get spaced. It would be very useful if there was some kind of "Number Space" function in the BRU application that can insert a space between joined letters and numbers, so that the file name in the examples above would look like the following:

This File Name Needs Renaming 01


Thanks
spacev2
 
Posts: 22
Joined: Fri Dec 22, 2023 10:58 pm

Re: Implement a "Number Space" Function into the Add (7) Rule

Postby Admin » Wed Feb 28, 2024 11:19 pm

To rename from

This File Name Needs Renaming01

To

This File Name Needs Renaming 01


Use RegEx(1)
Match : (.*)(\d\d)
Replace: \1 \2
Admin
Site Admin
 
Posts: 2354
Joined: Tue Mar 08, 2005 8:39 pm

Re: Implement a "Number Space" Function into the Add (7) Rule

Postby spacev2 » Wed Feb 28, 2024 11:50 pm

Admin wrote:To rename from

This File Name Needs Renaming01

To

This File Name Needs Renaming 01


Use RegEx(1)
Match : (.*)(\d\d)
Replace: \1 \2


Thanks for the reply.

This is great to know that the RegEx (1) Rule can solve the problem. However the RegEx (1) Rule is just too advanced and too confusing for me to utilize. I struggle to wrap my head around it even after reading through the user manual, so please take that into consideration.

If I had a file named as the following:

ThisFile01NeedsRenaming

and the desired outcome is to be:

This File 01 Needs Renaming


If the RegEx (1) is capable of doing this, can you please provide the syntax for me ?

Thanks
spacev2
 
Posts: 22
Joined: Fri Dec 22, 2023 10:58 pm

Re: Implement a "Number Space" Function into the Add (7) Rule

Postby therube » Thu Feb 29, 2024 5:19 pm

1:RegEx
Match: (.*)(\d\d)(.*)
Replace: \1 \2\3


7:Add -> Word Space

Code: Select all
ThisFile01NeedsRenaming - i.e., 'spaced out'.TXT
->   This File 01 Needs Renaming - i.e., 'spaced out'.TXT


Looks like the above should work.
Suppose there could be, will be, edge cases.

Basically...

find anything up to
find 2 digits
find everything else

keep all as is, except add a space before the 2 digits


Above will fail on something like this [an unwanted space is added] (but that too can be worked around, I suppose):
Code: Select all
ThisFile 02 NeedsRenaming - i.e., 'spaced out' - Copy.TXT
->   This File  02 Needs Renaming - i.e., 'spaced out' - Copy.TXT
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm

Re: Implement a "Number Space" Function into the Add (7) Rule

Postby spacev2 » Thu Feb 29, 2024 8:12 pm

Thank you for the help guys, I appreciate it.

I will create and save some presets and I will study the RegEx (1) further to try and understand it better.

Thanks
spacev2
 
Posts: 22
Joined: Fri Dec 22, 2023 10:58 pm


Return to Suggestions