Word Histogram :: implemented regex