View Single Post
Old 07-17-2014, 08:56 PM   #20
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by arspr View Post
Be really careful when detecting straight single quotes BEFORE words as in English there are at least two very different uses:
'em >>> Contractions, so you should substitute by a RIGHT/CLOSING curly quote.
I use these Regex in Sigil after running any sort of "Smarten Punctuation":

Note: That is a LEFT single quote in the Search.

Search: ‘([Tt]was\b)
Replace: ’\1

Search: ‘([Tt]is\b)
Replace: ’\1

Search: ‘([Ee]m\b)
Replace: ’\1

This works on your common words: 'twas, 'tis, 'em. (I am not too sure how many others there are, but those three are the only ones I run across in the books I work on).

I also do a Regex for this one and replace on a case-by-case basis for this one:

Search: ‘([0-9])
Replace: ’\1

Which is typically used when shortening decades: ’90s, ’00s, ’60s, ...

Last edited by Tex2002ans; 07-17-2014 at 08:58 PM.
Tex2002ans is offline   Reply With Quote