split hangs

davide at mercurio.localdomain davide at mercurio.localdomain
Wed Jan 3 10:39:36 EST 2001


>Then you had better start reading better stuff <wink>.  I'll repeat the
>original recommendation:  Jeffrey [note: I erroneously said Jonathan before]
>Friedl's excellent book "Mastering Regular Expressions" (O'Reilly).

Sorry, but the dragon book (Aho Sethi, Ullman), Introduction to automata
theory, languages and computation (Hopcroft, Ullman) and thousand of others
books on language theory are surely a better reference <wink>.

>There are two "obvious" ways to implement a regexp engine.  

Indeed, regexp matchig is quite simple.

One extreme
>Friedl calls "the NFA" way (although he's using "NFA" in a sense that
>differs from its technical meaning in the literature).  

Yes, reading your post I understand that the reason is these are not NFA,
"backreferences" are not part of regualar expressions and so we are not
talking of regular languages.

>
>Note that the literature talks about "real" regular expressions.
>Backreferences change the game profoundly.  This page links to a proof that
>the matching problem for Perl regexps (and so also Python's) is NP-complete:
>
>    http://perl.plover.com/NPC/

Thanks for the reference.

--
						Davide




More information about the Python-list mailing list