Problem with Regex on Mac Version

If I try to replace some filed completely and to use regex ".*" to be replaced with something new. It will display the replacement twice. For example,

IN ARTIST field,

I use Actions -> Quick Actions -> Replace with Regular Expression.

Regex: .*
Replace: ReplacementText

It will be changed to ReplacementTextReplacementText instead of just ReplacementText

Also, if the field is is blank. This regex does not make any changes.

If you want to set a new text for a whole field, use an action of the type "Format value" for that field.
BTW: there are no "empty" fields. If there is no data in a field then the field is not there.

First of all, thanks for taking the time to report this. It's not a bug, but a peculiarity of the regular expression you've used.

.* matches any character between zero and unlimited times, as many times as possible. So it first matches all characters in your string and then an additional match for the zero characters at the end. I know it seems counter-intuitive, but this is how the * quantifier is specified :slight_smile:

As pointed out by @ohrenkino, Mp3tag has not concept of blank fields — those are simply not present in the metadata and you can use the action type "Format value" for, e.g., ARTIST to set the field to ReplacementText.

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