Thread: Regex examples
View Single Post
Old 02-28-2013, 11:55 AM   #192
ReaderRabbit
Member
ReaderRabbit began at the beginning.
 
ReaderRabbit's Avatar
 
Posts: 18
Karma: 10
Join Date: Mar 2011
Location: Colorado
Device: Cruz Tablet
Talking Joining Paragraphs when opening and closing quotes are not in same paragraph

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!

Thank you Muskrat. This answers my question from 1/13/13 perfectly!

Step 1: I go into Calibre and change straight quotes to curley quotes, then
Step 2: I open the book in Sigil and use your Regex suggestion and it works perfectly.

At first it didn't work then I checked to see if I accidentally copied the blank space after your find expression, and I had. I backed the blank space out and it worked

I ♥ brainiacs!
ReaderRabbit is offline   Reply With Quote