Matthew Barnett <pyt...@mrabarnett.plus.com> added the comment:
The problem is the "(?:[^<]+|<(?!/head>))*?". If I simplify it a little I get "(?:[^<]+)*?", which is a repeat within a repeat. There are many ways in which it could match, and if what follows fails to match (it doesn't because there's no "<style>" in the target string, as Aldwin pointed out), it'll try them all, which can take a long time. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37327> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com