non-terminating regex match

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Wed Apr 2 14:11:15 EDT 2008


On Wed, 02 Apr 2008 16:01:59 +0000, Maurizio Vitale wrote:

> And yes, I'm a total beginner when it comes to Python, but it seems
> very strange to me that a regex match on a finite length string
> doesn't terminate

It does terminate, you just don't wait long enough.  Try it with fewer
characters and then increase the identifier character by character and
watch the time of the runs grow exponentially.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list