I'm new to MP3tag, and would like to remove the first few characters of a batch of titles. I have come across some forum entries about using Replace with Regular Expression but have not been able to do what I need.
Sample Title: 1453 Here Comes The Sun
Needed Title: Here Comes The Sun
or
Sample Title: 14-53 Here Comes The Sun
Desired Title: Here Comes The Sun
Please also clarify how to do it with batches of files. Confirming that I want to edit Titles, not Filenames.
Load the files.
Select all the files that should be treated.
Click in the toolbar on "Action (quick)"
Select an action of the type "Replace with regular expression"
Field: TITLE
Search string: .*\d+
Replace string:
(leave empty)
Click OK.
The action will modify all files where there is a hit for the search pattern.
Thanks but after putting in the search string, it just left the last character of the original title. Should i put in the number of characters i need to delete? which is 5 characters?
is 6 characters ...
You can test the expression yourself with the function Convert>Tag-Tag
Enter as
Format String:$regexp('14-53 Here Comes The Sun',.*\d+ ,)
This should give the result Here Comes The Sun
An once that works, select TITLE as field and remove the '14-53 Here Comes The Sun' with %title%
As the titles vary, I could not use the instruction for batch files. I am looking at some 50 folders with varying number of files in each 50 to 100 on average.
I was searching for other editing strings and came across $cutleft which I think will work. However I couldnt get it to delete the first 5 or 6 or whatever text/space/number that I need to delete...
.
Action (Quick)>Replace with Regular Expression>Field to "TITLE">Regular Expression to "$cutLeft(TITLE,5)
The action that you use for $cutleft() is not suitable for that function.
You would have to use "Format value".
The more appropriate function would be $left(%title%,5)
But cutting a certain amout of characters is rather unflexible.
My original suggestion used a regular expression (which is a kind of pattern) that said: replace anything followed by a number plus a space character with nothing. The examples you gave showed exactly that kind of pattern. I do not understand why it does not work with at least the files you gave as an example.
Or you could use "Guess value" with
Source pattern: %title%
Guessing pattern: %dummy% %title%
As you do not only have the number in front but also some other numbers in the string, please modify the search string in the action of the type "Replace with regular expression" as follows:
Search string: ^.*?\d
(there is a trailing blank behind the "d")
Replace string:
(leave empty)
2212 Christ and the Law, Part 3 (Matthew 5:19)
becomes
Christ and the Law, Part 3 (Matthew 5:19)
This also works for
22-12 Christ and the Law, Part 3 (Matthew 5:19)
I just tested it on real file, so I know it should work.
So I assume that that what we see is not that what is treated by the action.
Could you open the dialogue "Extended tags" and check the window title if it says "APE" somewhere and not just ID3V2.3 or ID3V1?
If you find APE in the window title, then close this dialogue and check in
File>Options>Tags>Mpeg
what kind of tag versions you read, write and delete.
For APE only "delete" should be ticked, all other options should be off for APE.
If you had to modify the settings, then return to the file list and press Ctrl-T and see if you now see the correct information.
If that is so, then press F5 to refresh the whole list.
Please have a look at the extended tags dialogue with just 1 file selected.
For multiple selected files the dialogue header does not show the tag versions.
i did add the blank as requested in the string though.... thanks to you both as this seems a very common edit and im sure others would find it useful sometime
your help is very much appreciated ohrenkino and florian!