View Single Post
Old 12-15-2013, 02:54 PM   #1
MizSuz
Connoisseur
MizSuz began at the beginning.
 
Posts: 63
Karma: 10
Join Date: Jul 2011
Device: Sony Touch, Nook Simple Touch, Kobo Aura, Android w/CoolReader
Replacing Periods with Commas

Greetings!

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. Aside from being able to tell contextually there is the added bonus that the first letter of the next "sentence" is in lower case.

I have identified that I can search for these instances using

Code:
[.] [a-z]
and it works wonderfully by selecting the period, the space, and the first letter of the next sentence if it is lower case.

However, if I try to use

Code:
[,] [a-z]
to replace the period with a comma I end up with the entire string where the period, space, and letter used to be.

What am I doing wrong, specifically? Obviously my regex sucks, I'm just not sure how to fix it.
MizSuz is offline   Reply With Quote