Upgrade find-and-replace to fold results