View Single Post
Old 03-18-2012, 06:50 PM   #11
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,323
Karma: 36126080
Join Date: Jan 2010
Device: Kindle Fire HD, Kindle 2
I see you already discovered a solution while I was typing, so I modified it so it will detect and fix Chapter TWENty-oNE as well.

Code:
(Chapter )(\w)(.+?\b)
Replace:

Code:
\1\u\2\L\3\E
But that won't help when you get as high as "Chapter TWENTY-ONE," soooo.....

Code:
(Chapter )(\w)(.+?\b)((-)(\w)(.+?\b))?
Replace:

Code:
\1\u\2\L\3\E\5\u\6\L\7\E
Should straighten up any capitalization issues of the part that follows "Chapter ", as long as it maintains a standard "word" or "word-word" convention)

"Chapter ONe" will become "Chapter One" and "Chapter THIRTY-two" will become "Chapter Thirty-Two"

Last edited by DiapDealer; 03-19-2012 at 08:35 AM. Reason: Typo
DiapDealer is online now   Reply With Quote