REVIEW ONLY: Fix regexp replace in Replace All

For #5770.

When doing a replace all, the replace function used by regexp replace needs to use the matches from each item in the 
replace all, not the match that was found in the calling `replace()`.