03-12-2013, 11:07 PM | #1 |
Connoisseur
Posts: 55
Karma: 10
Join Date: Jan 2010
Device: Nexus One
|
Adding books - regex help
I know there's a ton of threads about this, but I haven't found one that answers my question, after having searched through more than a dozen of them.
I need my regex to parse filenames that are formatted like this: Jim Butcher - [Dresden Files 01] - Storm Front.epub I'm a total regex noob, and I'm not having any luck with the default, or with the options I've come across in the forums and tried. Any suggestions? Thanks! |
03-13-2013, 08:21 AM | #2 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
There was an example in the options that nearly did it. But, a couple of changes produced:
Code:
(?P<author>[^_-]+) -?\s*\[(?P<series>[^_0-9-]*)(?P<series_index>[0-9]*)\]\s*-\s*(?P<title>[^_].+) ? |
Advert | |
|
Tags |
add books, regex |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Want RegEx to add books to Calibre | huon | Library Management | 0 | 02-02-2012 12:52 AM |
Need a regex for importing books | flinkdeldinky | Calibre | 31 | 10-29-2011 08:31 AM |
Regex assistance request - importing books. | Belfaborac | Library Management | 2 | 10-24-2011 08:03 AM |
Add Books - Regex Help Please | nynaevelan | Calibre | 2 | 08-16-2011 01:30 PM |
A little help adding books and using regex. | Dragonator | Calibre | 7 | 12-17-2010 06:57 PM |