View Single Post
Old 03-24-2019, 07:37 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,139
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I have a number of REGEX (Sigil saved searches below)
Code:
71\Name=Cleanup/Joins/Join to lower
71\Find="([[:alpha:],][\"\xe2\x80\x9d]*)</p>\\s*<p\\b[^>]*>([a-z\xe2\x80\x9c\"])"
71\Replace=\\1 \\2

72\Name=Cleanup/Joins/Join to upper
72\Find="([[:alpha:],]\xe2\x80\x9d*)</p>\\s*<p\\b[^>]*>([\"\xe2\x80\x9c]*[A-Z])"
72\Replace=\\1 \\2

74\Name=Cleanup/Joins/Initials
74\Find=([A-Z]\\.)</p>\\s*<p\\b[^>]*>([\"\xe2\x80\x9c]*[A-Z])
74\Replace=\\1 \\2

80\Name=Cleanup/Joins/Honorifics
80\Find="(Mr|Mrs|Ms|Dr|Prof)\\.</p>\\s+<p class=\"calibre\\d+\">([A-Z])"
80\Replace=\\1. \\2

Note that some need the class name corrected

I always do a Search, replace Next because there are always exceptions that I have not trapped (did not even try. It take a few minutes to run the series of S&R's)
theducks is offline   Reply With Quote