/[pcre]/code/trunk/doc/pcre.txt
ViewVC logotype

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

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

revision 153 by ph10, Wed Apr 18 09:12:14 2007 UTC revision 155 by ph10, Tue Apr 24 13:36:11 2007 UTC
# Line 887  SAVING PRECOMPILED PATTERNS FOR LATER US Line 887  SAVING PRECOMPILED PATTERNS FOR LATER US
887         The compiled form of a regular expression can be saved and re-used at a         The compiled form of a regular expression can be saved and re-used at a
888         later time, possibly by a different program, and even on a  host  other         later time, possibly by a different program, and even on a  host  other
889         than  the  one  on  which  it  was  compiled.  Details are given in the         than  the  one  on  which  it  was  compiled.  Details are given in the
890         pcreprecompile documentation.         pcreprecompile documentation. However, compiling a  regular  expression
891           with  one version of PCRE for use with a different version is not guar-
892           anteed to work and may cause crashes.
893    
894    
895  CHECKING BUILD-TIME OPTIONS  CHECKING BUILD-TIME OPTIONS
# Line 2386  AUTHOR Line 2388  AUTHOR
2388    
2389  REVISION  REVISION
2390    
2391         Last updated: 16 April 2007         Last updated: 24 April 2007
2392         Copyright (c) 1997-2007 University of Cambridge.         Copyright (c) 1997-2007 University of Cambridge.
2393  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
2394    
# Line 2414  PCRE CALLOUTS Line 2416  PCRE CALLOUTS
2416         default value is zero.  For  example,  this  pattern  has  two  callout         default value is zero.  For  example,  this  pattern  has  two  callout
2417         points:         points:
2418    
2419           (?C1)eabc(?C2)def           (?C1)abc(?C2)def
2420    
2421         If  the  PCRE_AUTO_CALLOUT  option  bit  is  set when pcre_compile() is         If  the  PCRE_AUTO_CALLOUT  option  bit  is  set when pcre_compile() is
2422         called, PCRE automatically  inserts  callouts,  all  with  number  255,         called, PCRE automatically  inserts  callouts,  all  with  number  255,
# Line 4478  EXAMPLE OF PARTIAL MATCHING USING PCRETE Line 4480  EXAMPLE OF PARTIAL MATCHING USING PCRETE
4480         using  pcre_dfa_exec()  matching  (by means of the \D escape sequence),         using  pcre_dfa_exec()  matching  (by means of the \D escape sequence),
4481         produces the following output:         produces the following output:
4482    
4483             re> /^?(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)$/             re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
4484           data> 25jun04\P\D           data> 25jun04\P\D
4485            0: 25jun04            0: 25jun04
4486           data> 23dec3\P\D           data> 23dec3\P\D
# Line 4505  MULTI-SEGMENT MATCHING WITH pcre_dfa_exe Line 4507  MULTI-SEGMENT MATCHING WITH pcre_dfa_exe
4507         using the \R escape sequence to set the PCRE_DFA_RESTART option (\P and         using the \R escape sequence to set the PCRE_DFA_RESTART option (\P and
4508         \D are as above):         \D are as above):
4509    
4510             re> /^?(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)$/             re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
4511           data> 23ja\P\D           data> 23ja\P\D
4512           Partial match: 23ja           Partial match: 23ja
4513           data> n05\R\D           data> n05\R\D
# Line 4614  SAVING AND RE-USING PRECOMPILED PCRE PAT Line 4616  SAVING AND RE-USING PRECOMPILED PCRE PAT
4616         ent  host  and  run them there. This works even if the new host has the         ent  host  and  run them there. This works even if the new host has the
4617         opposite endianness to the one on which  the  patterns  were  compiled.         opposite endianness to the one on which  the  patterns  were  compiled.
4618         There  may  be a small performance penalty, but it should be insignifi-         There  may  be a small performance penalty, but it should be insignifi-
4619         cant.         cant. However, compiling regular expressions with one version  of  PCRE
4620           for  use  with  a  different  version is not guaranteed to work and may
4621           cause crashes.
4622    
4623    
4624  SAVING A COMPILED PATTERN  SAVING A COMPILED PATTERN
# Line 4721  AUTHOR Line 4725  AUTHOR
4725    
4726  REVISION  REVISION
4727    
4728         Last updated: 06 March 2007         Last updated: 24 April 2007
4729         Copyright (c) 1997-2007 University of Cambridge.         Copyright (c) 1997-2007 University of Cambridge.
4730  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
4731    
# Line 5189  MATCHING INTERFACE Line 5193  MATCHING INTERFACE
5193         return false (because the empty string is not a valid number):         return false (because the empty string is not a valid number):
5194    
5195            int number;            int number;
5196            pcrecpp::RE::FullMatch("abc", "[a-z]+(\d+)?", &number);            pcrecpp::RE::FullMatch("abc", "[a-z]+(\\d+)?", &number);
5197    
5198         The matching interface supports at most 16 arguments per call.  If  you         The matching interface supports at most 16 arguments per call.  If  you
5199         need    more,    consider    using    the    more   general   interface         need    more,    consider    using    the    more   general   interface

Legend:
Removed from v.153  
changed lines
  Added in v.155

  ViewVC Help
Powered by ViewVC 1.1.5