View Single Post
Old 03-26-2020, 08:20 AM   #4
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
There were some extra spaces in what @dunhill posted. And that first quote probably should have been a question mark. I think what he meant was:

Code:
(?P<publisher>.+?) - (?P<author>[^_]+?) - (?P<title>.+)
And the question mark after the plus is to make the matching non-greedy.

To get the comment as well:

Code:
(?P<publisher>.+?) - (?P<author>[^_]+?) - (?P<title>.+?) - (?P<comments>.+)
I haven't tested that in calibre. I did check it using https://regex101.com/.
davidfor is offline   Reply With Quote