Serhiy Storchaka <storch...@gmail.com> added the comment:

This is not infinite loop. This is O(2**len(prefix_before_first_quote)) 
computation. Measure times of matching for "INSER(`id`...", "INSERT(`id`...", 
"INSERT (`id`...", "INSERT I(`id`...", etc.

Better use r'''(?:[^`';]+|'(?:''|[^'])*'|`(?:``|[^`])*`)+;''' regexp.

----------
nosy: +storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15077>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to