change clean string to use regexp instead of loop for speedups