Hi, I have several album titles that could have a (CD1), (CD2) or even (CD1 - Bonus) at the end of them, whenever they consist of more than 1 CD. For example:
The Best Rock Album In The World (CD1)
The Best Rock Album In The World (CD2)
Deep Purple - Made In Japan (25th Anniversary Edition) (CD1 - Remastered)
Deep Purple - Made In Japan (25th Anniversary Edition) (CD2 - The Encores)
Most album titles of course don't have that at the end of them as they are single albums
I am trying to write a playlist export function for these and I want to strip off the part at the end
When I have the following syntax I successfully create the m3u8 file with #EXTM3U as the first line
$filename(M:\Playlists\%album%.m3u8,utf-8)#EXTM3U
A second script then successfully creates the rest of the playlist
$filename(M:\Playlists\%album%.m3u8,utf-8)$loop(%counter%)#EXTINF:%_length_seconds%,%artist% - %title%
%_path%
$loopend()
But when I try to strip out the (CD1) etc using the following I get the output file correctly named but its blank
$filename(M:\Playlists\$regexp(%album%,'^(.+?)\s\(CD.*',$1).m3u8,utf-8)#EXTM3U
$filename(M:\Playlists\%album%,'^(.+?)\s(CD.*',$1).m3u8,utf-)$loop(%counter%)#EXTINF:%_length_seconds%,%artist% - %title%
%_path%
$loopend()
The regex appears to be stripping out the part at the end of the album title but for some reason I get no data in the file. Any ideas
Thanks