|
|
#1 |
|
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jun 2012
Device: yes
|
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?
|
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,631
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
remove the .+ at the end. The regex matches the filename *without* the extension.
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jun 2012
Device: yes
|
Doh, simple as that
thanks very much!
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Regex and Metadata from filename. | asrrin29 | Calibre | 5 | 12-03-2023 05:51 AM |
| Regex Help - Add Book - Insert Filename into Custom Field | nynaevelan | Library Management | 3 | 10-12-2011 02:14 PM |
| Calibre breaking Nook Touch hyphenation? | jclim00 | Calibre | 8 | 09-04-2011 07:28 PM |
| Metadata Search and Replace- Delete everything in square brackets? | dkelly701 | Library Management | 5 | 02-20-2011 12:50 PM |
| RegEx - filename metadata help | ejjenkins | Calibre | 4 | 12-28-2010 06:47 PM |