fix re for python3