02-16-2011, 09:39 PM | #1 |
Connoisseur
Posts: 75
Karma: 600
Join Date: Jul 2008
Location: Depends Upon the Season.....
Device: Cybook, Sony & ipad
|
Reg expression for importing
I have been working on importing files that are in the following format:
Ark Angel (Alex Rider 6) - Anthony Horowitz.lrf Using: (?P<title>([^\-_\[\(]+))(?P<series>[^_0-9-]*)(?P<series_index>[0-9]*)(?P<author>([^_\[\(]+)) I am getting really close! Title: Ark Angel Author: ) - Anthony Horowitz Series: (Alex Rider Series Index: 6.0 I have tried playing with the looking at other examples, the tutorial and playing with the spaces, but I only make it worse! Any advice would be appreciated. Thanks. |
02-17-2011, 04:11 AM | #2 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Try
(?P<title>.+) \((?P<series>[^_0-9-]*) (?P<series_index>[0-9]*)\) - (?P<author>.+) |
Advert | |
|
02-17-2011, 11:20 AM | #3 |
Connoisseur
Posts: 75
Karma: 600
Join Date: Jul 2008
Location: Depends Upon the Season.....
Device: Cybook, Sony & ipad
|
This is perfect! I appreciate the help!
|
Tags |
reg expressions, regexp |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regular Expression Help | Azhad | Calibre | 86 | 09-27-2011 02:37 PM |
Helping importing books using regular expression | askyn | Calibre | 4 | 05-08-2010 01:06 AM |
regular expression - importing vs testing | pbj | Calibre | 5 | 02-09-2010 03:02 PM |
eBooks: What to read on which reader? El Reg | m-reader | News | 4 | 11-23-2009 12:50 PM |
Reg reviews iRex DR1000S | HarryT | News | 5 | 07-24-2009 05:32 PM |