Thread: Regex examples
View Single Post
Old 08-10-2014, 10:04 AM   #391
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
Quote:
Originally Posted by eschwartz View Post
Yes, I forgot some things, like the part where lookbehinds need to look behind. :o
ha, yes, wondered about that

Quote:
Originally Posted by eschwartz View Post
Find:
Code:
(?<![.!?])(?<=[ ])([A-Z])(?=[a-z]+)
Replace. :D Keep in mind that \E -- end of modifier's action -- is not strictly necessary if the entire replacement is being flagged as lowercase:
Code:
\L\1
never really got the \E; thanks for the info

Quote:
Originally Posted by eschwartz View Post
You lost a space.
no, it's in the first capturing group. uppercase space == lowercase space, but obviously less readable :)

Quote:
Originally Posted by eschwartz View Post
Also, you imitated my mistake of offering an uppercasing solution (for letters that are already uppercase :rolleyes:) instead of lowercasing. I blame my dental surgery, what's your excuse? :D (You can blame it on me, I did trick you. :))
ehm, yes, i did, didn't i. i'll also blame your dental surgery, if you don't mind :)
mzmm is offline   Reply With Quote