Help - Search - Members - Calendar
Full Version: Regex to export valid filenames
Mp3tag Forums > Mp3tag - International > Support
lbardh
Hi, I'm fairly new to using regex in mp3tag.

I'm trying to bulk export the cover art to all of my albums to directory using the 'quick action' -> 'export cover to file' 'c:\Covers\%artist%-%album%'

This works great unless there are special characters in the album name (i.e. : or \ etc.).

What regex expression can I use to remove (or replace) any instance of a non-alphanumeric character in the album name? I need to do this without retagging the original files?

I'd like to replace %album% = 'Star Wars - Episode 1: The Phantom Menace'
with 'Star Wars - Episode 1 The Phantom Menace'
or 'Star Wars - Episode 1- The Phantom Menace'

Thanks
dano
$replace(%album%,:,,\,)
or
$replace(%album%,:,-,\,-)

! This syntax only works since 2.37i

http://help.mp3tag.de/en/main_scripting.html
lbardh
QUOTE (dano @ Apr 15 2007, 03:00) *
$replace(%album%,:,,\,)
or
$replace(%album%,:,-,\,-)

! This syntax only works since 2.37i

http://help.mp3tag.de/en/main_scripting.html


Thank a lot. That worked great. I must have overlooked the scripting page.

I found what will eliminate all invalid characters is:
$validate(%artist% - %album%,-)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.