Remove newline / linebreak characters from tag fields

Hello, first a big thanks to you scoopeezy,
your Action helped me alot. But now i have a problem.
I copied your Actions and all worked fine untill renaming files.
Syntax error... so i looked around and figured out that something strange happend.
my Action file looks good but at the end of some commands there are \n\n's
example: [#4] T=5 F=ARTIST 1=$trim(%artist%)\n\n

so now i cannot rename my files :D, so my question is, is there a way to remove the "hidden" signs in the tag fields? i searched the net but didnt finde something, so i hope you can help me. because fully retagging 100k+ files is really bad. i dont know how that weird stuff can happen but now it is so... thank you verry much

ps: sorry for my bad english im from germany

have you tried the $validate() function on the mask that you use to rename your files?

When I try the $validate function then the fields will be empty. So I think that the tags got now lines in front of the text? :thinking: Sorry I'm new to mp3tag scripting stuff

a quick search through this page does not show any action where the paragraph characters are added ... so perhaps you check your actions again.

To get rid of the special characters:
create an action of the type "Replace with regular expression" for ARTIST and see if any of the following search strings produces the correct result:
Leave the replace string empty.

Yes that was the problem. Made it with copy&paste but at the end there were added newlines. Now I figured out where they are and got them eleminated. Thank you for your help

OK glad you were able to fix this issue! I agree with your conclusion that this was likely caused by errant new line characters from copying/pasting my code from here into MP3Tag.

For others, to avoid this first paste the code into a text editor, and then copy that code into MP3Tag.

  • scoop