]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/infinite_loop_re.py
AppPkg/Applications/Python: Add Python 2.7.2 sources since the release of Python...
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / test / crashers / infinite_loop_re.py
CommitLineData
4710c53d 1\r
2# This was taken from http://python.org/sf/1541697\r
3# It's not technically a crasher. It may not even truly be infinite,\r
4# however, I haven't waited a long time to see the result. It takes\r
5# 100% of CPU while running this and should be fixed.\r
6\r
7import re\r
8starttag = re.compile(r'<[a-zA-Z][-_.:a-zA-Z0-9]*\s*('\r
9 r'\s*([a-zA-Z_][-:.a-zA-Z_0-9]*)(\s*=\s*'\r
10 r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~@]'\r
11 r'[][\-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~\'"@]*(?=[\s>/<])))?'\r
12 r')*\s*/?\s*(?=[<>])')\r
13\r
14if __name__ == '__main__':\r
15 foo = '<table cellspacing="0" cellpadding="0" style="border-collapse'\r
16 starttag.match(foo)\r