How You Count Words Depends Upon How You Define a Word
While working on my new book, I finished up a chapter where, in response to a reader’s question, I demonstrated how you can count commas in a document with both the StringReplace command and the RegExReplace() function. The StringReplace command responds to the UseErrorLevel parameter to save the count while the RegExReplace() function automatically counts the number of matches for saving in an OutputCountVar variable. That gave me the idea to write a word count script using RegExReplace(). Continue reading