View Single Post
Old 01-31-2022, 07:41 PM   #5
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
A single one to do this is:

Code:
(\d{0,1}[,]?\d{0,3}[,]?\d{1,3} [Ww]ords)
It isn't perfect because it would pickup something like "1,,1 Words". But, I suspect that won't appear.

And semantically, "[Ww]" is a bit better than "(W|w)". The former is "One of this list of things" and the later is "W or w and put them into a group for the replacement". It is a little pedantic and doesn't make a difference in your situation. But, if you need to extend this because you found another case, or, needed to replace the text, the latter might not work as well.
davidfor is offline   Reply With Quote