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

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

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

revision 243 by ph10, Thu Sep 13 09:28:14 2007 UTC revision 345 by ph10, Mon Apr 28 15:10:02 2008 UTC
# Line 167  in a Perl-compatible manner. A sample pr Line 167  in a Perl-compatible manner. A sample pr
167  way of using them is provided in the file called <i>pcredemo.c</i> in the source  way of using them is provided in the file called <i>pcredemo.c</i> in the source
168  distribution. The  distribution. The
169  <a href="pcresample.html"><b>pcresample</b></a>  <a href="pcresample.html"><b>pcresample</b></a>
170  documentation describes how to run it.  documentation describes how to compile and run it.
171  </P>  </P>
172  <P>  <P>
173  A second matching function, <b>pcre_dfa_exec()</b>, which is not  A second matching function, <b>pcre_dfa_exec()</b>, which is not
# Line 558  If this option is set, an unanchored pat Line 558  If this option is set, an unanchored pat
558  the first newline in the subject string, though the matched text may continue  the first newline in the subject string, though the matched text may continue
559  over the newline.  over the newline.
560  <pre>  <pre>
561      PCRE_JAVASCRIPT_COMPAT
562    </pre>
563    If this option is set, PCRE's behaviour is changed in some ways so that it is
564    compatible with JavaScript rather than Perl. The changes are as follows:
565    </P>
566    <P>
567    (1) A lone closing square bracket in a pattern causes a compile-time error,
568    because this is illegal in JavaScript (by default it is treated as a data
569    character). Thus, the pattern AB]CD becomes illegal when this option is set.
570    </P>
571    <P>
572    (2) At run time, a back reference to an unset subpattern group matches an empty
573    string (by default this causes the current matching alternative to fail). A
574    pattern such as (\1)(a) succeeds when this option is set (assuming it can find
575    an "a" in the subject), whereas it fails by default, for Perl compatibility.
576    <pre>
577    PCRE_MULTILINE    PCRE_MULTILINE
578  </pre>  </pre>
579  By default, PCRE treats the subject string as consisting of a single line of  By default, PCRE treats the subject string as consisting of a single line of
# Line 673  out of use. To avoid confusion, they hav Line 689  out of use. To avoid confusion, they hav
689     9  nothing to repeat     9  nothing to repeat
690    10  [this code is not in use]    10  [this code is not in use]
691    11  internal error: unexpected repeat    11  internal error: unexpected repeat
692    12  unrecognized character after (?    12  unrecognized character after (? or (?-
693    13  POSIX named classes are supported only within a class    13  POSIX named classes are supported only within a class
694    14  missing )    14  missing )
695    15  reference to non-existent subpattern    15  reference to non-existent subpattern
# Line 681  out of use. To avoid confusion, they hav Line 697  out of use. To avoid confusion, they hav
697    17  unknown option bit(s) set    17  unknown option bit(s) set
698    18  missing ) after comment    18  missing ) after comment
699    19  [this code is not in use]    19  [this code is not in use]
700    20  regular expression too large    20  regular expression is too large
701    21  failed to get memory    21  failed to get memory
702    22  unmatched parentheses    22  unmatched parentheses
703    23  internal error: code overflow    23  internal error: code overflow
# Line 710  out of use. To avoid confusion, they hav Line 726  out of use. To avoid confusion, they hav
726    46  malformed \P or \p sequence    46  malformed \P or \p sequence
727    47  unknown property name after \P or \p    47  unknown property name after \P or \p
728    48  subpattern name is too long (maximum 32 characters)    48  subpattern name is too long (maximum 32 characters)
729    49  too many named subpatterns (maximum 10,000)    49  too many named subpatterns (maximum 10000)
730    50  [this code is not in use]    50  [this code is not in use]
731    51  octal value is greater than \377 (not in UTF-8 mode)    51  octal value is greater than \377 (not in UTF-8 mode)
732    52  internal error: overran compiling workspace    52  internal error: overran compiling workspace
# Line 718  out of use. To avoid confusion, they hav Line 734  out of use. To avoid confusion, they hav
734    54  DEFINE group contains more than one branch    54  DEFINE group contains more than one branch
735    55  repeating a DEFINE group is not allowed    55  repeating a DEFINE group is not allowed
736    56  inconsistent NEWLINE options    56  inconsistent NEWLINE options
737    57  \g is not followed by a braced name or an optionally braced    57  \g is not followed by a braced, angle-bracketed, or quoted
738          non-zero number          name/number or by a plain number
739    58  (?+ or (?- or (?(+ or (?(- must be followed by a non-zero number    58  a numbered reference must not be zero
740  </PRE>    59  (*VERB) with an argument is not supported
741      60  (*VERB) not recognized
742      61  number is too big
743      62  subpattern name expected
744      63  digit expected after (?+
745      64  ] is an invalid data character in JavaScript compatibility mode
746    </pre>
747    The numbers 32 and 10000 in errors 48 and 49 are defaults; different values may
748    be used if the limits were changed when PCRE was built.
749  </P>  </P>
750  <br><a name="SEC9" href="#TOC1">STUDYING A PATTERN</a><br>  <br><a name="SEC9" href="#TOC1">STUDYING A PATTERN</a><br>
751  <P>  <P>
# Line 931  explicit match is either a literal CR or Line 955  explicit match is either a literal CR or
955  <pre>  <pre>
956    PCRE_INFO_JCHANGED    PCRE_INFO_JCHANGED
957  </pre>  </pre>
958  Return 1 if the (?J) option setting is used in the pattern, otherwise 0. The  Return 1 if the (?J) or (?-J) option setting is used in the pattern, otherwise
959  fourth argument should point to an <b>int</b> variable. The (?J) internal option  0. The fourth argument should point to an <b>int</b> variable. (?J) and
960  setting changes the local PCRE_DUPNAMES option.  (?-J) set and unset the local PCRE_DUPNAMES option, respectively.
961  <pre>  <pre>
962    PCRE_INFO_LASTLITERAL    PCRE_INFO_LASTLITERAL
963  </pre>  </pre>
# Line 1948  Cambridge CB2 3QH, England. Line 1972  Cambridge CB2 3QH, England.
1972  </P>  </P>
1973  <br><a name="SEC22" href="#TOC1">REVISION</a><br>  <br><a name="SEC22" href="#TOC1">REVISION</a><br>
1974  <P>  <P>
1975  Last updated: 11 September 2007  Last updated: 12 April 2008
1976  <br>  <br>
1977  Copyright &copy; 1997-2007 University of Cambridge.  Copyright &copy; 1997-2008 University of Cambridge.
1978  <br>  <br>
1979  <p>  <p>
1980  Return to the <a href="index.html">PCRE index page</a>.  Return to the <a href="index.html">PCRE index page</a>.

Legend:
Removed from v.243  
changed lines
  Added in v.345

  ViewVC Help
Powered by ViewVC 1.1.5