Newbie Needs Help!

A swapping-ground for Regular Expression syntax

Newbie Needs Help!

Postby Rushian » Sun Aug 27, 2017 9:40 pm

Hi I am trying to fix my music library and I need either remove the first word after the track number (that is after a -) or the last word in the file name as per the example below

01-Devo Whip it.wav I need this to be 01-Whip it.wav

or I can have

01-Whip it Devo .wav I need this to be 01-Whip it.wav

Any help is greatly appreciated!!
Rushian
 
Posts: 1
Joined: Sun Aug 27, 2017 9:34 pm

Re: Newbie Needs Help!

Postby KenP » Mon Aug 28, 2017 12:30 pm

There's no way that I can think of to tell BRU to determine when to delete the last word or the word following the track number.

You will need to filter which files you want to work on, but there's no way we can tell you how to filter the files with the information given.

I can show you how to delete the last word or the word following the track number, but as I say you will need to filter the files somehow.

To delete the word following the track number:
    RegEx (1)
    Match: (\d*-)[^\s]*\s(.*)
    Replace: \1\2
This changes "01-Devo Whip it.wav" to "01-Whip it.wav"


To delete the last word before the file extension:
    RegEx (1)
    Match: (.*)\s\w*$
    Replace: \1
This changes "01-Whip it Devo .wav" to "01-Whip it.wav"
KenP
 
Posts: 193
Joined: Sat Jul 30, 2016 11:25 am


Return to Regular Expressions