tried some more ...
I tired again and got some good things ... withou the author
Here are all my possible filename list :
1) Series # 00.zip
2) Series # 00 - Title.zip
3) Series # 00 - Title [author].zip
4) Series # 00 [Author].zip
5) Title.zip
6) Title [Author].zip
Without the author, I found out that this would work perfectly for 1, 2 and 5
(?P<series>.+) # (?P<series_index>\d+)( - (?P<title>.+)|)
For case 1, series and series_index are filled, AND title = Series # 00
For case 2, series, index and title are filled
For case 3 title is filled
But everytime I try to add the " [Author]", I get messed up all around.
I know the parsing should go like ( \[(?P<author>.+)\[)
But I can not make it conditional
added a "?" at the end, but after reading some other forums, I do not fully understant the "?" meaning
Tried the trick (( \[(?P<author>.+)\[)|), but that throws me the error "Attribute editor :'Nonetype' object has no attribute replace"
Can anyone help ?
|