Thread: Regex examples
View Single Post
Old 08-08-2014, 09:48 AM   #374
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Simply search for

Code:
(?<![.!?])(?<=[ ])([A-Z])(?=[a-z]+)
Code:
\L\1
The "\L" is a PCRE function saying "lowercase the next symbol in the replacement".

I am not exactly clear on how the quotations should work, so this will not handle those. Can you give me an example of two cases, one where it should be fixed, and one where it shouldn't?

Last edited by eschwartz; 08-08-2014 at 12:37 PM. Reason: fixed some stuff. ALso we want to *lowercase*
eschwartz is offline   Reply With Quote