View Single Post
Old 08-26-2012, 03:24 AM   #4
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 7,307
Karma: 11288999
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7, Sony PRS-950, Sony PRS-505, PRS-300
Quote:
Originally Posted by mattam View Post
Thanks for the effort, louwin, but it didn't work.
I tried it on several examples, like the one above or "Pilgrimage - Zenna Henderson - People 1.mobi" and "Holding Wonder - Zenna Henderson.mobi". It didn't work.
I had previously tried playing with parentheses, question marks, etc., but to no avail.
The following work for your examples. I didn't write them so don't ask me to explain them.

For Title - Author - Series I use this regex

Code:
^((?P<title>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<author>[^\-_0-9]+)\s*-\s*)?(?P<series>[^0-9\-]+)(\s*-\s*)?(?P<series_index>[0-9.]+)
For Title - Author I use this regex

Code:
(?P<title>.+) - (?P<author>[^_]+)
I use the Quick Preferences plugin to quickly switch between them as needed.

I currently have 5 different regex I switch between as needed.
__________________
-- Good Reading, Walt --

20GB of free CLOUD STORAGE: Use this link to sign up for a free 15GB Copy.com cloud storage account and we both get an extra 5GB of free space.
DoctorOhh is offline   Reply With Quote