Consider removing this line in favor of updating your definition of `TIME_INTERVAL_RE`. A non-recursive regular expression should be able to do the job on its own, here. See http://docs.python.org/2/library/re.html#re.DOTALL, for example, if you're having trouble parsing pesky newlines.