Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 11-12-2013, 04:16 PM   #1
lauralein
Junior Member
lauralein began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2013
Device: Pocketbook touch lux
Regular Expressions Help

Hi everyone,

most of my ebooks are sorted using the following structure: author, series seriesnumber, title.

While importing these books into calibre, i use following regular expression:

(?P<author>((?!\s-\s).)*)\s-(?:\s(?P<series>((?!\s-\s).)*)\s-)?(?:\s(?P<series_index>((?!\s-\s).)*)\s-)?\s(?P<title>.*)

Now it will sort author, series and title automatically. Only the series_index will not display properly. Where is the fault in the expression setting?
lauralein is offline   Reply With Quote
Old 11-12-2013, 07:05 PM   #2
lauralein
Junior Member
lauralein began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2013
Device: Pocketbook touch lux
Solution found, thread can be closed.

(?P<author>[^_-]+) -?\s*(\[|\()?\s*(?P<series>[^_0-9\[\(-]*)(?P<series_index>[0-9.]*)\s*(\]|\))?\s*-\s*(?P<title>[^_\[\(]+)\s*
lauralein is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expressions help deamonfruba Library Management 2 06-02-2012 02:09 AM
Help with regular expressions MostlyCarbon Library Management 0 02-04-2012 03:00 PM
Regular Expressions geormes Calibre 4 08-04-2011 07:09 AM
Another help with regular expressions encapuchado Library Management 6 06-21-2011 03:14 PM
Help with Regular Expressions ghostyjack Workshop 2 01-08-2010 11:04 AM


All times are GMT -4. The time now is 08:45 PM.


MobileRead.com is a privately owned, operated and funded community.