adding a complete example of wordcount and a regex to replace special character such as dot and comma