Function to use when searching for regexps to replace. It is used by `query-replace-regexp', `replace-regexp', `query-replace-regexp-eval', and `map-query-replace-regexp'. It is called with three arguments, as if it were `re-search-forward'.