Thread: Regex examples
View Single Post
Old 02-28-2013, 02:26 PM   #193
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
Posts: 2,440
Karma: 2368305
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350: 3 Silver, 2 Blue!; Kobo Glo
Quote:
Originally Posted by MuskratBooks View Post
In Sigil this expression has been helpful:
(“[^”\r\n]*)</p>\s+<p class="calibre.">
Replace with (has a trailing space): \1

This indentifies paragraphs where a opening smart quote is not matched with a closing smart quote and joins that paragraph with the next one. Its not fool proof, but saves a lot of time.

I use calibre conversion to switch straight quotes to smart quotes. Its under "Look Feel", check by "smarten punctuation". Easier to fix its mistakes than to find and fix 'em all.

Good Luck!
This is fantastic and works great. I swapped the double quotes to single quotes then to find those within the string. It also found a couple of wrong direction quotes for me as well. Edit: And found a few instances of 2 single quotes where a double quote should have been.

Is there a way to find the reverse situation, to find paragraphs where there is an ending quote but was no starting quote at the beginning of the paragraph?

Last edited by Ripplinger; 02-28-2013 at 03:43 PM.
Ripplinger is online now   Reply With Quote