python 3.7 ‘s re module is incompatible with the code

python 3.7 ‘s re module is incompatible with the code,I found a solution, just change the code import re to import regex as re,but should pip3 install regex in command line first.
The previous error is as follows:
image