resolve regex issue with periods
remove excess white spaces