View Single Post
Old 03-26-2016, 08:57 AM   #3
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
It might be that it can be done via RegEx, but I think that a plugin would be better suited.
The suggestion from Kovid will not handle dialogue that spans more than one paragraph. Not only that, but depending on the language specifications it might even be that in case of multiple paragraphs that the next paragraph will start with another opening/closing quotation mark without closing the previous first. That is according to the style guide and will result in false hits. There is more to this than it seems...

I have a function like this in my Word add-in and that one does not rely on RegEx at all. The add-in probably doesn't help you here, since that required Word and does not work in Calibre.
Toxaris is offline   Reply With Quote