recording data between [ and ]

Diez B. Roggisch deetsNOSPAM at web.de
Thu Apr 21 12:43:32 EDT 2005


Fredrik Lundh wrote:

> Diez B. Roggisch wrote:
> 
>> Welcome to the wonderful world of programming. Regular expressions are
>> what they are because they are modeled after a certain theory - that of
>> finite state automata and their correspondence to certain classes of
>> grammars.
> 
> (except that Python regexps are not always regular, of course.  and that
> back- tracking engines like the ones used in Perl and Python differs in
> subtle ways
> from "real" DFA-based engines, etc.  but as long as you're looking at
> things from a proper distance, you're right, of course)

They use backtracking? Thats news to me. I always thought that mechanisms
like prefixes and backreferences can work in a strict DFA paragigm - with
possibly very large automata, but nevertheless.

Gotta go google I think....

-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list