View Single Post
Old 01-23-2012, 08:12 PM   #2
puterdude
Junior Member
puterdude began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2011
Device: kindle
Question Problem with Author - Series # - Title Regex

Hello,

Any help solving this problem would be greatly appreciated -- I've been pulling out my gray hair for the last few days.


When I used the above regex and others I have found on this forum:

1. (?P<author>.+?) - (?:\[(?P<series>.+?) ?(?P<series_index>[\d\.]{1,4})?\]) - (?P<title>.+)

2. ^((?P<author>([^\_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<series>[^0-9\-]+) ([-#] ?)?(?P<series_index>[0-9.]+)?\s*-\s*)?(?P<title>.+)

3. (?P<author>[a-zA-Z'. ]+?) - \[?((?P<series>[a-zA-Z' ]+) (?P<series_index>[0-9\.]+)\]? - )?(?P<title>[^\.]+).*


I have the following results (using 'Piers Anthony - Incarnations of Immortality 05 - Being a Green Mother.epub' as an EXAMPLE):

Attachment 1. -- Add dialog (with DEFAULT settings) with regex test -- results display correct parsing.

Attachment 2. -- any series ebook added into calibre with INCORRECT results, i.e. series preceded title and series NOT inserted into series field.


I've tried this with several different regex using the lastest version of calibre (0.8.36) and have the same incorrect results.

Could I have some incorrect setting in calibre?

TIA!!
Attached Thumbnails
Click image for larger version

Name:	Add_Dialog.png
Views:	328
Size:	18.5 KB
ID:	81635   Click image for larger version

Name:	1-23-2012 6-02-50 PM.jpg
Views:	339
Size:	18.0 KB
ID:	81636  

Last edited by puterdude; 01-23-2012 at 10:07 PM. Reason: Emoticons do not display correctly
puterdude is offline   Reply With Quote