Fixed: multiple spaces are replaced with one.
Fixed: string were not being escape for RegExp.