develooper Front page | perl.perl5.porters | Postings from November 2010

Re: Recommendation for expert book about regular expressions?

Thread Previous | Thread Next
From:
Reini Urban
Date:
November 1, 2010 06:41
Subject:
Re: Recommendation for expert book about regular expressions?
Message ID:
AANLkTi=utV2EFsZW5fFaTKFk621UQJRJXWDAzUfhbQ-L@mail.gmail.com
2010/10/27 demerphq <demerphq@gmail.com>:
> Well, I can think of a few that have material of this sort, but
> nothing that is regex specific.
>
> The "Red Dragon Book" (Compilers: Principles, Techniques, and Tools)
> is the one I can name off the top of my head...

I really hate the dragon book, it makes thinking about compilation
overly complex.
I prefer the classic annotated Sedgewick "Algorithms" book, not the
"in C" version

See http://tldp.org/LDP/LG/issue27/mueller.html for the overview

> The thing is the strict definition of regular expressions allows for
> only a very limited set of operators, and does not provide many of the
> features that most people these days would consider to be an important
> aspect of a regex engines job, and not only that but the generally
> expected semantics of a "true" regular expression engine differ from
> engines generally used in practice.
>
> For instance, the semantics of "leftmost-longest" and things like
> capturing, and back-references are not part of what the academic
> definition of regular-expression would include. So, the academic
> literature is generally not applicable to real life use of real life
> regex-engines in practice, as it is unlikely the engine is a true
> "regular expression" engine. This is the case with Perl engine, which
> probably has more in common with something like prolog than it has in
> common with a DFA/NFA.
>
> So I guess, the point is sort of that the theory and practice have
> kind of diverged....
>
> cheers,
> Yves
>
>
> 2010/10/27 ольга крыжановская <olga.kryzhanovska@gmail.com>:
>> Is there a better book which covers the theoretical aspect?
>>
>> Olga
>>
>> 2010/10/27 demerphq <demerphq@gmail.com>:
>>> 2010/10/27 David Golden <xdaveg@gmail.com>:
>>>> Yes.  You will not find a better book on regular expressions.  It is the bibie.
>>>
>>> Well, it is a bit weak on the theoretical aspect of regexen. However
>>> it more than makes up for it with practical utility.
>>>
>>> cheers,
>>> yves
>>>
>>>
>>> --
>>> perl -Mre=debug -e "/just|another|perl|hacker/"
>>>
>>
>>
>>
>> --
>>      ,   _                                    _   ,
>>     { \/`o;====-    Olga Kryzhanovska   -====;o`\/ }
>> .----'-/`-/     olga.kryzhanovska@gmail.com   \-`\-'----.
>>  `'-..-| /       http://twitter.com/fleyta     \ |-..-'`
>>      /\/\     Solaris/BSD//C/C++ programmer   /\/\
>>      `--`                                      `--`
>>
>
>
>
> --
> perl -Mre=debug -e "/just|another|perl|hacker/"
>



-- 
Reini Urban
http://phpwiki.org/           http://murbreak.at/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About