Reduce complexity now that $match is already known

There were these 2 complex functions only meant to capture
the match (and replacement), but we no longer need them.