only create RegExp when needed on string/escapeRegExp