Welcome! Please see the About page for a little more info on how this works.
The documentation of replace and replace-first didn't feature any example usage of the pattern + function combo so I've added one.