Capitalize album references?


Good evening fellow members!

I've been noticing another pattern regarding album references, they all contain numbers in between (e.g.: Huma8028, Iconia (Hbt026), (Freakmp3006), Ashadow25cd, Ep-Fprdigi029-Web).

I want to create a Regex action that obeys the following conditions:

If a word contains numbers regardless of their position, UPPER CASE it. Can anyone help? :slight_smile:



'Harakiri' you are a member of the forum from the same days when I came into the forum too, about 5 years ago.
In the meantime you have asked all kinds of questions.
Yesterday you got a big help again - which should help now for this newly request too - with small modification of the given regex arguments, hmm, I hope so.
You should be able to find the similar solution for yourself.

So if you want to create, then do create.
If you are able to describe the rules, you are able to apply the rules.
Test your result, and if it errors out, then present your scripting expression here and someone may be willing to help you out of the calamities.
Thinking and experimentation is mostly your part.



I believe i suffer from ADD or something alike, i was never good at math and regex'es get confusing in my head. At the same time i ask for help i try to experiment with what i already have. I do understand your point and i apologize the inconvenience.


Could you be more specific, what characters of your example string should be uppercased?
Is it always such a long string with many cases at once?
Or is each substring element available separately in one tag-field?
How is this tag-field named?



If you want only the letters to be in upper case then simply appy a filter that shows (in whatever field you have that data) tracks with numbers in it.
Then create a user-defined action to modify the upper/lower case and set the option to "CAPITALS" as numbers don't "capitalize", they stay the same.
The filter could look like
%whateverfield% MATCHES ".\d.*"


I've searched the Internet and found something interesting, which might work for this case.
See following scripting expressions, which utilize the Mp3tag function $regexp.

$regexp('Huma8028, Iconia (Hbt026), (Freakmp3006), Test, 4711-EdC, Ashadow25cd, Ep-Fprdigi029-Web','\b([[:alpha:]]+[[:digit:]]+[[:alnum:]]*|[[:digit:]]+[[:alpha:]]+[[:alnum:]]*



Huma8028, Iconia (Hbt026), (Freakmp3006), Test, 4711-EdC, Ashadow25cd, Ep-Fprdigi029-Web
HUMA8028, Iconia (HBT026), (FREAKMP3006), Test, 4711-EdC, ASHADOW25CD, Ep-FPRDIGI029-Web $regexp('Huma8028, Iconia (Hbt026), (Freakmp3006), Test, 4711-EdC, Ashadow25cd, Ep-Fprdigi029-Web','\b([-[:alpha:]]+[[:digit:]]+[[:alnum:]-]*|[-[:digit:]]+[[:alpha:]]+[[:alnum:]-]*)\b','\U$1')

Huma8028, Iconia (Hbt026), (Freakmp3006), Test, 4711-EdC, Ashadow25cd, Ep-Fprdigi029-Web
HUMA8028, Iconia (HBT026), (FREAKMP3006), Test, 4711-EDC, ASHADOW25CD, EP-FPRDIGI029-WEB



Forgive me lord for i have sinned! I actually found a solution in other site:

Therefore i could create several Regex'es based on this one:


Matches any word followed by numbers.

I created several derivatives from this one:





I couldn't manage to create a single Regex that could handle all the album references so i worked around my problem. I would be glad to hear if someone could convert this array of expressions into a single one! :slight_smile:


After testing your beautiful regexes i kinda feel like a redneck. This works wonders, many thanks! :slight_smile: