View Single Post
Old 08-03-2010, 04:05 PM   #12
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
I entered this as the Regular Expression:
Quote:
Originally Posted by user_none View Post
Code:
[^_]+_(?P<author>[^_]+)_((?P<series>[^_\d]+)(?P<series_index>\d+)?_)?(?P<title>[^_]+)
My test file names were:
  1. Genre_AuthorLastName_Title.prc
  2. Genre_AuthorLastName_Series01_Title.prc
which gave the following results respectively:
  1. Title = Genre AuthorLastName Title
  2. Title = Genre AuthorLastName Series01 Title

It's been a while since I played with Calibre but since I'm not working right now I thought I'd finally do that first mass import of all my eBooks. Unfortunately for me, the coding I learned in school for C+ didn't look anything like this.
Justy is offline   Reply With Quote