06-02-2012, 07:06 AM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jun 2012
Device: yes
|
Square brackets in filename breaking Calibre Regex?
I have a bunch of books with names such as:
Book Title [ISBN-0123456789].pdf I've created a simple RegEx that should work (?P<title>.+)\[ISBN-(?P<isbn>\d+)\].+ It works in various web Regex testers (such as http://gskinner.com/RegExr/) but not in Calibre, any ideas why not? |
06-02-2012, 07:26 AM | #2 |
creator of calibre
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
remove the .+ at the end. The regex matches the filename *without* the extension.
|
Advert | |
|
06-02-2012, 07:38 AM | #3 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jun 2012
Device: yes
|
Doh, simple as that thanks very much!
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regex and Metadata from filename. | asrrin29 | Calibre | 5 | 12-03-2023 04:51 AM |
Regex Help - Add Book - Insert Filename into Custom Field | nynaevelan | Library Management | 3 | 10-12-2011 01:14 PM |
Calibre breaking Nook Touch hyphenation? | jclim00 | Calibre | 8 | 09-04-2011 06:28 PM |
Metadata Search and Replace- Delete everything in square brackets? | dkelly701 | Library Management | 5 | 02-20-2011 11:50 AM |
RegEx - filename metadata help | ejjenkins | Calibre | 4 | 12-28-2010 05:47 PM |