IPB

Welcome Guest ( Log In | Register )

> Notice!

Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.

Also make sure you've read the Forum Guidelines before posting in this forum.

 
Reply to this topicStart new topic
> Regex to export valid filenames
lbardh
post Apr 15 2007, 06:02
Post #1


Member


Group: Members
Posts: 2
Joined: 15-April 07
Member No.: 4777
Mp3tag Version: 2.37i



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
Go to the top of the page
 
+Quote Post
dano
post Apr 15 2007, 11:00
Post #2


Moderator


Group: Moderators
Posts: 5688
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.65



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

! This syntax only works since 2.37i

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


--------------------
Go to the top of the page
 
+Quote Post
lbardh
post Apr 15 2007, 14:56
Post #3


Member


Group: Members
Posts: 2
Joined: 15-April 07
Member No.: 4777
Mp3tag Version: 2.37i



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%,-)
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st October 2014 - 16:10