Newbie trying to figure BRU out..

A swapping-ground for Regular Expression syntax

Newbie trying to figure BRU out..

Postby Wa_User2018 » Sat Apr 14, 2018 11:27 pm

Hi,

My 1st look at Bulk Rename Utility and it seems to be a powerful renaming utility, but I just haven't figured it out yet, spending more than an hour to do simple renaming.

My 1st attempt to rename: "01 Anyname.mp3" to "01. Anyname.mp3"

Worked using:

RegEx (1)
Match: (\d*-)[^\s]*\s(.*)
Replace: \1\2

Replace (3)
Replace: ' '
With: '. '

But when the filename has several spaces: "01 Any name.mp3"

Then using the same settings as above removes the 1st characters delimited by the following space character: Result: "01 name.mp3"

I also tried removing the '*' in the expression: But it know replaces all instances of a <space character> with .<space character>
I just want to rename all the (.mp3) which begin with the track number followed with a space character to insert a period (.) before the space cahracter, just after the track number ("01 Any name.mp3" -> "01. Any name.mp3")

RegEx (1)
(\d* )[^\s]\s(.*)
Replace: \1\2

Replace (3)
Replace: ' '
With: '. '

I learn best through examples. Thanks for taking the time to help me understand how to use it.

------- EDIT -------

Never mind. I saw how to do this on a YouTube demonstration here: https://www.youtube.com/watch?v=Y9LvA8ICO9U

I don't need to use Regular Expression or Replace, just need to Add (Insert '.') at position 3 (I don't usually have more than 99 files, i.e. 01-99 as the existing prefix)
Wa_User2018
 
Posts: 1
Joined: Sat Apr 14, 2018 10:52 pm

Re: Newbie trying to figure BRU out..

Postby therube » Sun Apr 15, 2018 11:56 am

(I see you've got it, but...)


On the RegEx end, you could use something as simple as:

1:RegEx
Code: Select all
Match:  (\d*)(.*)
Replace:  \1.\2
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm


Return to Regular Expressions