fixed regex for wordcounter