Capitalize words with no vowels


Hello fellow members!

There's a trend for electronic music producers to identify themselves with aliases that have no vowels (e.g.: MSTRKRFT, MRK1, SPKTRM, XTC, etc.). Is there anyone willing to create a action to identify those cases and convert them to UPPER CASE?

Much obliged as always! :slight_smile:


Use an scripting expression like that ...


For this example I have assumed only one word in the tag-field PRODUCER.
Your task is to detect the right 'word' in your context.



Hello DetlevD!

Although you have a point there, the regexp i'm looking for is much less strict in what comes to detecting these words.
Let's say you have something like (e.g.: Someone - Something (MSTRKRFT remix). You never know in which field you will find the artist... :slight_smile:


I can't understand quite well this regexp so this is my dumbass interpretation of it... :smiley:


Yes, you have detected the problem of this task!

To find the right word in a string, which is the producer name, so such a string like your example string should be splitted into substrings respectively into temporary tag-fields respectively into a temporary meta tag-field.
It would help to isolate the right word into a single tag-field.

Then test each substring element respectively each meta element against a list of known producer names.
If a match is found, then change the notation of the element respectively exchange the element with the correct spelled name of the producer from the list of known producers.

I would say that Mp3tag has no proper scripting functions to solve this task easily.



Let's say that the regexp must obey the following conditions:

Find a 2+ letter word with no vowels, only digits and consonants. upper case it, done.



Well here is a proposal ...

$regexp('Someone - Something (MStrKrFt remix)','\b([^aeiouy ]{2,})\b','\U$1',1)

Someone - Something (MStrKrFt remix)
Someone - Something (MSTRKRFT remix)

$regexp('Someone - Something (by dj spktrm remix)','\b([^aeiouy ]{2,})\b','\U$1',1)

Someone - Something (by dj spktrm remix)
Someone - Something (by DJ SPKTRM remix)



I'm sure it works flawlessly, i'm just trying to figure it out how to apply that regex to all tagfields...




I found a small flaw in this regex. The extension of the file gets upper cased as well, surprisingly i tried to replace MP3 for mp3 using the _FILENAME tag field but with no results whatsoever. What am i doing wrong here?


I would say, that there is no flaw in the regex, but the application of the regex might be wrong in the given Mp3tag environment.

You can change the notation of the file extension by using an action of type 'Replace using Regular Expression' (this feature is special to this action type only).

Better you use the proposed scripting expression together with an action "Format value".

You are acting wrong when working on all tag-fields the same at once, doing so by running the regular expression against the pseudo tag-field _ALL.
There are tag-fields, which should not be touched, for example UNSYNCEDLYRICS or COMMENT.



I've found a regex that Pone created that ables me to replace MP3 for mp3:


Original: .MP3$

Replace with: mp3

I'm having difficulty modifying this regex to it can be applied to all upper-case characters contained in the extension...


What you're saying makes sense but let's say that i have 100 files to tag? It would be tedious and redundant to apply the "format values" in each one of them...

Ok, i believe i can get around this. I'll create 2 actions one for the %artist% and other for the %title%, it's a work around but it will work... :stuck_out_tongue:


You could also try to use _TAG instead of _ALL if you only want to modify tags. That should exclude _FILENAME so i would expect that the extension stays unchanged.

In case that you only want to modify a subset of fields, you should create a named action group, and add one "Format value" or "Replace with regular expression" action per field to this action group. So if you want to modify five fields you will end with a single action group, containing five actions, one for each field. You can now select your 100+ files and execute the action group on them. Thats it.