regex::replace_first doesn't need exception matching any more.  Removing the custom function.
regex::replace_all doesn't need exception matching any more.  Removing the custom function.  Also aligning things differently for readability.
notes