-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
all_text = '"v1Cd5Yk6x_f2cqrqNV6Iy_1ab34_dfI" + l'
modules = re.findall(r'([\w.]+)+(?=\.\w+)\b', all_text)When the code contains the above text, it will be executed for several minutes when searching for module.
After changing to the following regex, it will be executed very quickly.
all_text = '"v1Cd5Yk6x_f2cqrqNV6Iy_1ab34_dfI" + l'
modules = re.findall(r'(?<!\w)([a-zA-Z_]\w*)\.\w+\b', all_text)Metadata
Metadata
Assignees
Labels
No labels