/[pcre]/code/trunk/doc/pcreapi.3
ViewVC logotype

Diff of /code/trunk/doc/pcreapi.3

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1362 by ph10, Tue Sep 3 10:10:59 2013 UTC revision 1363 by ph10, Tue Oct 1 16:54:40 2013 UTC
# Line 1  Line 1 
1  .TH PCREAPI 3 "03 September 2013" "PCRE 8.34"  .TH PCREAPI 3 "01 October 2013" "PCRE 8.34"
2  .SH NAME  .SH NAME
3  PCRE - Perl-compatible regular expressions  PCRE - Perl-compatible regular expressions
4  .sp  .sp
# Line 795  were followed by ?: but named parenthese Line 795  were followed by ?: but named parenthese
795  they acquire numbers in the usual way). There is no equivalent of this option  they acquire numbers in the usual way). There is no equivalent of this option
796  in Perl.  in Perl.
797  .sp  .sp
798      PCRE_NO_AUTO_POSSESSIFY
799    .sp
800    If this option is set, it disables "auto-possessification". This is an
801    optimization that, for example, turns a+b into a++b in order to avoid
802    backtracks into a+ that can never be successful.
803    .sp
804    PCRE_NO_START_OPTIMIZE    PCRE_NO_START_OPTIMIZE
805  .sp  .sp
806  This is an option that acts at matching time; that is, it is really an option  This is an option that acts at matching time; that is, it is really an option
# Line 860  page. If an invalid UTF-8 sequence is fo Line 866  page. If an invalid UTF-8 sequence is fo
866  error. If you already know that your pattern is valid, and you want to skip  error. If you already know that your pattern is valid, and you want to skip
867  this check for performance reasons, you can set the PCRE_NO_UTF8_CHECK option.  this check for performance reasons, you can set the PCRE_NO_UTF8_CHECK option.
868  When it is set, the effect of passing an invalid UTF-8 string as a pattern is  When it is set, the effect of passing an invalid UTF-8 string as a pattern is
869  undefined. It may cause your program to crash. Note that this option can also  undefined. It may cause your program to crash or loop. Note that this option
870  be passed to \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP, to suppress the  can also be passed to \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP, to suppress
871  validity checking of subject strings only. If the same string is being matched  the validity checking of subject strings only. If the same string is being
872  many times, the option can be safely set for the second and subsequent  matched many times, the option can be safely set for the second and subsequent
873  matchings to improve performance.  matchings to improve performance.
874  .  .
875  .  .
# Line 1931  all the matches in a single subject stri Line 1937  all the matches in a single subject stri
1937  the value of \fIstartoffset\fP points to the start of a character (or the end  the value of \fIstartoffset\fP points to the start of a character (or the end
1938  of the subject). When PCRE_NO_UTF8_CHECK is set, the effect of passing an  of the subject). When PCRE_NO_UTF8_CHECK is set, the effect of passing an
1939  invalid string as a subject or an invalid value of \fIstartoffset\fP is  invalid string as a subject or an invalid value of \fIstartoffset\fP is
1940  undefined. Your program may crash.  undefined. Your program may crash or loop.
1941  .sp  .sp
1942    PCRE_PARTIAL_HARD    PCRE_PARTIAL_HARD
1943    PCRE_PARTIAL_SOFT    PCRE_PARTIAL_SOFT
# Line 2773  matching string is given first. If there Line 2779  matching string is given first. If there
2779  \fIovector\fP, the yield of the function is zero, and the vector is filled with  \fIovector\fP, the yield of the function is zero, and the vector is filled with
2780  the longest matches. Unlike \fBpcre_exec()\fP, \fBpcre_dfa_exec()\fP can use  the longest matches. Unlike \fBpcre_exec()\fP, \fBpcre_dfa_exec()\fP can use
2781  the entire \fIovector\fP for returning matched strings.  the entire \fIovector\fP for returning matched strings.
2782    
2783    NOTE: PCRE's "auto-possessification" optimization usually applies to character
2784    repeats at the end of a pattern (as well as internally). For example, the
2785    pattern "a\ed+" is compiled as if it were "a\ed++" because there is no point
2786    even considering the possibility of backtracking into the repeated digits. For
2787    DFA matching, this means that only one possible match is found. If you really
2788    do want multiple matches in such cases, either use an ungreedy repeat
2789    ("a\ed+?") or set the PCRE_NO_AUTO_POSSESSIFY option when compiling.
2790  .  .
2791  .  .
2792  .SS "Error returns from \fBpcre_dfa_exec()\fP"  .SS "Error returns from \fBpcre_dfa_exec()\fP"
# Line 2849  Cambridge CB2 3QH, England. Line 2863  Cambridge CB2 3QH, England.
2863  .rs  .rs
2864  .sp  .sp
2865  .nf  .nf
2866  Last updated: 03 September 2013  Last updated: 01 October 2013
2867  Copyright (c) 1997-2013 University of Cambridge.  Copyright (c) 1997-2013 University of Cambridge.
2868  .fi  .fi

Legend:
Removed from v.1362  
changed lines
  Added in v.1363

  ViewVC Help
Powered by ViewVC 1.1.5