escape search string from regular expression specific characters

escape search string from regular expression specific characters.
Add function escapeRegExp(string).