![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: May 2020
Device: none
|
Problem with reg expression !
Have got quite a large collection of books in the format:
"[Author1, Author2...] Title - Subtitle" It seems that the reg expressions interpreter won't allow this. No way to get it to accept the '[' and ']' as valid delimiters. Any clue to a solution ? Thanks |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Escape them with a preceding backslash
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: May 2020
Device: none
|
Doesn't work for me.
I have my files in format: [<author>] <title>.ext, for example: [John Doe] Mybook.pdf and I've tried several patterns: \[(?P<author>[^_]+)\]\s(?P<title>.+) \[<author>\]\s(?P<title>.+) as well as some smpler ones: \[<author>\]\s<title> None of them works. All result in Title: [John Doe] Mybook Author: Unknown So, the author is not parsed, it is all put into the title. I have Calibre 1.25 in Linux |
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
I don't have a version of calibre that old to test with. But, using the test in the Adding books page of the preferences, the first one above works correctly. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Have a Regular Expression problem with Author Field | searcygr | Library Management | 2 | 09-21-2018 10:33 AM |
Help with Reg-ex of Course | pappabees61 | Library Management | 1 | 09-23-2017 09:34 PM |
Reg-ex help...? | ElMiko | Sigil | 11 | 12-06-2011 12:41 AM |
Adobe Reg problem on PE | Gremalkin | enTourage eDGe | 5 | 09-02-2011 03:01 PM |
Reg expression for importing | Debby | Library Management | 2 | 02-17-2011 11:20 AM |