View Single Post
Old 09-27-2011, 10:27 AM   #86
ZaMotH
Junior Member
ZaMotH began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2011
Device: IQ pocketbook
New problem

Hi all. My first post was not posted in the right place.

All right, here are possible my format lists :
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>.+)|)

as for case 1, series and series_index are filled, AND title = Series # 00



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

Can anyone help ?
ZaMotH is offline