Mark Dickinson added the comment: This is a known issue: there are a good few duplicates in the tracker. Issue #1662581 is one, for example.
In this particular case, you can probably fix things by tightening up your regex. Part of the problem is that '.*' is going to match any sequence of characters, including spaces. Judicious use of '\S' to match non-whitespace characters might help. There's not much point to the '?' in '.*?', either. ---------- nosy: +mark.dickinson superseder: -> the re module can perform poorly: O(2**n) versus O(n**2) _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16430> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com