Using lambda in re.sub