I could pull the regex into a constant but unfortunately this makes use of `$1` on the next line so can't use `tap?`.