Removing semicolon during an action

I just swapped over from Windows 11 to macOS and got into a issue i didn’t have on Windows 11.

I am using the Audible API to pull down Audiobook tags and then i run a action to rename and move the files to a smb share running on my Unraid server.

The action i am running is this: /Volumes/media/books/Audiobooks/%ALBUMARTIST%/%series%/%YEAR% - %ALBUM%[ '['%series% %series-part%']']/%album% (%year%)[ '['%series% %series-part%']']$ifgreater(%_total_files%,1, - pt$num(%track%,2),)

I noticed that Books that have a ” : ” get replaced by _ and read up that is how it works here: Why is MP3 Tag Replacing Chars - #15 by Florian

In Windows 11 it just removes “ : “ while renaming and i wanted something similar on macOS, but since that doesn’t seem possible is there a good way to remove the “ : “ all together during an action so i don’t need to manually change it before running the action or have to make more clicks.

I tried adding Replace “ALBUM”: “:” → ““ and it does remove it from the album, but it still replaces : with _ in the filename.

If i run it twice it works with the last addition, but

You could use $replace(%album%,:,) in the format string instead of the simple %album%

Thank you so much, that did the trick.
It even kept the “ : “ in the metadata when i removed Replace “ALBUM”: “:” → ““.