View Single Post
Old 01-16-2022, 09:48 PM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I think a better search would be:

Code:
\b([[[:upper:]]-]{2,})\b
That finds words that are only made up of uppercase letters and a hyphen. The minimum length is two letters. I can't get one to match a sentence that only contains uppercase letters. So, dropping the hyphen might make sense an using:

Code:
\b([[:upper:]]{2,})\b
With both, you need the "Case sensitive" option to be turned on.

Then I simply used the "Title-case text" regex function to convert the matched words to title case. That seemed to work in one step for each word. I was able to step through the test book just pressing "Replace and find" with a couple of "Finds" for some acronyms.
davidfor is offline   Reply With Quote