I need help understanding $regex in mp3tag

Hi guys,
I studied computer science but I seem to be totally misunderstanding regex in mp3tag. I mean, why is


Drüg (feat. Emie)

_D_r_ü_g_ _(_f_e_a_t_._ _E_m_i_e_)_

I expected
D_ü_ (____. E___)

$regexp(x,expr,repl) replaces the pattern specified by the regular expression expr in the string x by repl.

You have to keep in mind the provided scripting language has its own syntax and special chars.
It is recommended to put especially regex patterns in ' apostrophes so you don't have to escape each ( or [ character.
Try $regexp(%title%,'([a-z])+',_)

Thanks bud, I will try using apostrophes.

Still no luck... I don't get it.
is producing nothing. Shouldn't ([A-Z][a-z]\xdc\xfc\d\s)+ select Drüg, feat and Emie?

Afaik ([A-Z][a-z])+ finds every word that consists of uppercase and lowercase letters ranging from a to z. But in mp3tag literally nothing gets found or replaced at all. What am I missing? I am losing my believe in myself.

I found the solution... I have to include the | OR operator: $regexp(%title%,'([A-Z]|[a-z])+',_)
Now I can sleep in peace.

Maybe instead of $regexp(%title%,'([A-Z][a-z]\xdc\xfc\d\s)+',_)
you meant
Understand the difference
[A-Z][a-z] vs [A-Za-z]

1 Like

The thing is that I tried that and didn't get to the solution I expected either. But I slowly begin to understand. However, thanks for your help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.