Is there a maximum length of a regular expression in python?

Steve Holden steve at holdenweb.com
Fri Jan 20 22:24:03 EST 2006


Tim Peters wrote:
> [Bryan Olson]
> 
>>>Does no one care about an internal error in the regular expression
>>>engine?
> 
> 
> [Steve Holden]
> 
>>Not one that requires parsing a 100 kilobyte re that should be replaced
>>by something more sensible, no.
> 
> 
> I care:  this is a case of not detecting information loss due to
> unchecked downcasting in C, and it was pure luck that it resulted in
> an internal re error rather than, say, a wrong result.  God only knows
> what other pathologies the re engine could tricked into exhibiting
> this way.  Python 2.5 will raise an exception instead, during regexp
> compilation (I just checked in code for this on the trunk; with some
> luck, someone will backport that to 2.4 too).

Just goes to show you, ignorance is bliss.
What would we do without you, Tim?

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                  www.python.org/pycon/




More information about the Python-list mailing list