Error while parsing regular expression


I want to extract specific part of folder path and apply it as genre.


D:\Music\Psybient\Albums\Shpongle\2005 - Nothing Lasts But Nothing Is Lost

D:\Music\Psytrance, Goa\Compilations\1999\Psionic Sounds

Notice the genre? All right.

Why doesn't this work?

$regexp(%_folderpath%,D:\\\\Music\\\\([\w ,]+)(\\\\)(.*),$1)

I get this error:

Invalid preceding regular expression prior to repetition operator. The error occured while parsing the regular expression fragment '\Music(+HERE)()(.)'..mp3


put the expression in single quotes if it contains chars like [ , that have special functions from the scripting language:

$regexp(%_folderpath%,'D:\\Music\\([\w ,]+)(\\)(.*)',$1)


You can simplify that a little, too



Thanks and thanks!