Pastable version of replace with regex