|
Posted by Tad J McClellan on July 1, 2008, 7:45 am
Please log in for more thread options >
> >>
> >> I was wondering if someone could point me some ref on what algorithms
> >> are used by perl to find matches between regular expressions and
> >> text? Is it a dfa?
>
> BM> No, it's a form of NFA, to allow capturing. The only real reference for
> BM> the algorithms used by perl is reg.c in the perl source, but
> BM> I *really* wouldn't recommend starting there :). Find a good reference
> BM> on POSIX regular expression implementations.
>
> and get the book mastering regular expressions. it doesn't show detailed
> algorithms but explains them well enough to learn about them. and it
> covers almost all major regex versions in many different programs.
See also:
How Regexes Work:
http://perl.plover.com/Regex/article.html
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher0cmdat/"
|