ENH: error handling on re.group KeyError exception only for PyPy