# Diff of /code/trunk/doc/pcre.txt

revision 147 by ph10, Fri Mar 30 15:55:18 2007 UTC revision 148 by ph10, Mon Apr 16 13:25:10 2007 UTC
# Line 521  REGULAR EXPRESSIONS AS TREES Line 521  REGULAR EXPRESSIONS AS TREES
521
522  THE STANDARD MATCHING ALGORITHM  THE STANDARD MATCHING ALGORITHM
523
524         In the terminology of Jeffrey Friedl's book Mastering  Regular  Expres-         In the terminology of Jeffrey Friedl's book "Mastering Regular  Expres-
525         sions,  the  standard  algorithm  is  an "NFA algorithm". It conducts a         sions",  the  standard  algorithm  is an "NFA algorithm". It conducts a
526         depth-first search of the pattern tree. That is, it  proceeds  along  a         depth-first search of the pattern tree. That is, it  proceeds  along  a
527         single path through the tree, checking that the subject matches what is         single path through the tree, checking that the subject matches what is
528         required. When there is a mismatch, the algorithm  tries  any  alterna-         required. When there is a mismatch, the algorithm  tries  any  alterna-
# Line 4527  MULTI-SEGMENT MATCHING WITH pcre_dfa_exe Line 4527  MULTI-SEGMENT MATCHING WITH pcre_dfa_exe
4527         not always produce exactly the same result as matching over one  single         not always produce exactly the same result as matching over one  single
4528         long  string.   The  difference arises when there are multiple matching         long  string.   The  difference arises when there are multiple matching
4529         possibilities, because a partial match result is given only when  there         possibilities, because a partial match result is given only when  there
4530         are  no  completed  matches  in a call to fBpcre_dfa_exec(). This means         are  no completed matches in a call to pcre_dfa_exec(). This means that
4531         that as soon as the shortest match has been found,  continuation  to  a         as soon as the shortest match has been found,  continuation  to  a  new
4532         new  subject  segment  is  no  longer possible.  Consider this pcretest         subject segment is no longer possible.  Consider this pcretest example:
example:
4533
4534             re> /dog(sbody)?/             re> /dog(sbody)?/
4535           data> do\P\D           data> do\P\D

Legend:
 Removed from v.147 changed lines Added in v.148