View Single Post
Old 07-27-2009, 01:52 AM   #5
Justy
Fanatic
Justy has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud of
 
Justy's Avatar
 
Posts: 547
Karma: 27509
Join Date: Dec 2007
Location: Greater Vancouver Area, BC, Canada
Device: Nexus 7, Sony Xperia z3 tablet, Kobo Glo, Boyue T63
Quote:
Originally Posted by user_none View Post
The following regex will match both cases provided they're no _ within each section.

Code:
[^_]+_(?P<author>[^_]+)_((?P<series>[^_]+)_)?(?P<title>[^_]+)
Thanks for the code, I finally got a chance to test it out today. It works great except for the fact that I forgot to mention that I put in the series index after the series name.
  • with series:
    [**]Genre_AuthorLastName_Series1_Title
    [**]Genre_AuthorLastName_Series2_Title
    [**]where 1 and 2 are the positions in the series.
  • w/out series: Genre_AuthorLastName_Title

Any ideas?
Justy is offline   Reply With Quote