I'm doing a lot of regular expressions these days. Sometimes when I'm crafting them I mess up, and make them too complicated. So that when my program runs, they take forever. (Maybe not literally forever---I abort the program after a few seconds.)
What I'd like to have happen is every time I search using a regular expression is after a few seconds (the exact number being user definable), it will stop searching, perhaps by raising an exception. How can I implement this? Thanks -- http://mail.python.org/mailman/listinfo/python-list