Some of my Tags have been corrupted and are repeated
eg
GENRE": "Blues;Blues",
"DATE": "2002;2002",
"ALBUM": "Greatest Blues - Golden Greats;Greatest Blues - Golden Greats Disc 1",
to clean then up i could remove everything prior to ';' but this will potentially delete useful data.
Is there a regular expression that will remove a whole string (delimited by leading start of line or ; and trailing ; ) and its trailing ; if that whole string appears later as a part of another string, starting from left hand side of string
eg remove
Greatest Blues - Golden Greats;
from
Greatest Blues - Golden Greats;Greatest Blues - Golden Greats Disc 1
to result in
Greatest Blues - Golden Greats Disc 1
and remove
1 of the "Blues;"
from
Something useful;Blues;Blues;somethingdifferent
to result in
Something useful;Blues;somethingdifferent
help with the regular expression and the subsequent action would be most appreciated.
thank you
It looks a s though some program could not cope with multi-value fields.
Anyway:
The problem for an easy approach is the example that there should be something useful which is not repeated.
The easy approach would be:
Replace with regular expression
Search string: .*;
Replace string:
(leave empty)
Deletes anything in front of a semicolon.
ty ohrenkino
will try this approach, and come back for more advice if there are some instances which need more sophistication. Potentially if i have some multi value tags i might delete some useful data, will tread carefully.
I am also trying to figure out how I can have mp3Tag remove repeated values in a field. I use my Genre Field to house all the possible Genres and some keywords to use in the creation of various smart playlists.
My Genre field will typically look like this: World Music / Latin / Cuban / Son / Trova / Relaxed / Folk etc.
I always use " / " as my separator.
I would like to create an action that would compare any of theses values to the ones preceding it and if it is the same to either delete that value or the previous value.
For instance: World Music / Latin / Cuban / Latin Jazz / Trova / Folk / Latin / Acoustic
would result in
World Music / Latin / Cuban / Latin Jazz / Trova / Folk / Acoustic
So the action would remove the duplicate " Latin " and not the " Latin " in " Latin Jazz ".
This would require the action to look for the " / " Separator. Or I modify all compound Genres I have used to not include spaces, which would be a more tedious approach.
Any help would be greatly appreciated.
I tried ohrenkino's suggestion above but it did not work for my case. I did not think it would, from his description and what I saw, but I did just in case.
To be honest: what you describe is something completely different than the treatment of multi-value fields.
Here is a thread about how to remove duplicate words from a string:
BUT: this function takes the words literally, there is no interpretation that something might be similar to something else. But have a look at it, perhaps you get some of the cases solved.
Thanks! That looks like a good place to start. He is even using it for the same field but is using a different separator. I will try to modify it to meet my needs and report back on that thread.