Start `query-replace-regexp' with string to replace from last search string. See `isearch-query-replace' for more information.