word count

Counting Words in a Markdown File

I wanted to add an estimate of words and characters in wiki pages for a program I am writing CWiki There was some guidance on this topic (in Python) here. Of course the original Markdown.pl was a good source for matching regular expressions too. What follows is a copy of the “seed page” “About the Word Count” from the CWiki wiki program: Begin Quote Up at the top of each page, below the author and creation/modification dates, there is a line showing the number of characters in the page along with an estimate of the number of words in the page.