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: 27,553
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
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 offline   Reply With Quote