Use lambda in a couple regex sub() calls.