[New-bugs-announce] [issue46065] re.findall takes forever and never ends

Ramzi Trabelsi report at bugs.python.org
Mon Dec 13 08:26:28 EST 2021


New submission from Ramzi Trabelsi <ramzi.tra at gmail.com>:

parsing emails from this text took forever and never ends. Here the code 
 and the file res.html is attached.
The Behavior is same on Windows 10, 11 and Ubuntu 18.04

CODE:

import re
pattern_email      = r"[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]{2,3}"
with open("res.html","r",encoding="utf-8") as FF:
	TEXT = FF.read()
matched_email          = re.findall(pattern_email,TEXT)

----------
components: macOS
files: res.zip
messages: 408453
nosy: ned.deily, ramzitra, ronaldoussoren
priority: normal
severity: normal
status: open
title: re.findall takes forever and never ends
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file50488/res.zip

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46065>
_______________________________________


More information about the New-bugs-announce mailing list