chg: dev: simplified the ``re.sub`` usage by removing the lambda.