You were off to a FANTASTIC start (especially if you are new to regex).
Also, take a look through the Regex topic in the Sigil forum, there is A TON of helpful Regex in there:
https://www.mobileread.com/forums/sho...d.php?t=167971
A period in Regex stands for "any character", so in order to catch an ACTUAL period, you have to escape it with a slash '\'.
Search:
Replace:
What you want to do is "capture" the lowercase letters after the period, and you do this by adding parenthesis around what you want to capture (
Red).
So, this regex in English says:
"Search for a period, then a space, and
capture the "lowercase a through z" and stick it in \1".
"Replace with a comma, space, and then
whatever lowercase a-z was captured in \1".
Some more complex Regexes might have you capturing a lot more things, and then you would be able to use \2, \3, \4, ...
Quote:
Originally Posted by MizSuz
I've got an epub that started life as a pdf, I think. It has, with some frequency, occurrences in which a period appears where a comma should be.
|
Indeed... usually this is just due to a crappy scan, a fully automated OCR (like Archive.org), or just a really crappy converter.
Is this a public domain work? After you are done cleaning it up, you should post it on MobileRead!