split hangs
Remco Gerlich
scarblac at pino.selwerd.nl
Wed Jan 3 10:51:31 EST 2001
davide at mercurio.localdomain wrote in comp.lang.python:
> >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.
But of course, regular expressions *as used in program languages* typically
do backreferences. That means that they're officially not regexps at all,
but *if* you want to learn about them, the "Mastering Regular Expressions"
book is a lot better than the theory books.
Nevertheless, formal language theory and finite automatons are nice
things to study :-)
--
Remco Gerlich
More information about the Python-list
mailing list