escape string when used as a regexp