Hello all,
How do I strip leading numbers and dash from the TITLE tag?
I've done filename > tag, now I'd like to use 'replace with regex' to strip the leading numbers and dash from the TITLE tag.
Sorry, this has probably been asked a zillion times before (even by me!), but google search led me down a rabbit hole of confusion!!
Do I need something in the regular expression box and something in the 'replace matches with' box?
format is: ' 01-Concert Intro '
sorted (for this case anyway)...
simply removed the first three characters from the title tag with:
^.{3}
Or see here - as it is safer to look for digits than just any character
I could not for the life of me figure out this multistage process.
After a lot of trouble (even though I am a professional programmer!)
I finally got it working.
I will describe the steps as best possible,
having taken my steps from others' postings.
I am sure there is an easier way to do this!
Goal:
Given filename: 01 SongName.mp3
Create title: SongName
Select Actions from the Convert menu.
Click the Star button to create a new Action Group.
I named mine: Strip leading numbers
Click…
thanks (admittedly i was a bit ham-fisted)
The format of no spaces between number, dash and track title is a bit of a bugger.
Normally I can do filename > tag ' %track% %dummy% ' to get track numbers.
In this case I had to do replace with regex: _FILENAME,
Regex:
(?<!\s)-|-(?!\s)
Replace with:
" - "
then I was able to do the usual filename > tag for the track numbers.
AudioBabble:
01-Concert Intro
With
%dummy%-%title%
should also lead to success
Or a regular expression like
\d+\s*-\s*
would delete the leading number and a hyphen with or without spaces if you leave the "Replace with" empty.
This only works for exactly the first 3 characters at the beginning of a TITLE tag.
This will NOT work as expected for this examples:
01-Concert Intro -> -Concert Intro
1-Concert Intro -> oncert Intro
123-Concert Intro -> -Concert Intro
It does not look for a dash and not for various amount of digits.
Please be careful with this "solution".
This only works for filenames with a space in the filename.
01-Concert Intro with %track% %dummy% would lead to have 01-Concerto in TRACK