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

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

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

revision 1220 by ph10, Wed Oct 31 17:42:29 2012 UTC revision 1221 by ph10, Sun Nov 11 20:27:03 2012 UTC
# Line 118  If you are using PCRE in a non-UTF appli Line 118  If you are using PCRE in a non-UTF appli
118  arbitrary patterns for compilation, you should be aware of a feature that  arbitrary patterns for compilation, you should be aware of a feature that
119  allows users to turn on UTF support from within a pattern, provided that PCRE  allows users to turn on UTF support from within a pattern, provided that PCRE
120  was built with UTF support. For example, an 8-bit pattern that begins with  was built with UTF support. For example, an 8-bit pattern that begins with
121  "(*UTF8)" turns on UTF-8 mode. This causes both the pattern and any data  "(*UTF8)" or "(*UTF)" turns on UTF-8 mode, which interprets patterns and
122  against which it is matched to be checked for UTF-8 validity. If the data  subjects as strings of UTF-8 characters instead of individual 8-bit characters.
123  string is very long, such a check might use sufficiently many resources as to  This causes both the pattern and any data against which it is matched to be
124  cause your application to lose performance.  checked for UTF-8 validity. If the data string is very long, such a check might
125    use sufficiently many resources as to cause your application to lose
126    performance.
127  </P>  </P>
128  <P>  <P>
129  The best way of guarding against this possibility is to use the  The best way of guarding against this possibility is to use the
# Line 130  The best way of guarding against this po Line 132  The best way of guarding against this po
132  <P>  <P>
133  If your application is one that supports UTF, be aware that validity checking  If your application is one that supports UTF, be aware that validity checking
134  can take time. If the same data string is to be matched many times, you can use  can take time. If the same data string is to be matched many times, you can use
135  the PCRE_NO_UTF[8|16|32]_CHECK option for the second and subsequent matches to  the PCRE_NO_UTF[8|16|32]_CHECK option for the second and subsequent matches to
136  save redundant checks.  save redundant checks.
137  </P>  </P>
138  <P>  <P>
139  Another way that performance can be hit is by running a pattern that has a very  Another way that performance can be hit is by running a pattern that has a very
140  large search tree against a string that will never match. Nested unlimited  large search tree against a string that will never match. Nested unlimited
141  repeats in a pattern are a common example. PCRE provides some protection  repeats in a pattern are a common example. PCRE provides some protection
142  against this: see the PCRE_EXTRA_MATCH_LIMIT feature in the  against this: see the PCRE_EXTRA_MATCH_LIMIT feature in the
143  <a href="pcreapi.html"><b>pcreapi</b></a>  <a href="pcreapi.html"><b>pcreapi</b></a>
144  page.  page.
# Line 193  two digits 10, at the domain cam.ac.uk. Line 195  two digits 10, at the domain cam.ac.uk.
195  </P>  </P>
196  <br><a name="SEC5" href="#TOC1">REVISION</a><br>  <br><a name="SEC5" href="#TOC1">REVISION</a><br>
197  <P>  <P>
198  Last updated: 30 October 2012  Last updated: 11 November 2012
199  <br>  <br>
200  Copyright &copy; 1997-2012 University of Cambridge.  Copyright &copy; 1997-2012 University of Cambridge.
201  <br>  <br>

Legend:
Removed from v.1220  
changed lines
  Added in v.1221

  ViewVC Help
Powered by ViewVC 1.1.5