[issue37327] python re bug

aixian le report at bugs.python.org
Tue Jun 18 02:31:14 EDT 2019


aixian le <goxushunchao2 at gmail.com> added the comment:

the code is:
banner = "HTTP/1.0 404 Not Found\r\nDate: Mon, 17 Jun 2019 13:15:44 GMT\r\nServer:                \r\nConnection: close\r\nContent-Type: text/html\r\n\r\n<HTML><HEAD><TITLE>404 Not Found</TITLE></HEAD>\r\n<BODY><H1>404 Not Found</H1>\r\nThe requested URL /PSIA/index was not found on this server.\r\n</BODY></HTML>\r\n"
        regex = "^HTTP/1\\.0 404 Not Found\\r\\n(?:[^<]+|<(?!/head>))*?<style>"
        print("start")
        regex_re = re.compile(regex)
        print("start1")
        regex_re.search(banner)
        print("end")
when I execute this code ,python cannot finished.

----------
versions: +Python 3.7

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


More information about the Python-bugs-list mailing list