View Single Post
Old 08-16-2011, 12:10 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,135
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by nynaevelan View Post
Hi:

I have some books that are named like this Anthony, Piers - Xanth 28 - Currant Events

This is the regex which I have now: (?P<author>[^_]+) - (?P<series>[^_]+) - (?P<title>.+)

Can someone help me adjust it so that the index number (28 in this example) can be inputted into the index field instead of part of the series name?

Nyn
I pasted your title into the test filename box, added .epub and pressed test.

Code:
^((?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>.+)
This template set all 4 fields (author was LN, FN)
theducks is offline   Reply With Quote