Compare commits

...

24 Commits

Author SHA1 Message Date
77dc0cc25f Branch at revision 46530
[SVN r46531]
2008-06-19 18:57:10 +00:00
d7d38da27f Changed POSIX API functions to use the global C locale.
Fixes #1446.

[SVN r46170]
2008-06-05 17:07:42 +00:00
31b68369ae Patch for VC9 explicit template instantiation.
Fixes #1959.

[SVN r46077]
2008-06-03 12:52:55 +00:00
4c105a90a1 Changed behaviour of \B so that it succeeds when the neither adjacent character is a word character.
[SVN r45354]
2008-05-14 11:19:58 +00:00
8928c7737e Added needed #includes to source files.
[SVN r45353]
2008-05-14 11:14:30 +00:00
3704b9c595 Fixes for issue #1871 that prevents duplicate symbol errors with VC++ compilers, when building with /Zc:wchar_t-.
[SVN r44842]
2008-04-28 11:07:14 +00:00
5fdf2752ae Add explicit type cast to fix GCC-C++0X mode error.
[SVN r44437]
2008-04-15 17:50:11 +00:00
c7dda1b549 Fix doc typo from issue #1794.
[SVN r44169]
2008-04-11 08:53:54 +00:00
6e9b9a7995 Doh! Changes to code should actually compile!
A fix for the last change.

[SVN r44145]
2008-04-10 12:46:41 +00:00
e5bc36d7c9 Fix for bug #1790.
[SVN r44128]
2008-04-09 15:32:08 +00:00
c9d1a42e05 Added missing files.
[SVN r43632]
2008-03-15 18:19:11 +00:00
e32c5d0888 Added link to PDF docs, and regenerated.
[SVN r43351]
2008-02-21 12:58:15 +00:00
370c429bd6 Added comment to suppress inspect warning.
[SVN r43148]
2008-02-07 10:24:29 +00:00
0915f19c03 Extended leading repeat optimization to more cases.
[SVN r42992]
2008-01-27 18:43:35 +00:00
37040f4bfd Applies fix for issue #1598: added missing #include.
[SVN r42929]
2008-01-23 16:08:44 +00:00
2cbd1c8882 Patch regex concept checks and TR1 library to work with VC9 + MS TR1 feature pack.
[SVN r42751]
2008-01-14 13:17:09 +00:00
37cd93fc82 Fix documentation typos.
[SVN r42747]
2008-01-14 09:58:36 +00:00
b1af72fd23 Ooops, fix broken escape sequence.
[SVN r42745]
2008-01-14 09:46:12 +00:00
299086b99c Fix bugs reported by Will Drewry: certain invalid regexes can cause the library to access invalid memory, changed to ensure that the correct exception is thrown long before this happens.
[SVN r42674]
2008-01-11 09:55:43 +00:00
07eaac9e0e Fix typos.
[SVN r42455]
2008-01-04 16:54:35 +00:00
71fdd5eb44 Fix typos reported by Sebastian Pipping.
[SVN r42025]
2007-12-14 10:11:21 +00:00
31668ed4be Fixes #1471.
[SVN r41973]
2007-12-11 17:28:15 +00:00
f72c7518be Fixes #1455.
[SVN r41970]
2007-12-11 17:19:03 +00:00
2995393609 Oops, previous commit messed up POSIX timing code, now fixed.
[SVN r41359]
2007-11-25 15:47:58 +00:00
111 changed files with 4761 additions and 3868 deletions

View File

@ -34,7 +34,7 @@ boostbook standalone
# PDF Options: # PDF Options:
# TOC Generation: this is needed for FOP-0.9 and later: # TOC Generation: this is needed for FOP-0.9 and later:
#<xsl:param>fop1.extensions=1 <xsl:param>fop1.extensions=0
# Or enable this if you're using XEP: # Or enable this if you're using XEP:
<xsl:param>xep.extensions=1 <xsl:param>xep.extensions=1
# TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9! # TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9!
@ -55,3 +55,4 @@ boostbook standalone
; ;

View File

@ -67,10 +67,9 @@ an object of type `X::locale_type`.
[[v.lookup_classname(F1, F2)][X::char_class_type][Converts the character sequence designated by the iterator range \[F1,F2) into a bitmask type that can subsequently be passed to isctype. Values returned from lookup_classname can be safely bitwise or'ed together. Returns 0 if the character sequence is not the name of a character class recognized by X. The value returned shall be independent of the case of the characters in the sequence.]] [[v.lookup_classname(F1, F2)][X::char_class_type][Converts the character sequence designated by the iterator range \[F1,F2) into a bitmask type that can subsequently be passed to isctype. Values returned from lookup_classname can be safely bitwise or'ed together. Returns 0 if the character sequence is not the name of a character class recognized by X. The value returned shall be independent of the case of the characters in the sequence.]]
[[v.lookup_collatename(F1, F2)][X::string_type][Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range \[F1, F2). Returns an empty string if the character sequence is not a valid collating element.]] [[v.lookup_collatename(F1, F2)][X::string_type][Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range \[F1, F2). Returns an empty string if the character sequence is not a valid collating element.]]
[[v.isctype(c, v.lookup_classname (F1, F2))][bool][Returns true if character c is a member of the character class designated by the iterator range \[F1, F2), false otherwise.]] [[v.isctype(c, v.lookup_classname (F1, F2))][bool][Returns true if character c is a member of the character class designated by the iterator range \[F1, F2), false otherwise.]]
[[v.value(c, i)][int][Returns the value represented by the digit c in base I if the character c is a valid digit in base I; otherwise returns -1. \[Note: the value of I will only be 8, 10, or 16. -end note\]]] [[v.value(c, I)][int][Returns the value represented by the digit c in base I if the character c is a valid digit in base I; otherwise returns -1. \[Note: the value of I will only be 8, 10, or 16. -end note\]]]
[[u.imbue(loc)][X::locale_type][Imbues u with the locale loc, returns the previous locale used by u if any. ]] [[u.imbue(loc)][X::locale_type][Imbues u with the locale loc, returns the previous locale used by u if any. ]]
[[v.getloc()][X::locale_type][Returns the current locale used by v if any. ]] [[v.getloc()][X::locale_type][Returns the current locale used by v if any. ]]
[[v.error_string(i)][std::string][Returns a human readable error string for the error condition i, where i is one of the values enumerated by type regex_constants::error_type. If the value i is not recognized then returns the string "Unknown error" or a localized equivalent.]]
] ]
[h4 Additional Optional Requirements] [h4 Additional Optional Requirements]
@ -89,14 +88,14 @@ configure itself appropriately.
[[v.escape_syntax_type(c)][regex_constants::escape_syntax_type][Returns a symbolic value of type regex_constants::escape_syntax_type, that signifies the meaning of character c within the regular expression grammar, when c has been preceded by an escape character. Precondition: if b is the character preceding c in the expression being parsed then: `v.syntax_type(b) == syntax_escape`]] [[v.escape_syntax_type(c)][regex_constants::escape_syntax_type][Returns a symbolic value of type regex_constants::escape_syntax_type, that signifies the meaning of character c within the regular expression grammar, when c has been preceded by an escape character. Precondition: if b is the character preceding c in the expression being parsed then: `v.syntax_type(b) == syntax_escape`]]
[[v.translate(c, b)][X::char_type][Returns a character d such that: for any character d that is to be considered equivalent to c then `v.translate(c,false)==v.translate(d,false)`. Likewise for all characters C that are to be considered equivalent to c when comparisons are to be performed without regard to case, then `v.translate(c,true)==v.translate(C,true)`.]] [[v.translate(c, b)][X::char_type][Returns a character d such that: for any character d that is to be considered equivalent to c then `v.translate(c,false)==v.translate(d,false)`. Likewise for all characters C that are to be considered equivalent to c when comparisons are to be performed without regard to case, then `v.translate(c,true)==v.translate(C,true)`.]]
[[v.toi(I1, I2, i)][An integer type capable of holding either a charT or an int.][Behaves as follows: if `p == q` or if `*p` is not a digit character then returns -1. Otherwise performs formatted numeric input on the sequence \[p,q) and returns the result as an int. Postcondition: either p == q or *p is a non-digit character.]] [[v.toi(I1, I2, i)][An integer type capable of holding either a charT or an int.][Behaves as follows: if `p == q` or if `*p` is not a digit character then returns -1. Otherwise performs formatted numeric input on the sequence \[p,q) and returns the result as an int. Postcondition: either p == q or *p is a non-digit character.]]
[[v.error_string(i)][std::string][Returns a human readable error string for the error condition i, where i is one of the values enumerated by type regex_constants::error_type. If the value i is not recognized then returns the string "Unknown error" or a localized equivalent.]] [[v.error_string(I)][std::string][Returns a human readable error string for the error condition i, where i is one of the values enumerated by type regex_constants::error_type. If the value /I/ is not recognized then returns the string "Unknown error" or a localized equivalent.]]
[[v.tolower(c)][X::char_type][Converts c to lower case, used for Perl-style \l and \L formating operations.]] [[v.tolower(c)][X::char_type][Converts c to lower case, used for Perl-style \l and \L formating operations.]]
[[v.toupper(c)][X::char_type][Converts c to upper case, used for Perl-style \u and \U formating operations.]] [[v.toupper(c)][X::char_type][Converts c to upper case, used for Perl-style \u and \U formating operations.]]
] ]
[endsect] [endsect]
[section:iterator_concepts Iterator Rrequirements] [section:iterator_concepts Iterator Requirements]
The regular expression algorithms (and iterators) take all require a The regular expression algorithms (and iterators) take all require a
Bidirectional-Iterator. Bidirectional-Iterator.

543
doc/gcc-performance.html Normal file
View File

@ -0,0 +1,543 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>Regular Expression Performance Comparison (gcc 3.2)</title>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<META content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot" name="Template">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
</head>
<body bgcolor="#ffffff" link="#0000ff" vlink="#800080">
<h2>Regular Expression Performance Comparison</h2>
<p>The following tables provide comparisons between the following regular
expression libraries:</p>
<p><a href="http://www.boost.org/">The Boost regex library</a>.</p>
<p><a href="http://www.gnu.org">The GNU regular expression library</a>.</p>
<p>Philip Hazel's <a href="http://www.pcre.org">PCRE</a> library.</p>
<h3>Details</h3>
<p>Machine: Intel Pentium 4 2.8GHz PC.</p>
<p>Compiler: GNU C++ version 3.2 20020927 (prerelease).</p>
<p>C++ Standard Library: GNU libstdc++ version 20020927.</p>
<p>OS: Cygwin.</p>
<p>Boost version: 1.31.0.</p>
<p>PCRE version: 4.1.</p>
<p>As ever care should be taken in interpreting the results, only sensible regular
expressions (rather than pathological cases) are given, most are taken from the
Boost regex examples, or from the <a href="http://www.regxlib.com/">Library of
Regular Expressions</a>. In addition, some variation in the relative
performance of these libraries can be expected on other machines - as memory
access and processor caching effects can be quite large for most finite state
machine algorithms. In each case the first figure given is the relative time
taken (so a value of 1.0 is as good as it gets), while the second figure is the
actual time taken.</p>
<h3>Averages</h3>
<p>The following are the average relative scores for all the tests: the perfect
regular expression library&nbsp;would score 1, in practice anything less than 2
is pretty good.</p>
<table border="1" cellspacing="1">
<tr>
<td><strong>Boost</strong></td>
<td><strong>Boost + C++ locale</strong></td>
<td><strong>POSIX</strong></td>
<td><strong>PCRE</strong></td>
</tr>
<tr>
<td>1.4503</td>
<td>1.49124</td>
<td>108.372</td>
<td>1.56255</td>
</tr>
</table>
<br>
<br>
<h3>Comparison 1: Long Search</h3>
<p>For each of the following regular expressions the time taken to find all
occurrences of the expression within a long English language text was measured
(<a href="http://www.gutenberg.org/files/3200/old/mtent12.zip">mtent12.txt</a>
from <a href="http://promo.net/pg/">Project Gutenberg</a>, 19Mb).&nbsp;</p>
<table border="1" cellspacing="1">
<tr>
<td><strong>Expression</strong></td>
<td><strong>Boost</strong></td>
<td><strong>Boost + C++ locale</strong></td>
<td><strong>POSIX</strong></td>
<td><strong>PCRE</strong></td>
</tr>
<tr>
<td><code>Twain</code></td>
<td>3.49<br>
(0.205s)</td>
<td>4.09<br>
(0.24s)</td>
<td>65.2<br>
(3.83s)</td>
<td><font color="#008000">1<br>
(0.0588s)</font></td>
</tr>
<tr>
<td><code>Huck[[:alpha:]]+</code></td>
<td>3.86<br>
(0.203s)</td>
<td>4.52<br>
(0.238s)</td>
<td>100<br>
(5.26s)</td>
<td><font color="#008000">1<br>
(0.0526s)</font></td>
</tr>
<tr>
<td><code>[[:alpha:]]+ing</code></td>
<td><font color="#008000">1.01<br>
(1.23s)</font></td>
<td><font color="#008000">1<br>
(1.22s)</font></td>
<td>4.95<br>
(6.04s)</td>
<td>4.67<br>
(5.71s)</td>
</tr>
<tr>
<td><code>^[^ ]*?Twain</code></td>
<td><font color="#008000">1<br>
(0.31s)</font></td>
<td><font color="#008000">1.05<br>
(0.326s)</font></td>
<td>NA</td>
<td>3.32<br>
(1.03s)</td>
</tr>
<tr>
<td><code>Tom|Sawyer|Huckleberry|Finn</code></td>
<td><font color="#008000">1.02<br>
(0.125s)</font></td>
<td><font color="#008000">1<br>
(0.123s)</font></td>
<td>165<br>
(20.3s)</td>
<td><font color="#008000">1.08<br>
(0.133s)</font></td>
</tr>
<tr>
<td><code> (Tom|Sawyer|Huckleberry|Finn).{0,30}river|river.{0,30}(Tom|Sawyer|Huckleberry|Finn)</code></td>
<td><font color="#008000">1<br>
(0.345s)</font></td>
<td><font color="#008000">1.03<br>
(0.355s)</font></td>
<td>NA</td>
<td>1.71<br>
(0.59s)</td>
</tr>
</table>
<br>
<br>
<h3>Comparison 2: Medium Sized Search</h3>
<p>For each of the following regular expressions the time taken to find all
occurrences of the expression within a medium sized English language text was
measured (the first 50K from mtent12.txt).&nbsp;</p>
<table border="1" cellspacing="1">
<tr>
<td><strong>Expression</strong></td>
<td><strong>Boost</strong></td>
<td><strong>Boost + C++ locale</strong></td>
<td><strong>POSIX</strong></td>
<td><strong>PCRE</strong></td>
</tr>
<tr>
<td><code>Twain</code></td>
<td>1.8<br>
(0.000519s)</td>
<td>2.14<br>
(0.000616s)</td>
<td>9.08<br>
(0.00262s)</td>
<td><font color="#008000">1<br>
(0.000289s)</font></td>
</tr>
<tr>
<td><code>Huck[[:alpha:]]+</code></td>
<td>3.65<br>
(0.000499s)</td>
<td>4.36<br>
(0.000597s)</td>
<td><font color="#008000">1<br>
(0.000137s)</font></td>
<td>1.43<br>
(0.000196s)</td>
</tr>
<tr>
<td><code>[[:alpha:]]+ing</code></td>
<td><font color="#008000">1<br>
(0.00258s)</font></td>
<td><font color="#008000">1<br>
(0.00258s)</font></td>
<td>5.28<br>
(0.0136s)</td>
<td>5.63<br>
(0.0145s)</td>
</tr>
<tr>
<td><code>^[^ ]*?Twain</code></td>
<td><font color="#008000">1<br>
(0.000929s)</font></td>
<td><font color="#008000">1.03<br>
(0.000957s)</font></td>
<td>NA</td>
<td>2.82<br>
(0.00262s)</td>
</tr>
<tr>
<td><code>Tom|Sawyer|Huckleberry|Finn</code></td>
<td><font color="#008000">1<br>
(0.000812s)</font></td>
<td><font color="#008000">1<br>
(0.000812s)</font></td>
<td>60.1<br>
(0.0488s)</td>
<td>1.28<br>
(0.00104s)</td>
</tr>
<tr>
<td><code> (Tom|Sawyer|Huckleberry|Finn).{0,30}river|river.{0,30}(Tom|Sawyer|Huckleberry|Finn)</code></td>
<td><font color="#008000">1.02<br>
(0.00178s)</font></td>
<td><font color="#008000">1<br>
(0.00174s)</font></td>
<td>242<br>
(0.421s)</td>
<td>1.3<br>
(0.00227s)</td>
</tr>
</table>
<br>
<br>
<h3>Comparison 3:&nbsp;C++ Code&nbsp;Search</h3>
<p>For each of the following regular expressions the time taken to find all
occurrences of the expression within the C++ source file <a href="../../../boost/crc.hpp">
boost/crc.hpp</a>&nbsp;was measured.&nbsp;</p>
<table border="1" cellspacing="1">
<tr>
<td><strong>Expression</strong></td>
<td><strong>Boost</strong></td>
<td><strong>Boost + C++ locale</strong></td>
<td><strong>POSIX</strong></td>
<td><strong>PCRE</strong></td>
</tr>
<tr>
<td><code> ^(template[[:space:]]*&lt;[^;:{]+&gt;[[:space:]]*)?(class|struct)[[:space:]]*(\&lt;\w+\&gt;([
]*\([^)]*\))?[[:space:]]*)*(\&lt;\w*\&gt;)[[:space:]]*(&lt;[^;:{]+&gt;[[:space:]]*)?(\{|:[^;\{()]*\{)</code></td>
<td><font color="#008000">1.04<br>
(0.000144s)</font></td>
<td><font color="#008000">1<br>
(0.000139s)</font></td>
<td>862<br>
(0.12s)</td>
<td>4.56<br>
(0.000636s)</td>
</tr>
<tr>
<td><code>(^[
]*#(?:[^\\\n]|\\[^\n_[:punct:][:alnum:]]*[\n[:punct:][:word:]])*)|(//[^\n]*|/\*.*?\*/)|\&lt;([+-]?(?:(?:0x[[:xdigit:]]+)|(?:(?:[[:digit:]]*\.)?[[:digit:]]+(?:[eE][+-]?[[:digit:]]+)?))u?(?:(?:int(?:8|16|32|64))|L)?)\&gt;|('(?:[^\\']|\\.)*'|"(?:[^\\"]|\\.)*")|\&lt;(__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|bool|break|case|catch|cdecl|char|class|const|const_cast|continue|default|delete|do|double|dynamic_cast|else|enum|explicit|extern|false|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|operator|pascal|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_cast|struct|switch|template|this|throw|true|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\&gt;</code></td>
<td><font color="#008000">1<br>
(0.0139s)</font></td>
<td><font color="#008000">1.01<br>
(0.0141s)</font></td>
<td>NA</td>
<td>1.55<br>
(0.0216s)</td>
</tr>
<tr>
<td><code>^[ ]*#[ ]*include[ ]+("[^"]+"|&lt;[^&gt;]+&gt;)</code></td>
<td><font color="#008000">1.04<br>
(0.000332s)</font></td>
<td><font color="#008000">1<br>
(0.000318s)</font></td>
<td>130<br>
(0.0413s)</td>
<td>1.72<br>
(0.000547s)</td>
</tr>
<tr>
<td><code>^[ ]*#[ ]*include[ ]+("boost/[^"]+"|&lt;boost/[^&gt;]+&gt;)</code></td>
<td><font color="#008000">1.02<br>
(0.000323s)</font></td>
<td><font color="#008000">1<br>
(0.000318s)</font></td>
<td>150<br>
(0.0476s)</td>
<td>1.72<br>
(0.000547s)</td>
</tr>
</table>
<br>
<h3></h3>
<H3>Comparison 4: HTML Document Search
</H3>
<p>For each of the following regular expressions the time taken to find all
occurrences of the expression within the html file <a href="../../libraries.htm">libs/libraries.htm</a>
was measured.&nbsp;</p>
<table border="1" cellspacing="1">
<tr>
<td><strong>Expression</strong></td>
<td><strong>Boost</strong></td>
<td><strong>Boost + C++ locale</strong></td>
<td><strong>POSIX</strong></td>
<td><strong>PCRE</strong></td>
</tr>
<tr>
<td><code>beman|john|dave</code></td>
<td><font color="#008000">1.03<br>
(0.000367s)</font></td>
<td><font color="#008000">1<br>
(0.000357s)</font></td>
<td>47.4<br>
(0.0169s)</td>
<td>1.16<br>
(0.000416s)</td>
</tr>
<tr>
<td><code>&lt;p&gt;.*?&lt;/p&gt;</code></td>
<td>1.25<br>
(0.000459s)</td>
<td><font color="#008000">1<br>
(0.000367s)</font></td>
<td>NA</td>
<td><font color="#008000">1.03<br>
(0.000376s)</font></td>
</tr>
<tr>
<td><code> &lt;a[^&gt;]+href=("[^"]*"|[^[:space:]]+)[^&gt;]*&gt;</code></td>
<td><font color="#008000">1<br>
(0.000509s)</font></td>
<td><font color="#008000">1.02<br>
(0.000518s)</font></td>
<td>305<br>
(0.155s)</td>
<td><font color="#008000">1.1<br>
(0.000558s)</font></td>
</tr>
<tr>
<td><code> &lt;h[12345678][^&gt;]*&gt;.*?&lt;/h[12345678]&gt;</code></td>
<td><font color="#008000">1.04<br>
(0.00025s)</font></td>
<td><font color="#008000">1<br>
(0.00024s)</font></td>
<td>NA</td>
<td>1.16<br>
(0.000279s)</td>
</tr>
<tr>
<td><code> &lt;img[^&gt;]+src=("[^"]*"|[^[:space:]]+)[^&gt;]*&gt;</code></td>
<td>2.22<br>
(0.000489s)</td>
<td>1.69<br>
(0.000372s)</td>
<td>148<br>
(0.0326s)</td>
<td><font color="#008000">1<br>
(0.00022s)</font></td>
</tr>
<tr>
<td><code> &lt;font[^&gt;]+face=("[^"]*"|[^[:space:]]+)[^&gt;]*&gt;.*?&lt;/font&gt;</code></td>
<td>1.71<br>
(0.000371s)</td>
<td>1.75<br>
(0.000381s)</td>
<td>NA</td>
<td><font color="#008000">1<br>
(0.000218s)</font></td>
</tr>
</table>
<br>
<br>
<h3>Comparison 3: Simple Matches</h3>
<p>For each of the following regular expressions the time taken to match against
the text indicated was measured.&nbsp;</p>
<table border="1" cellspacing="1">
<tr>
<td><strong>Expression</strong></td>
<td><strong>Text</strong></td>
<td><strong>Boost</strong></td>
<td><strong>Boost + C++ locale</strong></td>
<td><strong>POSIX</strong></td>
<td><strong>PCRE</strong></td>
</tr>
<tr>
<td><code>abc</code></td>
<td>abc</td>
<td>1.36<br>
(2.15e-07s)</td>
<td>1.36<br>
(2.15e-07s)</td>
<td>2.76<br>
(4.34e-07s)</td>
<td><font color="#008000">1<br>
(1.58e-07s)</font></td>
</tr>
<tr>
<td><code>^([0-9]+)(\-| |$)(.*)$</code></td>
<td>100- this is a line of ftp response which contains a message string</td>
<td>1.55<br>
(7.26e-07s)</td>
<td>1.51<br>
(7.07e-07s)</td>
<td>319<br>
(0.000149s)</td>
<td><font color="#008000">1<br>
(4.67e-07s)</font></td>
</tr>
<tr>
<td><code>([[:digit:]]{4}[- ]){3}[[:digit:]]{3,4}</code></td>
<td>1234-5678-1234-456</td>
<td>1.96<br>
(9.54e-07s)</td>
<td>1.96<br>
(9.54e-07s)</td>
<td>44.5<br>
(2.17e-05s)</td>
<td><font color="#008000">1<br>
(4.87e-07s)</font></td>
</tr>
<tr>
<td><code> ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
<td>john@johnmaddock.co.uk</td>
<td>1.22<br>
(1.51e-06s)</td>
<td>1.23<br>
(1.53e-06s)</td>
<td>162<br>
(0.000201s)</td>
<td><font color="#008000">1<br>
(1.24e-06s)</font></td>
</tr>
<tr>
<td><code> ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
<td>foo12@foo.edu</td>
<td>1.28<br>
(1.47e-06s)</td>
<td>1.3<br>
(1.49e-06s)</td>
<td>104<br>
(0.00012s)</td>
<td><font color="#008000">1<br>
(1.15e-06s)</font></td>
</tr>
<tr>
<td><code> ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
<td>bob.smith@foo.tv</td>
<td>1.28<br>
(1.47e-06s)</td>
<td>1.3<br>
(1.49e-06s)</td>
<td>113<br>
(0.00013s)</td>
<td><font color="#008000">1<br>
(1.15e-06s)</font></td>
</tr>
<tr>
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
<td>EH10 2QQ</td>
<td>1.38<br>
(4.68e-07s)</td>
<td>1.41<br>
(4.77e-07s)</td>
<td>13.5<br>
(4.59e-06s)</td>
<td><font color="#008000">1<br>
(3.39e-07s)</font></td>
</tr>
<tr>
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
<td>G1 1AA</td>
<td>1.28<br>
(4.35e-07s)</td>
<td>1.25<br>
(4.25e-07s)</td>
<td>11.7<br>
(3.97e-06s)</td>
<td><font color="#008000">1<br>
(3.39e-07s)</font></td>
</tr>
<tr>
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
<td>SW1 1ZZ</td>
<td>1.32<br>
(4.53e-07s)</td>
<td>1.31<br>
(4.49e-07s)</td>
<td>12.2<br>
(4.2e-06s)</td>
<td><font color="#008000">1<br>
(3.44e-07s)</font></td>
</tr>
<tr>
<td><code> ^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$</code></td>
<td>4/1/2001</td>
<td>1.16<br>
(3.82e-07s)</td>
<td>1.2<br>
(3.96e-07s)</td>
<td>13.9<br>
(4.59e-06s)</td>
<td><font color="#008000">1<br>
(3.29e-07s)</font></td>
</tr>
<tr>
<td><code> ^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$</code></td>
<td>12/12/2001</td>
<td>1.38<br>
(4.49e-07s)</td>
<td>1.38<br>
(4.49e-07s)</td>
<td>16<br>
(5.2e-06s)</td>
<td><font color="#008000">1<br>
(3.25e-07s)</font></td>
</tr>
<tr>
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
<td>123</td>
<td>1.19<br>
(7.64e-07s)</td>
<td>1.16<br>
(7.45e-07s)</td>
<td>7.51<br>
(4.81e-06s)</td>
<td><font color="#008000">1<br>
(6.4e-07s)</font></td>
</tr>
<tr>
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
<td>+3.14159</td>
<td>1.32<br>
(8.97e-07s)</td>
<td>1.31<br>
(8.88e-07s)</td>
<td>14<br>
(9.48e-06s)</td>
<td><font color="#008000">1<br>
(6.78e-07s)</font></td>
</tr>
<tr>
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
<td>-3.14159</td>
<td>1.32<br>
(8.97e-07s)</td>
<td>1.31<br>
(8.88e-07s)</td>
<td>14<br>
(9.48e-06s)</td>
<td><font color="#008000">1<br>
(6.78e-07s)</font></td>
</tr>
</table>
<br>
<br>
<hr>
<p><i><EFBFBD> Copyright John Maddock&nbsp;2003</i></p>
<P><I>Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>
</body>
</html>

View File

@ -3,20 +3,19 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Background Information</title> <title>Background Information</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../index.html" title="Boost.Regex"> <link rel="start" href="../index.html" title="Boost.Regex">
<link rel="up" href="../index.html" title="Boost.Regex"> <link rel="up" href="../index.html" title="Boost.Regex">
<link rel="prev" href="ref/deprecated_interfaces/old_regex.html" title=" High <link rel="prev" href="ref/deprecated_interfaces/old_regex.html" title="High Level Class RegEx (Deprecated)">
Level Class RegEx (Deprecated)"> <link rel="next" href="background_information/headers.html" title="Headers">
<link rel="next" href="background_information/headers.html" title=" Headers">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_regex.background_information"></a><a href="background_information.html" title="Background Information">Background Information</a></h2></div></div></div> <a name="boost_regex.background_information"></a><a href="background_information.html" title="Background Information">Background Information</a>
</h2></div></div></div>
<div class="toc"><dl> <div class="toc"><dl>
<dt><span class="section"><a href="background_information/headers.html"> Headers</a></span></dt> <dt><span class="section"><a href="background_information/headers.html"> Headers</a></span></dt>
<dt><span class="section"><a href="background_information/locale.html"> Localization</a></span></dt> <dt><span class="section"><a href="background_information/locale.html"> Localization</a></span></dt>
@ -44,31 +44,14 @@
Acknowledgements</a></span></dt> Acknowledgements</a></span></dt>
<dt><span class="section"><a href="background_information/history.html"> History</a></span></dt> <dt><span class="section"><a href="background_information/history.html"> History</a></span></dt>
</dl></div> </dl></div>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Acknowledgements</title>
Acknowledgements</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../background_information.html" title="Background Information"> <link rel="up" href="../background_information.html" title="Background Information">
<link rel="prev" href="redist.html" title=" Redistributables"> <link rel="prev" href="redist.html" title="Redistributables">
<link rel="next" href="history.html" title=" History"> <link rel="next" href="history.html" title="History">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.background_information.acknowledgements"></a><a href="acknowledgements.html" title=" <a name="boost_regex.background_information.acknowledgements"></a><a href="acknowledgements.html" title="Acknowledgements">
Acknowledgements"> Acknowledgements</a>
Acknowledgements</a></h3></div></div></div> </h3></div></div></div>
<p> <p>
The author can be contacted at john - at - johnmaddock.co.uk; the home page The author can be contacted at john - at - johnmaddock.co.uk; the home page
for this library is at <a href="http://www.boost.org" target="_top">www.boost.org</a>. for this library is at <a href="http://www.boost.org" target="_top">www.boost.org</a>.
@ -75,10 +74,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,24 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Test and <title>Test and Example Programs</title>
Example Programs</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../background_information.html" title="Background Information"> <link rel="up" href="../background_information.html" title="Background Information">
<link rel="prev" href="thread_safety.html" title=" Thread <link rel="prev" href="thread_safety.html" title="Thread Safety">
Safety"> <link rel="next" href="futher.html" title="References and Further Information">
<link rel="next" href="futher.html" title=" References
and Further Information">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -27,16 +24,16 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.background_information.examples"></a><a href="examples.html" title=" Test and <a name="boost_regex.background_information.examples"></a><a href="examples.html" title="Test and Example Programs"> Test and
Example Programs"> Test and Example Programs</a>
Example Programs</a></h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.background_information.examples.test_programs"></a><h4> <a name="boost_regex.background_information.examples.test_programs"></a><h5>
<a name="id614398"></a> <a name="id647277"></a>
<a href="examples.html#boost_regex.background_information.examples.test_programs">Test <a href="examples.html#boost_regex.background_information.examples.test_programs">Test
Programs</a> Programs</a>
</h4> </h5>
<p> <p>
<span class="bold"><b>regress:</b></span> <span class="bold"><strong>regress:</strong></span>
</p> </p>
<p> <p>
A regression test application that gives the matching/searching algorithms A regression test application that gives the matching/searching algorithms
@ -52,7 +49,7 @@
Files: See directory. Files: See directory.
</p> </p>
<p> <p>
<span class="bold"><b>bad_expression_test:</b></span> <span class="bold"><strong>bad_expression_test:</strong></span>
</p> </p>
<p> <p>
Verifies that "bad" regular expressions don't cause the matcher Verifies that "bad" regular expressions don't cause the matcher
@ -65,7 +62,7 @@
Files: <a href="../../../../test/pathology/bad_expression_test.cpp" target="_top">bad_expression_test.cpp</a>. Files: <a href="../../../../test/pathology/bad_expression_test.cpp" target="_top">bad_expression_test.cpp</a>.
</p> </p>
<p> <p>
<span class="bold"><b>recursion_test:</b></span> <span class="bold"><strong>recursion_test:</strong></span>
</p> </p>
<p> <p>
Verifies that the matcher can't overrun the stack (no matter what the expression). Verifies that the matcher can't overrun the stack (no matter what the expression).
@ -77,7 +74,7 @@
Files: <a href="../../../../test/pathology/recursion_test.cpp" target="_top">recursion_test.cpp</a>. Files: <a href="../../../../test/pathology/recursion_test.cpp" target="_top">recursion_test.cpp</a>.
</p> </p>
<p> <p>
<span class="bold"><b>concepts:</b></span> <span class="bold"><strong>concepts:</strong></span>
</p> </p>
<p> <p>
Verifies that the library meets all documented concepts (a compile only test). Verifies that the library meets all documented concepts (a compile only test).
@ -89,7 +86,7 @@
Files: <a href="../../../../test/concepts/concept_check.cpp" target="_top">concept_check.cpp</a>. Files: <a href="../../../../test/concepts/concept_check.cpp" target="_top">concept_check.cpp</a>.
</p> </p>
<p> <p>
<span class="bold"><b>captures_test:</b></span> <span class="bold"><strong>captures_test:</strong></span>
</p> </p>
<p> <p>
Test code for captures. Test code for captures.
@ -100,13 +97,13 @@
<p> <p>
Files: <a href="../../../../test/captures/captures_test.cpp" target="_top">captures_test.cpp</a>. Files: <a href="../../../../test/captures/captures_test.cpp" target="_top">captures_test.cpp</a>.
</p> </p>
<a name="boost_regex.background_information.examples.example_programs"></a><h4> <a name="boost_regex.background_information.examples.example_programs"></a><h5>
<a name="id614615"></a> <a name="id647485"></a>
<a href="examples.html#boost_regex.background_information.examples.example_programs">Example <a href="examples.html#boost_regex.background_information.examples.example_programs">Example
programs</a> programs</a>
</h4> </h5>
<p> <p>
<span class="bold"><b>grep</b></span> <span class="bold"><strong>grep</strong></span>
</p> </p>
<p> <p>
A simple grep implementation, run with the -h command line option to find A simple grep implementation, run with the -h command line option to find
@ -116,7 +113,7 @@
Files: <a href="../../../../example/grep/grep.cpp" target="_top">grep.cpp</a> Files: <a href="../../../../example/grep/grep.cpp" target="_top">grep.cpp</a>
</p> </p>
<p> <p>
<span class="bold"><b>timer.exe</b></span> <span class="bold"><strong>timer.exe</strong></span>
</p> </p>
<p> <p>
A simple interactive expression matching application, the results of all A simple interactive expression matching application, the results of all
@ -126,11 +123,11 @@
<p> <p>
Files: <a href="../../../../example/timer/regex_timer.cpp" target="_top">regex_timer.cpp</a>. Files: <a href="../../../../example/timer/regex_timer.cpp" target="_top">regex_timer.cpp</a>.
</p> </p>
<a name="boost_regex.background_information.examples.code_snippets"></a><h4> <a name="boost_regex.background_information.examples.code_snippets"></a><h5>
<a name="id614698"></a> <a name="id647566"></a>
<a href="examples.html#boost_regex.background_information.examples.code_snippets">Code <a href="examples.html#boost_regex.background_information.examples.code_snippets">Code
snippets</a> snippets</a>
</h4> </h5>
<p> <p>
The snippets examples contain the code examples used in the documentation: The snippets examples contain the code examples used in the documentation:
</p> </p>
@ -211,10 +208,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> FAQ</title> <title>FAQ</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../background_information.html" title="Background Information"> <link rel="up" href="../background_information.html" title="Background Information">
<link rel="prev" href="futher.html" title=" References <link rel="prev" href="futher.html" title="References and Further Information">
and Further Information"> <link rel="next" href="performance.html" title="Performance">
<link rel="next" href="performance.html" title=" Performance">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,13 +24,14 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.background_information.faq"></a><a href="faq.html" title=" FAQ"> FAQ</a></h3></div></div></div> <a name="boost_regex.background_information.faq"></a><a href="faq.html" title="FAQ"> FAQ</a>
</h3></div></div></div>
<p> <p>
<span class="bold"><b>Q.</b></span> I can't get regex++ to work with escape <span class="bold"><strong>Q.</strong></span> I can't get regex++ to work with escape
characters, what's going on? characters, what's going on?
</p> </p>
<p> <p>
<span class="bold"><b>A.</b></span> If you embed regular expressions in C++ <span class="bold"><strong>A.</strong></span> If you embed regular expressions in C++
code, then remember that escape characters are processed twice: once by the code, then remember that escape characters are processed twice: once by the
C++ compiler, and once by the Boost.Regex expression compiler, so to pass C++ compiler, and once by the Boost.Regex expression compiler, so to pass
the regular expression \d+ to Boost.Regex, you need to embed "\d+" the regular expression \d+ to Boost.Regex, you need to embed "\d+"
@ -39,21 +39,21 @@
"\\" in your code. "\\" in your code.
</p> </p>
<p> <p>
<span class="bold"><b>Q.</b></span> No matter what I do regex_match always <span class="bold"><strong>Q.</strong></span> No matter what I do regex_match always
returns false, what's going on? returns false, what's going on?
</p> </p>
<p> <p>
<span class="bold"><b>A.</b></span> The algorithm regex_match only succeeds <span class="bold"><strong>A.</strong></span> The algorithm regex_match only succeeds
if the expression matches <span class="bold"><b>all</b></span> of the text, if the expression matches <span class="bold"><strong>all</strong></span> of the text,
if you want to <span class="bold"><b>find</b></span> a sub-string within if you want to <span class="bold"><strong>find</strong></span> a sub-string within
the text that matches the expression then use regex_search instead. the text that matches the expression then use regex_search instead.
</p> </p>
<p> <p>
<span class="bold"><b>Q.</b></span> Why does using parenthesis in a POSIX <span class="bold"><strong>Q.</strong></span> Why does using parenthesis in a POSIX
regular expression change the result of a match? regular expression change the result of a match?
</p> </p>
<p> <p>
<span class="bold"><b>A.</b></span> For POSIX (extended and basic) regular <span class="bold"><strong>A.</strong></span> For POSIX (extended and basic) regular
expressions, but not for perl regexes, parentheses don't only mark; they expressions, but not for perl regexes, parentheses don't only mark; they
determine what the best match is as well. When the expression is compiled determine what the best match is as well. When the expression is compiled
as a POSIX basic or extended regex then Boost.Regex follows the POSIX standard as a POSIX basic or extended regex then Boost.Regex follows the POSIX standard
@ -85,11 +85,11 @@
as the expression. as the expression.
</p> </p>
<p> <p>
<span class="bold"><b>Q.</b></span> Why don't character ranges work properly <span class="bold"><strong>Q.</strong></span> Why don't character ranges work properly
(POSIX mode only)? (POSIX mode only)?
</p> </p>
<p> <p>
<span class="bold"><b>A.</b></span> The POSIX standard specifies that character <span class="bold"><strong>A.</strong></span> The POSIX standard specifies that character
range expressions are locale sensitive - so for example the expression [A-Z] range expressions are locale sensitive - so for example the expression [A-Z]
will match any collating element that collates between 'A' and 'Z'. That will match any collating element that collates between 'A' and 'Z'. That
means that for most locales other than "C" or "POSIX", means that for most locales other than "C" or "POSIX",
@ -97,39 +97,39 @@
most people expect - or at least not what most people have come to expect most people expect - or at least not what most people have come to expect
from regular expression engines. For this reason, the default behaviour of from regular expression engines. For this reason, the default behaviour of
Boost.Regex (perl mode) is to turn locale sensitive collation off by not Boost.Regex (perl mode) is to turn locale sensitive collation off by not
setting the <tt class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">collate</span></tt> setting the <code class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">collate</span></code>
compile time flag. However if you set a non-default compile time flag - for compile time flag. However if you set a non-default compile time flag - for
example <tt class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">extended</span></tt> or <tt class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">basic</span></tt>, example <code class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">extended</span></code> or <code class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">basic</span></code>,
then locale dependent collation will be enabled, this also applies to the then locale dependent collation will be enabled, this also applies to the
POSIX API functions which use either <tt class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">extended</span></tt> POSIX API functions which use either <code class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">extended</span></code>
or <tt class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">basic</span></tt> internally. [Note - when <tt class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">nocollate</span></tt> in effect, the library behaves or <code class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">basic</span></code> internally. [Note - when <code class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">nocollate</span></code> in effect, the library behaves
"as if" the LC_COLLATE locale category were always "C", "as if" the LC_COLLATE locale category were always "C",
regardless of what its actually set to - end note]. regardless of what its actually set to - end note].
</p> </p>
<p> <p>
<span class="bold"><b>Q.</b></span> Why are there no throw specifications <span class="bold"><strong>Q.</strong></span> Why are there no throw specifications
on any of the functions? What exceptions can the library throw? on any of the functions? What exceptions can the library throw?
</p> </p>
<p> <p>
<span class="bold"><b>A.</b></span> Not all compilers support (or honor) <span class="bold"><strong>A.</strong></span> Not all compilers support (or honor)
throw specifications, others support them but with reduced efficiency. Throw throw specifications, others support them but with reduced efficiency. Throw
specifications may be added at a later date as compilers begin to handle specifications may be added at a later date as compilers begin to handle
this better. The library should throw only three types of exception: [boost::regex_error] this better. The library should throw only three types of exception: [boost::regex_error]
can be thrown by <a href="../ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> when compiling a regular can be thrown by <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> when compiling a regular
expression, <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> can be thrown when a call expression, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code> can be thrown when a call
to <tt class="computeroutput"><span class="identifier">basic_regex</span><span class="special">::</span><span class="identifier">imbue</span></tt> tries to open a message catalogue to <code class="computeroutput"><span class="identifier">basic_regex</span><span class="special">::</span><span class="identifier">imbue</span></code> tries to open a message catalogue
that doesn't exist, or when a call to <a href="../ref/regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> or <a href="../ref/regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a> results in an "everlasting" that doesn't exist, or when a call to <a href="../ref/regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a> or <a href="../ref/regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a> results in an "everlasting"
search, or when a call to <tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">GrepFiles</span></tt> search, or when a call to <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">GrepFiles</span></code>
or <tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">FindFiles</span></tt> tries to open a file that cannot or <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">FindFiles</span></code> tries to open a file that cannot
be opened, finally <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></tt> can be thrown by just about any be opened, finally <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code> can be thrown by just about any
of the functions in this library. of the functions in this library.
</p> </p>
<p> <p>
<span class="bold"><b>Q.</b></span> Why can't I use the "convenience" <span class="bold"><strong>Q.</strong></span> Why can't I use the "convenience"
versions of regex_match / regex_search / regex_grep / regex_format / regex_merge? versions of regex_match / regex_search / regex_grep / regex_format / regex_merge?
</p> </p>
<p> <p>
<span class="bold"><b>A.</b></span> These versions may or may not be available <span class="bold"><strong>A.</strong></span> These versions may or may not be available
depending upon the capabilities of your compiler, the rules determining the depending upon the capabilities of your compiler, the rules determining the
format of these functions are quite complex - and only the versions visible format of these functions are quite complex - and only the versions visible
to a standard compliant compiler are given in the help. To find out what to a standard compliant compiler are given in the help. To find out what
@ -141,10 +141,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,23 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> References <title>References and Further Information</title>
and Further Information</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../background_information.html" title="Background Information"> <link rel="up" href="../background_information.html" title="Background Information">
<link rel="prev" href="examples.html" title=" Test and <link rel="prev" href="examples.html" title="Test and Example Programs">
Example Programs"> <link rel="next" href="faq.html" title="FAQ">
<link rel="next" href="faq.html" title=" FAQ">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.background_information.futher"></a><a href="futher.html" title=" References <a name="boost_regex.background_information.futher"></a><a href="futher.html" title="References and Further Information"> References
and Further Information"> References and Further Information</a>
and Further Information</a></h3></div></div></div> </h3></div></div></div>
<p> <p>
Short tutorials on regular expressions can be <a href="http://etext.lib.virginia.edu/helpsheets/regex.html" target="_top">found Short tutorials on regular expressions can be <a href="http://etext.lib.virginia.edu/helpsheets/regex.html" target="_top">found
here</a> and <a href="http://www.linuxpcug.org/lessons/regexp.html" target="_top">here</a>. here</a> and <a href="http://www.linuxpcug.org/lessons/regexp.html" target="_top">here</a>.
@ -64,10 +62,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Headers</title> <title>Headers</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../background_information.html" title="Background Information"> <link rel="up" href="../background_information.html" title="Background Information">
<link rel="prev" href="../background_information.html" title="Background Information"> <link rel="prev" href="../background_information.html" title="Background Information">
<link rel="next" href="locale.html" title=" Localization"> <link rel="next" href="locale.html" title="Localization">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,25 +24,27 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.background_information.headers"></a><a href="headers.html" title=" Headers"> Headers</a></h3></div></div></div> <a name="boost_regex.background_information.headers"></a><a href="headers.html" title="Headers"> Headers</a>
</h3></div></div></div>
<p> <p>
There are two main headers used by this library: <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt> There are two main headers used by this library: <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
provides full access to the main template library, while <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt> provides full access to the main template library, while <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
provides access to the (deprecated) high level class RegEx, and the POSIX provides access to the (deprecated) high level class RegEx, and the POSIX
API functions. API functions.
</p> </p>
<p> <p>
There is also a header containing only forward declarations <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt> There is also a header containing only forward declarations <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
for use when an interface is dependent upon <a href="../ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>, but otherwise does for use when an interface is dependent upon <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>, but otherwise does
not need the full definitions. not need the full definitions.
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,21 +1,20 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> History</title> <title>History</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../background_information.html" title="Background Information"> <link rel="up" href="../background_information.html" title="Background Information">
<link rel="prev" href="acknowledgements.html" title=" <link rel="prev" href="acknowledgements.html" title="Acknowledgements">
Acknowledgements">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,12 +23,13 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.background_information.history"></a><a href="history.html" title=" History"> History</a></h3></div></div></div> <a name="boost_regex.background_information.history"></a><a href="history.html" title="History"> History</a>
<a name="boost_regex.background_information.history.boost_1_34"></a><h4> </h3></div></div></div>
<a name="id616902"></a> <a name="boost_regex.background_information.history.boost_1_34"></a><h5>
<a name="id649714"></a>
<a href="history.html#boost_regex.background_information.history.boost_1_34">Boost <a href="history.html#boost_regex.background_information.history.boost_1_34">Boost
1.34</a> 1.34</a>
</h4> </h5>
<div class="itemizedlist"><ul type="disc"> <div class="itemizedlist"><ul type="disc">
<li> <li>
Fix for non-greedy repeats and partial matches not working correctly in Fix for non-greedy repeats and partial matches not working correctly in
@ -48,11 +48,11 @@
the same as |. the same as |.
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.background_information.history.boost_1_33_1"></a><h4> <a name="boost_regex.background_information.history.boost_1_33_1"></a><h5>
<a name="id616955"></a> <a name="id649765"></a>
<a href="history.html#boost_regex.background_information.history.boost_1_33_1">Boost <a href="history.html#boost_regex.background_information.history.boost_1_33_1">Boost
1.33.1</a> 1.33.1</a>
</h4> </h5>
<div class="itemizedlist"><ul type="disc"> <div class="itemizedlist"><ul type="disc">
<li> <li>
Fixed broken makefiles. Fixed broken makefiles.
@ -118,11 +118,11 @@
Fixed bug that allowed some invalid expressions to be accepted. Fixed bug that allowed some invalid expressions to be accepted.
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.background_information.history.boost_1_33_0"></a><h4> <a name="boost_regex.background_information.history.boost_1_33_0"></a><h5>
<a name="id617086"></a> <a name="id649895"></a>
<a href="history.html#boost_regex.background_information.history.boost_1_33_0">Boost <a href="history.html#boost_regex.background_information.history.boost_1_33_0">Boost
1.33.0</a> 1.33.0</a>
</h4> </h5>
<div class="itemizedlist"><ul type="disc"> <div class="itemizedlist"><ul type="disc">
<li> <li>
Completely rewritten expression parsing code, and traits class support; Completely rewritten expression parsing code, and traits class support;
@ -173,19 +173,19 @@
in the expression the error occured. in the expression the error occured.
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.background_information.history.boost_1_32_1"></a><h4> <a name="boost_regex.background_information.history.boost_1_32_1"></a><h5>
<a name="id617194"></a> <a name="id649992"></a>
<a href="history.html#boost_regex.background_information.history.boost_1_32_1">Boost <a href="history.html#boost_regex.background_information.history.boost_1_32_1">Boost
1.32.1</a> 1.32.1</a>
</h4> </h5>
<div class="itemizedlist"><ul type="disc"><li> <div class="itemizedlist"><ul type="disc"><li>
Fixed bug in partial matches of bounded repeats of '.'. Fixed bug in partial matches of bounded repeats of '.'.
</li></ul></div> </li></ul></div>
<a name="boost_regex.background_information.history.boost_1_31_0"></a><h4> <a name="boost_regex.background_information.history.boost_1_31_0"></a><h5>
<a name="id617229"></a> <a name="id650025"></a>
<a href="history.html#boost_regex.background_information.history.boost_1_31_0">Boost <a href="history.html#boost_regex.background_information.history.boost_1_31_0">Boost
1.31.0</a> 1.31.0</a>
</h4> </h5>
<div class="itemizedlist"><ul type="disc"> <div class="itemizedlist"><ul type="disc">
<li> <li>
Completely rewritten pattern matching code - it is now up to 10 times faster Completely rewritten pattern matching code - it is now up to 10 times faster
@ -220,10 +220,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Localization</title> <title>Localization</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../background_information.html" title="Background Information"> <link rel="up" href="../background_information.html" title="Background Information">
<link rel="prev" href="headers.html" title=" Headers"> <link rel="prev" href="headers.html" title="Headers">
<link rel="next" href="thread_safety.html" title=" Thread <link rel="next" href="thread_safety.html" title="Thread Safety">
Safety">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.background_information.locale"></a><a href="locale.html" title=" Localization"> Localization</a></h3></div></div></div> <a name="boost_regex.background_information.locale"></a><a href="locale.html" title="Localization"> Localization</a>
</h3></div></div></div>
<p> <p>
Boost.Regex provides extensive support for run-time localization, the localization Boost.Regex provides extensive support for run-time localization, the localization
model used can be split into two parts: front-end and back-end. model used can be split into two parts: front-end and back-end.
@ -57,52 +57,50 @@
<p> <p>
There are three separate localization mechanisms supported by Boost.Regex: There are three separate localization mechanisms supported by Boost.Regex:
</p> </p>
<a name="boost_regex.background_information.locale.win32_localization_model_"></a><h4> <a name="boost_regex.background_information.locale.win32_localization_model_"></a><h5>
<a name="id610859"></a> <a name="id643785"></a>
<a href="locale.html#boost_regex.background_information.locale.win32_localization_model_">Win32 <a href="locale.html#boost_regex.background_information.locale.win32_localization_model_">Win32
localization model.</a> localization model.</a>
</h4> </h5>
<p> <p>
This is the default model when the library is compiled under Win32, and is This is the default model when the library is compiled under Win32, and is
encapsulated by the traits class <tt class="computeroutput"><span class="identifier">w32_regex_traits</span></tt>. encapsulated by the traits class <code class="computeroutput"><span class="identifier">w32_regex_traits</span></code>.
When this model is in effect each <a href="../ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> object gets it's own When this model is in effect each <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> object gets it's own
LCID, by default this is the users default setting as returned by GetUserDefaultLCID, LCID, by default this is the users default setting as returned by GetUserDefaultLCID,
but you can call imbue on the <tt class="computeroutput"><span class="identifier">basic_regex</span></tt> but you can call imbue on the <code class="computeroutput"><span class="identifier">basic_regex</span></code>
object to set it's locale to some other LCID if you wish. All the settings object to set it's locale to some other LCID if you wish. All the settings
used by Boost.Regex are acquired directly from the operating system bypassing used by Boost.Regex are acquired directly from the operating system bypassing
the C run time library. Front-end localization requires a resource dll, containing the C run time library. Front-end localization requires a resource dll, containing
a string table with the user-defined strings. The traits class exports the a string table with the user-defined strings. The traits class exports the
function: function:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">);</span>
<span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">);</span>
</pre> </pre>
<p> <p>
which needs to be called with a string identifying the name of the resource which needs to be called with a string identifying the name of the resource
dll, before your code compiles any regular expressions (but not necessarily dll, before your code compiles any regular expressions (but not necessarily
before you construct any <tt class="computeroutput"><span class="identifier">basic_regex</span></tt> before you construct any <code class="computeroutput"><span class="identifier">basic_regex</span></code>
instances): instances):
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">w32_regex_traits</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="string">"mydll.dll"</span><span class="special">);</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">w32_regex_traits</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="string">"mydll.dll"</span><span class="special">);</span>
</pre> </pre>
<p> <p>
The library provides full Unicode support under NT, under Windows 9x the The library provides full Unicode support under NT, under Windows 9x the
library degrades gracefully - characters 0 to 255 are supported, the remainder library degrades gracefully - characters 0 to 255 are supported, the remainder
are treated as "unknown" graphic characters. are treated as "unknown" graphic characters.
</p> </p>
<a name="boost_regex.background_information.locale.c_localization_model_"></a><h4> <a name="boost_regex.background_information.locale.c_localization_model_"></a><h5>
<a name="id611109"></a> <a name="id644023"></a>
<a href="locale.html#boost_regex.background_information.locale.c_localization_model_">C <a href="locale.html#boost_regex.background_information.locale.c_localization_model_">C
localization model.</a> localization model.</a>
</h4> </h5>
<p> <p>
This model has been deprecated in favor of the C++ locale for all non-Windows This model has been deprecated in favor of the C++ locale for all non-Windows
compilers that support it. This locale is encapsulated by the traits class compilers that support it. This locale is encapsulated by the traits class
<tt class="computeroutput"><span class="identifier">c_regex_traits</span></tt>, Win32 users <code class="computeroutput"><span class="identifier">c_regex_traits</span></code>, Win32 users
can force this model to take effect by defining the pre-processor symbol can force this model to take effect by defining the pre-processor symbol
BOOST_REGEX_USE_C_LOCALE. When this model is in effect there is a single BOOST_REGEX_USE_C_LOCALE. When this model is in effect there is a single
global locale, as set by <tt class="computeroutput"><span class="identifier">setlocale</span></tt>. global locale, as set by <code class="computeroutput"><span class="identifier">setlocale</span></code>.
All settings are acquired from your run time library, consequently Unicode All settings are acquired from your run time library, consequently Unicode
support is dependent upon your run time library implementation. support is dependent upon your run time library implementation.
</p> </p>
@ -111,54 +109,52 @@
</p> </p>
<p> <p>
Note that calling setlocale invalidates all compiled regular expressions, Note that calling setlocale invalidates all compiled regular expressions,
calling <tt class="computeroutput"><span class="identifier">setlocale</span><span class="special">(</span><span class="identifier">LC_ALL</span><span class="special">,</span> <span class="string">"C"</span><span class="special">)</span></tt> calling <code class="computeroutput"><span class="identifier">setlocale</span><span class="special">(</span><span class="identifier">LC_ALL</span><span class="special">,</span> <span class="string">"C"</span><span class="special">)</span></code>
will make this library behave equivalent to most traditional regular expression will make this library behave equivalent to most traditional regular expression
libraries including version 1 of this library. libraries including version 1 of this library.
</p> </p>
<a name="boost_regex.background_information.locale.c___localization_model_"></a><h4> <a name="boost_regex.background_information.locale.c___localization_model_"></a><h5>
<a name="id611224"></a> <a name="id644136"></a>
<a href="locale.html#boost_regex.background_information.locale.c___localization_model_">C++ <a href="locale.html#boost_regex.background_information.locale.c___localization_model_">C++
localization model.</a> localization model.</a>
</h4> </h5>
<p> <p>
This model is the default for non-Windows compilers. This model is the default for non-Windows compilers.
</p> </p>
<p> <p>
When this model is in effect each instance of <a href="../ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> has its own instance When this model is in effect each instance of <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> has its own instance
of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">locale</span></tt>, class <a href="../ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> also has a member function of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">locale</span></code>, class <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> also has a member function
<tt class="computeroutput"><span class="identifier">imbue</span></tt> which allows the locale <code class="computeroutput"><span class="identifier">imbue</span></code> which allows the locale
for the expression to be set on a per-instance basis. Front end localization for the expression to be set on a per-instance basis. Front end localization
requires a POSIX message catalogue, which will be loaded via the <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">messages</span></tt> requires a POSIX message catalogue, which will be loaded via the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">messages</span></code>
facet of the expression's locale, the traits class exports the symbol: facet of the expression's locale, the traits class exports the symbol:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">);</span>
<span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">);</span>
</pre> </pre>
<p> <p>
which needs to be called with a string identifying the name of the message which needs to be called with a string identifying the name of the message
catalogue, before your code compiles any regular expressions (but not necessarily catalogue, before your code compiles any regular expressions (but not necessarily
before you construct any basic_regex instances): before you construct any basic_regex instances):
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">cpp_regex_traits</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="string">"mycatalogue"</span><span class="special">);</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">cpp_regex_traits</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="string">"mycatalogue"</span><span class="special">);</span>
</pre> </pre>
<p> <p>
Note that calling <tt class="computeroutput"><span class="identifier">basic_regex</span><span class="special">&lt;&gt;::</span><span class="identifier">imbue</span></tt> Note that calling <code class="computeroutput"><span class="identifier">basic_regex</span><span class="special">&lt;&gt;::</span><span class="identifier">imbue</span></code>
will invalidate any expression currently compiled in that instance of <a href="../ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>. will invalidate any expression currently compiled in that instance of <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>.
</p> </p>
<p> <p>
Finally note that if you build the library with a non-default localization Finally note that if you build the library with a non-default localization
model, then the appropriate pre-processor symbol (BOOST_REGEX_USE_C_LOCALE model, then the appropriate pre-processor symbol (BOOST_REGEX_USE_C_LOCALE
or BOOST_REGEX_USE_CPP_LOCALE) must be defined both when you build the support or BOOST_REGEX_USE_CPP_LOCALE) must be defined both when you build the support
library, and when you include <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt> library, and when you include <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
or <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt> or <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
in your code. The best way to ensure this is to add the #define to <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">user</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt>. in your code. The best way to ensure this is to add the #define to <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">user</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>.
</p> </p>
<a name="boost_regex.background_information.locale.providing_a_message_catalogue"></a><h4> <a name="boost_regex.background_information.locale.providing_a_message_catalogue"></a><h5>
<a name="id611693"></a> <a name="id644596"></a>
<a href="locale.html#boost_regex.background_information.locale.providing_a_message_catalogue">Providing <a href="locale.html#boost_regex.background_information.locale.providing_a_message_catalogue">Providing
a message catalogue</a> a message catalogue</a>
</h4> </h5>
<p> <p>
In order to localize the front end of the library, you need to provide the In order to localize the front end of the library, you need to provide the
library with the appropriate message strings contained either in a resource library with the appropriate message strings contained either in a resource
@ -1272,7 +1268,7 @@
</td> </td>
<td> <td>
<p> <p>
"Unmatched [ or <tt class="literal">" </tt> "Unmatched [ or <code class="literal">" </code>
</p> </p>
</td> </td>
<td> <td>
@ -1779,10 +1775,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Performance</title> <title>Performance</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../background_information.html" title="Background Information"> <link rel="up" href="../background_information.html" title="Background Information">
<link rel="prev" href="faq.html" title=" FAQ"> <link rel="prev" href="faq.html" title="FAQ">
<link rel="next" href="standards.html" title=" Standards <link rel="next" href="standards.html" title="Standards Conformance">
Conformance">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.background_information.performance"></a><a href="performance.html" title=" Performance"> Performance</a></h3></div></div></div> <a name="boost_regex.background_information.performance"></a><a href="performance.html" title="Performance"> Performance</a>
</h3></div></div></div>
<p> <p>
The performance of Boost.Regex in both recursive and non-recursive modes The performance of Boost.Regex in both recursive and non-recursive modes
should be broadly comparable to other regular expression libraries: recursive should be broadly comparable to other regular expression libraries: recursive
@ -46,10 +46,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,23 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Redistributables</title> <title>Redistributables</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../background_information.html" title="Background Information"> <link rel="up" href="../background_information.html" title="Background Information">
<link rel="prev" href="standards.html" title=" Standards <link rel="prev" href="standards.html" title="Standards Conformance">
Conformance"> <link rel="next" href="acknowledgements.html" title="Acknowledgements">
<link rel="next" href="acknowledgements.html" title="
Acknowledgements">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.background_information.redist"></a><a href="redist.html" title=" Redistributables"> Redistributables</a></h3></div></div></div> <a name="boost_regex.background_information.redist"></a><a href="redist.html" title="Redistributables"> Redistributables</a>
</h3></div></div></div>
<p> <p>
If you are using Microsoft or Borland C++ and link to a dll version of the If you are using Microsoft or Borland C++ and link to a dll version of the
run time library, then you can choose to also link to a dll version of Boost.Regex run time library, then you can choose to also link to a dll version of Boost.Regex
@ -48,10 +47,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Standards <title>Standards Conformance</title>
Conformance</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../background_information.html" title="Background Information"> <link rel="up" href="../background_information.html" title="Background Information">
<link rel="prev" href="performance.html" title=" Performance"> <link rel="prev" href="performance.html" title="Performance">
<link rel="next" href="redist.html" title=" Redistributables"> <link rel="next" href="redist.html" title="Redistributables">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,22 +24,22 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.background_information.standards"></a><a href="standards.html" title=" Standards <a name="boost_regex.background_information.standards"></a><a href="standards.html" title="Standards Conformance"> Standards
Conformance"> Standards Conformance</a>
Conformance</a></h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.background_information.standards.c__"></a><h4> <a name="boost_regex.background_information.standards.c__"></a><h5>
<a name="id615703"></a> <a name="id648552"></a>
<a href="standards.html#boost_regex.background_information.standards.c__">C++</a> <a href="standards.html#boost_regex.background_information.standards.c__">C++</a>
</h4> </h5>
<p> <p>
Boost.Regex is intended to conform to the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">Technical Boost.Regex is intended to conform to the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">Technical
Report on C++ Library Extensions</a>. Report on C++ Library Extensions</a>.
</p> </p>
<a name="boost_regex.background_information.standards.ecmascript___javascript"></a><h4> <a name="boost_regex.background_information.standards.ecmascript___javascript"></a><h5>
<a name="id615743"></a> <a name="id648590"></a>
<a href="standards.html#boost_regex.background_information.standards.ecmascript___javascript">ECMAScript <a href="standards.html#boost_regex.background_information.standards.ecmascript___javascript">ECMAScript
/ JavaScript</a> / JavaScript</a>
</h4> </h5>
<p> <p>
All of the ECMAScript regular expression syntax features are supported, except All of the ECMAScript regular expression syntax features are supported, except
that: that:
@ -49,10 +48,10 @@
The escape sequence \u matches any upper case character (the same as [[:upper:]]) The escape sequence \u matches any upper case character (the same as [[:upper:]])
rather than a Unicode escape sequence; use \x{DDDD} for Unicode escape sequences. rather than a Unicode escape sequence; use \x{DDDD} for Unicode escape sequences.
</p> </p>
<a name="boost_regex.background_information.standards.perl"></a><h4> <a name="boost_regex.background_information.standards.perl"></a><h5>
<a name="id615784"></a> <a name="id648630"></a>
<a href="standards.html#boost_regex.background_information.standards.perl">Perl</a> <a href="standards.html#boost_regex.background_information.standards.perl">Perl</a>
</h4> </h5>
<p> <p>
Almost all Perl features are supported, except for: Almost all Perl features are supported, except for:
</p> </p>
@ -62,10 +61,10 @@
<p> <p>
(??{code}) Not implementable in a compiled strongly typed language. (??{code}) Not implementable in a compiled strongly typed language.
</p> </p>
<a name="boost_regex.background_information.standards.posix"></a><h4> <a name="boost_regex.background_information.standards.posix"></a><h5>
<a name="id615824"></a> <a name="id648668"></a>
<a href="standards.html#boost_regex.background_information.standards.posix">POSIX</a> <a href="standards.html#boost_regex.background_information.standards.posix">POSIX</a>
</h4> </h5>
<p> <p>
All the POSIX basic and extended regular expression features are supported, All the POSIX basic and extended regular expression features are supported,
except that: except that:
@ -82,10 +81,10 @@
implementation doesn't work on your platform, then you will need to supply implementation doesn't work on your platform, then you will need to supply
a custom traits class. a custom traits class.
</p> </p>
<a name="boost_regex.background_information.standards.unicode"></a><h4> <a name="boost_regex.background_information.standards.unicode"></a><h5>
<a name="id615873"></a> <a name="id648715"></a>
<a href="standards.html#boost_regex.background_information.standards.unicode">Unicode</a> <a href="standards.html#boost_regex.background_information.standards.unicode">Unicode</a>
</h4> </h5>
<p> <p>
The following comments refer to <a href="http://unicode.org/reports/tr18/" target="_top">Unicode The following comments refer to <a href="http://unicode.org/reports/tr18/" target="_top">Unicode
Technical Standard #18: Unicode Regular Expressions version 11</a>. Technical Standard #18: Unicode Regular Expressions version 11</a>.
@ -165,13 +164,13 @@
Indirectly support by forward-lookahead: Indirectly support by forward-lookahead:
</p> </p>
<p> <p>
<tt class="computeroutput"><span class="special">(?=[[:</span><span class="identifier">X</span><span class="special">:]])[[:</span><span class="identifier">Y</span><span class="special">:]]</span></tt> <code class="computeroutput"><span class="special">(?=[[:</span><span class="identifier">X</span><span class="special">:]])[[:</span><span class="identifier">Y</span><span class="special">:]]</span></code>
</p> </p>
<p> <p>
Gives the intersection of character properties X and Y. Gives the intersection of character properties X and Y.
</p> </p>
<p> <p>
<tt class="computeroutput"><span class="special">(?![[:</span><span class="identifier">X</span><span class="special">:]])[[:</span><span class="identifier">Y</span><span class="special">:]]</span></tt> <code class="computeroutput"><span class="special">(?![[:</span><span class="identifier">X</span><span class="special">:]])[[:</span><span class="identifier">Y</span><span class="special">:]]</span></code>
</p> </p>
<p> <p>
Gives everything in Y that is not in X (subtraction). Gives everything in Y that is not in X (subtraction).
@ -469,7 +468,7 @@
</td> </td>
<td> <td>
<p> <p>
Supported: pass the flag <tt class="computeroutput"><span class="identifier">match_partial</span></tt> Supported: pass the flag <code class="computeroutput"><span class="identifier">match_partial</span></code>
to the regex algorithms. to the regex algorithms.
</p> </p>
</td> </td>
@ -550,10 +549,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,23 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Thread <title>Thread Safety</title>
Safety</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../background_information.html" title="Background Information"> <link rel="up" href="../background_information.html" title="Background Information">
<link rel="prev" href="locale.html" title=" Localization"> <link rel="prev" href="locale.html" title="Localization">
<link rel="next" href="examples.html" title=" Test and <link rel="next" href="examples.html" title="Test and Example Programs">
Example Programs">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,44 +24,43 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.background_information.thread_safety"></a><a href="thread_safety.html" title=" Thread <a name="boost_regex.background_information.thread_safety"></a><a href="thread_safety.html" title="Thread Safety"> Thread
Safety"> Thread Safety</a>
Safety</a></h3></div></div></div> </h3></div></div></div>
<p> <p>
The Boost.Regex library is thread safe when Boost is: you can verify that The Boost.Regex library is thread safe when Boost is: you can verify that
Boost is in thread safe mode by checking to see if <tt class="computeroutput"><span class="identifier">BOOST_HAS_THREADS</span></tt> Boost is in thread safe mode by checking to see if <code class="computeroutput"><span class="identifier">BOOST_HAS_THREADS</span></code>
is defined: this macro is set automatically by the config system when threading is defined: this macro is set automatically by the config system when threading
support is turned on in your compiler. support is turned on in your compiler.
</p> </p>
<p> <p>
Class <a href="../ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> Class <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>
and its typedefs regex and wregex are thread safe, in that compiled regular and its typedefs regex and wregex are thread safe, in that compiled regular
expressions can safely be shared between threads. The matching algorithms expressions can safely be shared between threads. The matching algorithms
<a href="../ref/regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>, <a href="../ref/regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>,
<a href="../ref/regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>, <a href="../ref/regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>,
and <a href="../ref/regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a> and <a href="../ref/regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a>
are all re-entrant and thread safe. Class <a href="../ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> is now thread safe, are all re-entrant and thread safe. Class <a href="../ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> is now thread safe,
in that the results of a match can be safely copied from one thread to another in that the results of a match can be safely copied from one thread to another
(for example one thread may find matches and push <a href="../ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> instances onto a queue, (for example one thread may find matches and push <a href="../ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> instances onto a queue,
while another thread pops them off the other end), otherwise use a separate while another thread pops them off the other end), otherwise use a separate
instance of <a href="../ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> instance of <a href="../ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>
per thread. per thread.
</p> </p>
<p> <p>
The <a href="../ref/posix.html" title=" POSIX Compatible C API's">POSIX API functions</a> are The <a href="../ref/posix.html" title="POSIX Compatible C API's">POSIX API functions</a> are
all re-entrant and thread safe, regular expressions compiled with regcomp all re-entrant and thread safe, regular expressions compiled with regcomp
can also be shared between threads. can also be shared between threads.
</p> </p>
<p> <p>
The <a href="../ref/deprecated_interfaces/old_regex.html" title=" High The <a href="../ref/deprecated_interfaces/old_regex.html" title="High Level Class RegEx (Deprecated)">class
Level Class RegEx (Deprecated)">class
RegEx</a> is only thread safe if each thread gets its own RegEx instance RegEx</a> is only thread safe if each thread gets its own RegEx instance
(apartment threading) - this is a consequence of RegEx handling both compiling (apartment threading) - this is a consequence of RegEx handling both compiling
and matching regular expressions. and matching regular expressions.
</p> </p>
<p> <p>
Finally note that changing the global locale invalidates all compiled regular Finally note that changing the global locale invalidates all compiled regular
expressions, therefore calling <tt class="computeroutput"><span class="identifier">set_locale</span></tt> expressions, therefore calling <code class="computeroutput"><span class="identifier">set_locale</span></code>
from one thread while another uses regular expressions will produce unpredictable from one thread while another uses regular expressions will produce unpredictable
results. results.
</p> </p>
@ -74,10 +71,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Understanding Marked Sub-Expressions <title>Understanding Marked Sub-Expressions and Captures</title>
and Captures</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../index.html" title="Boost.Regex"> <link rel="start" href="../index.html" title="Boost.Regex">
<link rel="up" href="../index.html" title="Boost.Regex"> <link rel="up" href="../index.html" title="Boost.Regex">
<link rel="prev" href="unicode.html" title=" Unicode and Boost.Regex"> <link rel="prev" href="unicode.html" title="Unicode and Boost.Regex">
<link rel="next" href="partial_matches.html" title=" Partial Matches"> <link rel="next" href="partial_matches.html" title="Partial Matches">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_regex.captures"></a><a href="captures.html" title=" Understanding Marked Sub-Expressions <a name="boost_regex.captures"></a><a href="captures.html" title="Understanding Marked Sub-Expressions and Captures"> Understanding Marked Sub-Expressions
and Captures"> Understanding Marked Sub-Expressions and Captures</a>
and Captures</a></h2></div></div></div> </h2></div></div></div>
<p> <p>
Captures are the iterator ranges that are "captured" by marked sub-expressions Captures are the iterator ranges that are "captured" by marked sub-expressions
as a regular expression gets matched. Each marked sub-expression can result as a regular expression gets matched. Each marked sub-expression can result
@ -35,12 +34,12 @@
how captures and marked sub-expressions in Boost.Regex are represented and how captures and marked sub-expressions in Boost.Regex are represented and
accessed. accessed.
</p> </p>
<a name="boost_regex.captures.marked_sub_expressions"></a><h4> <a name="boost_regex.captures.marked_sub_expressions"></a><h5>
<a name="id459027"></a> <a name="id493056"></a>
<a href="captures.html#boost_regex.captures.marked_sub_expressions">Marked sub-expressions</a> <a href="captures.html#boost_regex.captures.marked_sub_expressions">Marked sub-expressions</a>
</h4> </h5>
<p> <p>
Every time a Perl regular expression contains a parenthesis group <tt class="computeroutput"><span class="special">()</span></tt>, it spits out an extra field, known as a Every time a Perl regular expression contains a parenthesis group <code class="computeroutput"><span class="special">()</span></code>, it spits out an extra field, known as a
marked sub-expression, for example the expression: marked sub-expression, for example the expression:
</p> </p>
<pre class="programlisting">(\w+)\W+(\w+)</pre> <pre class="programlisting">(\w+)\W+(\w+)</pre>
@ -48,7 +47,7 @@
Has two marked sub-expressions (known as $1 and $2 respectively), in addition Has two marked sub-expressions (known as $1 and $2 respectively), in addition
the complete match is known as $&amp;, everything before the first match as the complete match is known as $&amp;, everything before the first match as
$`, and everything after the match as $'. So if the above expression is searched $`, and everything after the match as $'. So if the above expression is searched
for within <tt class="computeroutput"><span class="string">"@abc def--"</span></tt>, for within <code class="computeroutput"><span class="string">"@abc def--"</span></code>,
then we obtain: then we obtain:
</p> </p>
<div class="informaltable"><table class="table"> <div class="informaltable"><table class="table">
@ -132,11 +131,10 @@
</tbody> </tbody>
</table></div> </table></div>
<p> <p>
In Boost.Regex all these are accessible via the <a href="ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> class that gets filled In Boost.Regex all these are accessible via the <a href="ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> class that gets filled
in when calling one of the regular expression matching algorithms ( <a href="ref/regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>, <a href="ref/regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>, or <a href="ref/regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a>). So given: in when calling one of the regular expression matching algorithms ( <a href="ref/regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>, <a href="ref/regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>, or <a href="ref/regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>). So given:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">IteratorType</span><span class="special">&gt;</span> <span class="identifier">m</span><span class="special">;</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">IteratorType</span><span class="special">&gt;</span> <span class="identifier">m</span><span class="special">;</span>
</pre> </pre>
<p> <p>
The Perl and Boost.Regex equivalents are as follows: The Perl and Boost.Regex equivalents are as follows:
@ -167,7 +165,7 @@
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">()</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">()</span></code>
</p> </p>
</td> </td>
</tr> </tr>
@ -179,7 +177,7 @@
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></code>
</p> </p>
</td> </td>
</tr> </tr>
@ -191,7 +189,7 @@
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">]</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">]</span></code>
</p> </p>
</td> </td>
</tr> </tr>
@ -203,26 +201,26 @@
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">()</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">()</span></code>
</p> </p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table></div> </table></div>
<p> <p>
In Boost.Regex each sub-expression match is represented by a <a href="ref/sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> object, this is basically In Boost.Regex each sub-expression match is represented by a <a href="ref/sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a> object, this is basically
just a pair of iterators denoting the start and end position of the sub-expression just a pair of iterators denoting the start and end position of the sub-expression
match, but there are some additional operators provided so that objects of match, but there are some additional operators provided so that objects of
type <a href="ref/sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> type <a href="ref/sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
behave a lot like a <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></tt>: for example they are implicitly behave a lot like a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>: for example they are implicitly
convertible to a <tt class="computeroutput"><span class="identifier">basic_string</span></tt>, convertible to a <code class="computeroutput"><span class="identifier">basic_string</span></code>,
they can be compared to a string, added to a string, or streamed out to an they can be compared to a string, added to a string, or streamed out to an
output stream. output stream.
</p> </p>
<a name="boost_regex.captures.unmatched_sub_expressions"></a><h4> <a name="boost_regex.captures.unmatched_sub_expressions"></a><h5>
<a name="id459648"></a> <a name="id493679"></a>
<a href="captures.html#boost_regex.captures.unmatched_sub_expressions">Unmatched Sub-Expressions</a> <a href="captures.html#boost_regex.captures.unmatched_sub_expressions">Unmatched Sub-Expressions</a>
</h4> </h5>
<p> <p>
When a regular expression match is found there is no need for all of the marked When a regular expression match is found there is no need for all of the marked
sub-expressions to have participated in the match, for example the expression: sub-expressions to have participated in the match, for example the expression:
@ -230,12 +228,12 @@
<pre class="programlisting">(abc)|(def)</pre> <pre class="programlisting">(abc)|(def)</pre>
<p> <p>
can match either $1 or $2, but never both at the same time. In Boost.Regex can match either $1 or $2, but never both at the same time. In Boost.Regex
you can determine which sub-expressions matched by accessing the <tt class="computeroutput"><span class="identifier">sub_match</span><span class="special">::</span><span class="identifier">matched</span></tt> data member. you can determine which sub-expressions matched by accessing the <code class="computeroutput"><span class="identifier">sub_match</span><span class="special">::</span><span class="identifier">matched</span></code> data member.
</p> </p>
<a name="boost_regex.captures.repeated_captures"></a><h4> <a name="boost_regex.captures.repeated_captures"></a><h5>
<a name="id459714"></a> <a name="id493741"></a>
<a href="captures.html#boost_regex.captures.repeated_captures">Repeated Captures</a> <a href="captures.html#boost_regex.captures.repeated_captures">Repeated Captures</a>
</h4> </h5>
<p> <p>
When a marked sub-expression is repeated, then the sub-expression gets "captured" When a marked sub-expression is repeated, then the sub-expression gets "captured"
multiple times, however normally only the final capture is available, for example multiple times, however normally only the final capture is available, for example
@ -252,13 +250,12 @@
</p> </p>
<p> <p>
However, Boost.Regex has an experimental feature that allows all the capture However, Boost.Regex has an experimental feature that allows all the capture
information to be retained - this is accessed either via the <tt class="computeroutput"><span class="identifier">match_results</span><span class="special">::</span><span class="identifier">captures</span></tt> member function or the <tt class="computeroutput"><span class="identifier">sub_match</span><span class="special">::</span><span class="identifier">captures</span></tt> member function. These functions information to be retained - this is accessed either via the <code class="computeroutput"><span class="identifier">match_results</span><span class="special">::</span><span class="identifier">captures</span></code> member function or the <code class="computeroutput"><span class="identifier">sub_match</span><span class="special">::</span><span class="identifier">captures</span></code> member function. These functions
return a container that contains a sequence of all the captures obtained during return a container that contains a sequence of all the captures obtained during
the regular expression matching. The following example program shows how this the regular expression matching. The following example program shows how this
information may be used: information may be used:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
<span class="keyword">void</span> <span class="identifier">print_captures</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">regx</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">text</span><span class="special">)</span> <span class="keyword">void</span> <span class="identifier">print_captures</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">regx</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">text</span><span class="special">)</span>
@ -372,10 +369,11 @@ Text: "now is the time for all good men to come to the aid of the party"
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Configuration</title> <title>Configuration</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../index.html" title="Boost.Regex"> <link rel="start" href="../index.html" title="Boost.Regex">
<link rel="up" href="../index.html" title="Boost.Regex"> <link rel="up" href="../index.html" title="Boost.Regex">
<link rel="prev" href="../index.html" title="Boost.Regex"> <link rel="prev" href="../index.html" title="Boost.Regex">
<link rel="next" href="configuration/compiler.html" title=" Compiler Setup"> <link rel="next" href="configuration/compiler.html" title="Compiler Setup">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_regex.configuration"></a><a href="configuration.html" title=" Configuration"> Configuration</a></h2></div></div></div> <a name="boost_regex.configuration"></a><a href="configuration.html" title="Configuration"> Configuration</a>
</h2></div></div></div>
<div class="toc"><dl> <div class="toc"><dl>
<dt><span class="section"><a href="configuration/compiler.html"> Compiler Setup</a></span></dt> <dt><span class="section"><a href="configuration/compiler.html"> Compiler Setup</a></span></dt>
<dt><span class="section"><a href="configuration/locale.html"> Locale and traits <dt><span class="section"><a href="configuration/locale.html"> Locale and traits
@ -36,10 +37,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Algorithm Selection</title> <title>Algorithm Selection</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../configuration.html" title=" Configuration"> <link rel="up" href="../configuration.html" title="Configuration">
<link rel="prev" href="linkage.html" title=" Linkage Options"> <link rel="prev" href="linkage.html" title="Linkage Options">
<link rel="next" href="tuning.html" title=" Algorithm Tuning"> <link rel="next" href="tuning.html" title="Algorithm Tuning">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.configuration.algorithm"></a><a href="algorithm.html" title=" Algorithm Selection"> Algorithm Selection</a></h3></div></div></div> <a name="boost_regex.configuration.algorithm"></a><a href="algorithm.html" title="Algorithm Selection"> Algorithm Selection</a>
</h3></div></div></div>
<div class="informaltable"><table class="table"> <div class="informaltable"><table class="table">
<colgroup> <colgroup>
<col> <col>
@ -78,10 +79,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Compiler Setup</title> <title>Compiler Setup</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../configuration.html" title=" Configuration"> <link rel="up" href="../configuration.html" title="Configuration">
<link rel="prev" href="../configuration.html" title=" Configuration"> <link rel="prev" href="../configuration.html" title="Configuration">
<link rel="next" href="locale.html" title=" Locale and traits <link rel="next" href="locale.html" title="Locale and traits class selection">
class selection">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.configuration.compiler"></a><a href="compiler.html" title=" Compiler Setup"> Compiler Setup</a></h3></div></div></div> <a name="boost_regex.configuration.compiler"></a><a href="compiler.html" title="Compiler Setup"> Compiler Setup</a>
</h3></div></div></div>
<p> <p>
You shouldn't need to do anything special to configure Boost.Regex for use You shouldn't need to do anything special to configure Boost.Regex for use
with your compiler - the <a href="../../../../../config/index.html" target="_top">Boost.Config with your compiler - the <a href="../../../../../config/index.html" target="_top">Boost.Config
@ -36,10 +36,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Linkage Options</title> <title>Linkage Options</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../configuration.html" title=" Configuration"> <link rel="up" href="../configuration.html" title="Configuration">
<link rel="prev" href="locale.html" title=" Locale and traits <link rel="prev" href="locale.html" title="Locale and traits class selection">
class selection"> <link rel="next" href="algorithm.html" title="Algorithm Selection">
<link rel="next" href="algorithm.html" title=" Algorithm Selection">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.configuration.linkage"></a><a href="linkage.html" title=" Linkage Options"> Linkage Options</a></h3></div></div></div> <a name="boost_regex.configuration.linkage"></a><a href="linkage.html" title="Linkage Options"> Linkage Options</a>
</h3></div></div></div>
<div class="informaltable"><table class="table"> <div class="informaltable"><table class="table">
<colgroup> <colgroup>
<col> <col>
@ -77,10 +77,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Locale and traits <title>Locale and traits class selection</title>
class selection</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../configuration.html" title=" Configuration"> <link rel="up" href="../configuration.html" title="Configuration">
<link rel="prev" href="compiler.html" title=" Compiler Setup"> <link rel="prev" href="compiler.html" title="Compiler Setup">
<link rel="next" href="linkage.html" title=" Linkage Options"> <link rel="next" href="linkage.html" title="Linkage Options">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.configuration.locale"></a><a href="locale.html" title=" Locale and traits <a name="boost_regex.configuration.locale"></a><a href="locale.html" title="Locale and traits class selection"> Locale and traits
class selection"> Locale and traits class selection</a>
class selection</a></h3></div></div></div> </h3></div></div></div>
<p> <p>
The following macros (see <a href="../../../../../../boost/regex/user.hpp" target="_top">user.hpp</a>) The following macros (see <a href="../../../../../../boost/regex/user.hpp" target="_top">user.hpp</a>)
control how Boost.Regex interacts with the user's locale: control how Boost.Regex interacts with the user's locale:
@ -96,10 +95,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Algorithm Tuning</title> <title>Algorithm Tuning</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../configuration.html" title=" Configuration"> <link rel="up" href="../configuration.html" title="Configuration">
<link rel="prev" href="algorithm.html" title=" Algorithm Selection"> <link rel="prev" href="algorithm.html" title="Algorithm Selection">
<link rel="next" href="../install.html" title=" Building and Installing the Library"> <link rel="next" href="../install.html" title="Building and Installing the Library">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.configuration.tuning"></a><a href="tuning.html" title=" Algorithm Tuning"> Algorithm Tuning</a></h3></div></div></div> <a name="boost_regex.configuration.tuning"></a><a href="tuning.html" title="Algorithm Tuning"> Algorithm Tuning</a>
</h3></div></div></div>
<p> <p>
The following option applies only if BOOST_REGEX_RECURSIVE is set. The following option applies only if BOOST_REGEX_RECURSIVE is set.
</p> </p>
@ -139,10 +140,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Search and Replace Format String Syntax</title> <title>Search and Replace Format String Syntax</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../index.html" title="Boost.Regex"> <link rel="start" href="../index.html" title="Boost.Regex">
<link rel="up" href="../index.html" title="Boost.Regex"> <link rel="up" href="../index.html" title="Boost.Regex">
<link rel="prev" href="syntax/leftmost_longest_rule.html" title=" The Leftmost <link rel="prev" href="syntax/leftmost_longest_rule.html" title="The Leftmost Longest Rule">
Longest Rule"> <link rel="next" href="format/sed_format.html" title="Sed Format String Syntax">
<link rel="next" href="format/sed_format.html" title=" Sed Format String Syntax">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_regex.format"></a><a href="format.html" title=" Search and Replace Format String Syntax"> Search and Replace Format String Syntax</a></h2></div></div></div> <a name="boost_regex.format"></a><a href="format.html" title="Search and Replace Format String Syntax"> Search and Replace Format String Syntax</a>
</h2></div></div></div>
<div class="toc"><dl> <div class="toc"><dl>
<dt><span class="section"><a href="format/sed_format.html"> Sed Format String Syntax</a></span></dt> <dt><span class="section"><a href="format/sed_format.html"> Sed Format String Syntax</a></span></dt>
<dt><span class="section"><a href="format/perl_format.html"> Perl Format String Syntax</a></span></dt> <dt><span class="section"><a href="format/perl_format.html"> Perl Format String Syntax</a></span></dt>
@ -33,32 +33,26 @@
Format String Syntax</a></span></dt> Format String Syntax</a></span></dt>
</dl></div> </dl></div>
<p> <p>
Format strings are used by the algorithm <a href="ref/regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a> and by <a href="ref/match_results.html#boost_regex.match_results_format"><tt class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;&gt;::</span><span class="identifier">format</span></tt></a>, and are used to transform Format strings are used by the algorithm <a href="ref/regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a> and by <a href="ref/match_results.html#boost_regex.match_results_format"><code class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;&gt;::</span><span class="identifier">format</span></code></a>, and are used to transform
one string into another. one string into another.
</p> </p>
<p> <p>
There are three kind of format string: <a href="format/sed_format.html" title=" Sed Format String Syntax">Sed</a>, There are three kind of format string: <a href="format/sed_format.html" title="Sed Format String Syntax">Sed</a>,
<a href="format/perl_format.html" title=" Perl Format String Syntax">Perl</a> and <a href="format/boost_format_syntax.html" title=" Boost-Extended <a href="format/perl_format.html" title="Perl Format String Syntax">Perl</a> and <a href="format/boost_format_syntax.html" title="Boost-Extended Format String Syntax">Boost-Extended</a>.
Format String Syntax">Boost-Extended</a>.
</p> </p>
<p> <p>
Alternatively, when the flag <tt class="computeroutput"><span class="identifier">format_literal</span></tt> Alternatively, when the flag <code class="computeroutput"><span class="identifier">format_literal</span></code>
is passed to one of these functions, then the format string is treated as a is passed to one of these functions, then the format string is treated as a
string literal, and is copied unchanged to the output. string literal, and is copied unchanged to the output.
</p> </p>
<p>
</p>
<p>
</p>
<p>
</p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Boost-Extended <title>Boost-Extended Format String Syntax</title>
Format String Syntax</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../format.html" title=" Search and Replace Format String Syntax"> <link rel="up" href="../format.html" title="Search and Replace Format String Syntax">
<link rel="prev" href="perl_format.html" title=" Perl Format String Syntax"> <link rel="prev" href="perl_format.html" title="Perl Format String Syntax">
<link rel="next" href="../ref.html" title=" Reference"> <link rel="next" href="../ref.html" title="Reference">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,25 +24,25 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.format.boost_format_syntax"></a><a href="boost_format_syntax.html" title=" Boost-Extended <a name="boost_regex.format.boost_format_syntax"></a><a href="boost_format_syntax.html" title="Boost-Extended Format String Syntax"> Boost-Extended
Format String Syntax"> Boost-Extended Format String Syntax</a>
Format String Syntax</a></h3></div></div></div> </h3></div></div></div>
<p> <p>
Boost-Extended format strings treat all characters as literals except for Boost-Extended format strings treat all characters as literals except for
'$', '\', '(', ')', '?', and ':'. '$', '\', '(', ')', '?', and ':'.
</p> </p>
<a name="boost_regex.format.boost_format_syntax.grouping"></a><h4> <a name="boost_regex.format.boost_format_syntax.grouping"></a><h5>
<a name="id481845"></a> <a name="id515629"></a>
<a href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.grouping">Grouping</a> <a href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.grouping">Grouping</a>
</h4> </h5>
<p> <p>
The characters '(' and ')' perform lexical grouping, so use \( and \) if The characters '(' and ')' perform lexical grouping, so use \( and \) if
you want a to output literal parenthesis. you want a to output literal parenthesis.
</p> </p>
<a name="boost_regex.format.boost_format_syntax.conditionals"></a><h4> <a name="boost_regex.format.boost_format_syntax.conditionals"></a><h5>
<a name="id481877"></a> <a name="id515659"></a>
<a href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.conditionals">Conditionals</a> <a href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.conditionals">Conditionals</a>
</h4> </h5>
<p> <p>
The character '?' begins a conditional expression, the general form is: The character '?' begins a conditional expression, the general form is:
</p> </p>
@ -66,11 +65,11 @@
match found with "foo" if the sub-expression $1 was matched, and match found with "foo" if the sub-expression $1 was matched, and
with "bar" otherwise. with "bar" otherwise.
</p> </p>
<a name="boost_regex.format.boost_format_syntax.placeholder_sequences"></a><h4> <a name="boost_regex.format.boost_format_syntax.placeholder_sequences"></a><h5>
<a name="id481936"></a> <a name="id515716"></a>
<a href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.placeholder_sequences">Placeholder <a href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.placeholder_sequences">Placeholder
Sequences</a> Sequences</a>
</h4> </h5>
<p> <p>
Placeholder sequences specify that some part of what matched the regular Placeholder sequences specify that some part of what matched the regular
expression should be sent to output as follows: expression should be sent to output as follows:
@ -161,11 +160,11 @@
Any $-placeholder sequence not listed above, results in '$' being treated Any $-placeholder sequence not listed above, results in '$' being treated
as a literal. as a literal.
</p> </p>
<a name="boost_regex.format.boost_format_syntax.escape_sequences"></a><h4> <a name="boost_regex.format.boost_format_syntax.escape_sequences"></a><h5>
<a name="id482109"></a> <a name="id515888"></a>
<a href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.escape_sequences">Escape <a href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.escape_sequences">Escape
Sequences</a> Sequences</a>
</h4> </h5>
<p> <p>
An escape character followed by any character x, outputs that character unless An escape character followed by any character x, outputs that character unless
x is one of the escape sequences shown below. x is one of the escape sequences shown below.
@ -390,10 +389,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Perl Format String Syntax</title> <title>Perl Format String Syntax</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../format.html" title=" Search and Replace Format String Syntax"> <link rel="up" href="../format.html" title="Search and Replace Format String Syntax">
<link rel="prev" href="sed_format.html" title=" Sed Format String Syntax"> <link rel="prev" href="sed_format.html" title="Sed Format String Syntax">
<link rel="next" href="boost_format_syntax.html" title=" Boost-Extended <link rel="next" href="boost_format_syntax.html" title="Boost-Extended Format String Syntax">
Format String Syntax">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.format.perl_format"></a><a href="perl_format.html" title=" Perl Format String Syntax"> Perl Format String Syntax</a></h3></div></div></div> <a name="boost_regex.format.perl_format"></a><a href="perl_format.html" title="Perl Format String Syntax"> Perl Format String Syntax</a>
</h3></div></div></div>
<p> <p>
Perl-style format strings treat all characters as literals except '$' and Perl-style format strings treat all characters as literals except '$' and
'\' which start placeholder and escape sequences respectively. '\' which start placeholder and escape sequences respectively.
@ -344,10 +344,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Sed Format String Syntax</title> <title>Sed Format String Syntax</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../format.html" title=" Search and Replace Format String Syntax"> <link rel="up" href="../format.html" title="Search and Replace Format String Syntax">
<link rel="prev" href="../format.html" title=" Search and Replace Format String Syntax"> <link rel="prev" href="../format.html" title="Search and Replace Format String Syntax">
<link rel="next" href="perl_format.html" title=" Perl Format String Syntax"> <link rel="next" href="perl_format.html" title="Perl Format String Syntax">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.format.sed_format"></a><a href="sed_format.html" title=" Sed Format String Syntax"> Sed Format String Syntax</a></h3></div></div></div> <a name="boost_regex.format.sed_format"></a><a href="sed_format.html" title="Sed Format String Syntax"> Sed Format String Syntax</a>
</h3></div></div></div>
<p> <p>
Sed-style format strings treat all characters as literals except: Sed-style format strings treat all characters as literals except:
</p> </p>
@ -234,10 +235,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Building and Installing the Library</title> <title>Building and Installing the Library</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../index.html" title="Boost.Regex"> <link rel="start" href="../index.html" title="Boost.Regex">
<link rel="up" href="../index.html" title="Boost.Regex"> <link rel="up" href="../index.html" title="Boost.Regex">
<link rel="prev" href="configuration/tuning.html" title=" Algorithm Tuning"> <link rel="prev" href="configuration/tuning.html" title="Algorithm Tuning">
<link rel="next" href="introduction_and_overview.html" title="Introduction and <link rel="next" href="introduction_and_overview.html" title="Introduction and Overview">
Overview">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_regex.install"></a><a href="install.html" title=" Building and Installing the Library"> Building and Installing the Library</a></h2></div></div></div> <a name="boost_regex.install"></a><a href="install.html" title="Building and Installing the Library"> Building and Installing the Library</a>
</h2></div></div></div>
<p> <p>
When you extract the library from its zip file, you must preserve its internal When you extract the library from its zip file, you must preserve its internal
directory structure (for example by using the -d option when extracting). If directory structure (for example by using the -d option when extracting). If
@ -48,20 +48,20 @@
it is necessary to build the library's support code into a library or archive it is necessary to build the library's support code into a library or archive
file before you can use it, instructions for specific platforms are as follows: file before you can use it, instructions for specific platforms are as follows:
</p> </p>
<a name="boost_regex.install.building_with_bjam"></a><h4> <a name="boost_regex.install.building_with_bjam"></a><h5>
<a name="id386451"></a> <a name="id436188"></a>
<a href="install.html#boost_regex.install.building_with_bjam">Building with bjam</a> <a href="install.html#boost_regex.install.building_with_bjam">Building with bjam</a>
</h4> </h5>
<p> <p>
This is now the preferred method for building and installing this library, This is now the preferred method for building and installing this library,
please refer to the <a href="../../../../../more/getting_started.html" target="_top">getting please refer to the <a href="../../../../../more/getting_started.html" target="_top">getting
started guide</a> for more information. started guide</a> for more information.
</p> </p>
<a name="boost_regex.install.building_with_unicode_and_icu_support"></a><h4> <a name="boost_regex.install.building_with_unicode_and_icu_support"></a><h5>
<a name="id386488"></a> <a name="id436222"></a>
<a href="install.html#boost_regex.install.building_with_unicode_and_icu_support">Building <a href="install.html#boost_regex.install.building_with_unicode_and_icu_support">Building
With Unicode and ICU Support</a> With Unicode and ICU Support</a>
</h4> </h5>
<p> <p>
A default build of this library does not enable Unciode support via ICU. There A default build of this library does not enable Unciode support via ICU. There
is no need to enable this support if you don't need it, but if you use ICU is no need to enable this support if you don't need it, but if you use ICU
@ -75,16 +75,16 @@
</p> </p>
<p> <p>
If you're building on a Unix-like platform, and ICU is already installed in If you're building on a Unix-like platform, and ICU is already installed in
your compilers search path (with an install prefix of <tt class="computeroutput"><span class="special">/</span><span class="identifier">usr</span></tt> or <tt class="computeroutput"><span class="special">/</span><span class="identifier">usr</span><span class="special">/</span><span class="identifier">local</span></tt> your compilers search path (with an install prefix of <code class="computeroutput"><span class="special">/</span><span class="identifier">usr</span></code> or <code class="computeroutput"><span class="special">/</span><span class="identifier">usr</span><span class="special">/</span><span class="identifier">local</span></code>
for example), then set the environment variable <tt class="computeroutput"><span class="identifier">HAVE_ICU</span></tt> for example), then set the environment variable <code class="computeroutput"><span class="identifier">HAVE_ICU</span></code>
to enable ICU support. For example you might build with the command line: to enable ICU support. For example you might build with the command line:
</p> </p>
<pre class="programlisting">bjam -sHAVE_ICU=1 --toolset=toolset-name install</pre> <pre class="programlisting">bjam -sHAVE_ICU=1 --toolset=toolset-name install</pre>
<p> <p>
If ICU is not already in your compiler's path then you need to set the environment If ICU is not already in your compiler's path then you need to set the environment
variable <tt class="computeroutput"><span class="identifier">ICU_PATH</span></tt> to point variable <code class="computeroutput"><span class="identifier">ICU_PATH</span></code> to point
to the root directory of your ICU installation, for example if ICU was installed to the root directory of your ICU installation, for example if ICU was installed
to <tt class="computeroutput"><span class="special">/</span><span class="identifier">usr</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">icu</span><span class="special">/</span><span class="number">3.3</span></tt> to <code class="computeroutput"><span class="special">/</span><span class="identifier">usr</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">icu</span><span class="special">/</span><span class="number">3.3</span></code>
you might use: you might use:
</p> </p>
<pre class="programlisting">bjam -sICU_PATH=/usr/local/icu/3.3 --toolset=toolset-name install</pre> <pre class="programlisting">bjam -sICU_PATH=/usr/local/icu/3.3 --toolset=toolset-name install</pre>
@ -95,17 +95,17 @@
ensure that this is the case: it is up to you to ensure that the version of ensure that this is the case: it is up to you to ensure that the version of
ICU you are using is binary compatible with the toolset you use to build Boost. ICU you are using is binary compatible with the toolset you use to build Boost.
</p> </p>
<a name="boost_regex.install.building_via_makefiles"></a><h4> <a name="boost_regex.install.building_via_makefiles"></a><h5>
<a name="id385474"></a> <a name="id435695"></a>
<a href="install.html#boost_regex.install.building_via_makefiles">Building via makefiles</a> <a href="install.html#boost_regex.install.building_via_makefiles">Building via makefiles</a>
</h4>
<a name="boost_regex.install.borland_c___builder_"></a><h5>
<a name="id385498"></a>
<a href="install.html#boost_regex.install.borland_c___builder_">Borland C++ Builder:</a>
</h5> </h5>
<a name="boost_regex.install.borland_c___builder_"></a><h6>
<a name="id435718"></a>
<a href="install.html#boost_regex.install.borland_c___builder_">Borland C++ Builder:</a>
</h6>
<div class="itemizedlist"><ul type="disc"> <div class="itemizedlist"><ul type="disc">
<li> <li>
Open up a console window and change to the <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;\</span><span class="identifier">libs</span><span class="special">\</span><span class="identifier">regex</span><span class="special">\</span><span class="identifier">build</span></tt> Open up a console window and change to the <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;\</span><span class="identifier">libs</span><span class="special">\</span><span class="identifier">regex</span><span class="special">\</span><span class="identifier">build</span></code>
directory. directory.
</li> </li>
<li> <li>
@ -127,7 +127,7 @@
</p> </p>
<pre class="programlisting">make -fbcb5.mak install</pre> <pre class="programlisting">make -fbcb5.mak install</pre>
<p> <p>
library files will be copied to <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">BCROOT</span><span class="special">&gt;/</span><span class="identifier">lib</span></tt> and the dll's to <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">BCROOT</span><span class="special">&gt;/</span><span class="identifier">bin</span></tt>, where <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">BCROOT</span><span class="special">&gt;</span></tt> library files will be copied to <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">BCROOT</span><span class="special">&gt;/</span><span class="identifier">lib</span></code> and the dll's to <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">BCROOT</span><span class="special">&gt;/</span><span class="identifier">bin</span></code>, where <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">BCROOT</span><span class="special">&gt;</span></code>
corresponds to the install path of your Borland C++ tools. corresponds to the install path of your Borland C++ tools.
</p> </p>
<p> <p>
@ -136,7 +136,7 @@
</p> </p>
<pre class="programlisting">make -fbcb5.mak clean</pre> <pre class="programlisting">make -fbcb5.mak clean</pre>
<p> <p>
Finally when you use Boost.Regex it is only necessary for you to add the <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;</span></tt> root director to your list of include directories Finally when you use Boost.Regex it is only necessary for you to add the <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;</span></code> root director to your list of include directories
for that project. It is not necessary for you to manually add a .lib file to for that project. It is not necessary for you to manually add a .lib file to
the project; the headers will automatically select the correct .lib file for the project; the headers will automatically select the correct .lib file for
your build mode and tell the linker to include it. There is one caveat however: your build mode and tell the linker to include it. There is one caveat however:
@ -159,17 +159,17 @@
build of the lib) then define BOOST_REGEX_NO_LIB. build of the lib) then define BOOST_REGEX_NO_LIB.
</p> </p>
<p> <p>
If you are building with C++ Builder 6, you will find that <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt> If you are building with C++ Builder 6, you will find that <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
can not be used in a pre-compiled header (the actual problem is in <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">locale</span><span class="special">&gt;</span></tt> which gets included by <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt>), can not be used in a pre-compiled header (the actual problem is in <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">locale</span><span class="special">&gt;</span></code> which gets included by <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>),
if this causes problems for you, then try defining BOOST_NO_STD_LOCALE when if this causes problems for you, then try defining BOOST_NO_STD_LOCALE when
building, this will disable some features throughout boost, but may save you building, this will disable some features throughout boost, but may save you
a lot in compile times! a lot in compile times!
</p> </p>
<a name="boost_regex.install.microsoft_visual_c___6__7__7_1_and_8"></a><h4> <a name="boost_regex.install.microsoft_visual_c___6__7__7_1_and_8"></a><h5>
<a name="id456273"></a> <a name="id490291"></a>
<a href="install.html#boost_regex.install.microsoft_visual_c___6__7__7_1_and_8">Microsoft <a href="install.html#boost_regex.install.microsoft_visual_c___6__7__7_1_and_8">Microsoft
Visual C++ 6, 7, 7.1 and 8</a> Visual C++ 6, 7, 7.1 and 8</a>
</h4> </h5>
<p> <p>
You need version 6 or later of MSVC to build this library. If you are using You need version 6 or later of MSVC to build this library. If you are using
VC5 then you may want to look at one of the previous releases of this library. VC5 then you may want to look at one of the previous releases of this library.
@ -177,7 +177,7 @@
<p> <p>
Open up a command prompt, which has the necessary MSVC environment variables Open up a command prompt, which has the necessary MSVC environment variables
defined (for example by using the batch file Vcvars32.bat installed by the defined (for example by using the batch file Vcvars32.bat installed by the
Visual Studio installation), and change to the <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;\</span><span class="identifier">libs</span><span class="special">\</span><span class="identifier">regex</span><span class="special">\</span><span class="identifier">build</span> <span class="identifier">directory</span></tt>. Visual Studio installation), and change to the <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;\</span><span class="identifier">libs</span><span class="special">\</span><span class="identifier">regex</span><span class="special">\</span><span class="identifier">build</span> <span class="identifier">directory</span></code>.
</p> </p>
<p> <p>
Select the correct makefile - vc6.mak for "vanilla" Visual C++ 6 Select the correct makefile - vc6.mak for "vanilla" Visual C++ 6
@ -193,7 +193,7 @@
</p> </p>
<pre class="programlisting">nmake -fvc6.mak install</pre> <pre class="programlisting">nmake -fvc6.mak install</pre>
<p> <p>
The lib files will be copied to your <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">VC6</span><span class="special">&gt;\</span><span class="identifier">lib</span></tt> directory and the dll files to <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">VC6</span><span class="special">&gt;\</span><span class="identifier">bin</span></tt>, where <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">VC6</span><span class="special">&gt;</span></tt> is The lib files will be copied to your <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">VC6</span><span class="special">&gt;\</span><span class="identifier">lib</span></code> directory and the dll files to <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">VC6</span><span class="special">&gt;\</span><span class="identifier">bin</span></code>, where <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">VC6</span><span class="special">&gt;</span></code> is
the root of your Visual C++ 6 installation. the root of your Visual C++ 6 installation.
</p> </p>
<p> <p>
@ -207,7 +207,7 @@
</p> </p>
<pre class="programlisting">nmake ICU_PATH=c:\open-source\icu -fvc71.mak install</pre> <pre class="programlisting">nmake ICU_PATH=c:\open-source\icu -fvc71.mak install</pre>
<p> <p>
Finally when you use Boost.Regex it is only necessary for you to add the <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;</span></tt> root directory to your list of include Finally when you use Boost.Regex it is only necessary for you to add the <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;</span></code> root directory to your list of include
directories for that project. It is not necessary for you to manually add a directories for that project. It is not necessary for you to manually add a
.lib file to the project; the headers will automatically select the correct .lib file to the project; the headers will automatically select the correct
.lib file for your build mode and tell the linker to include it. .lib file for your build mode and tell the linker to include it.
@ -252,12 +252,12 @@
to modify the makefile to add /Zc:wchar_t before building the library. to modify the makefile to add /Zc:wchar_t before building the library.
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.install.gcc_2_95_and_later_"></a><h5> <a name="boost_regex.install.gcc_2_95_and_later_"></a><h6>
<a name="id456584"></a> <a name="id490603"></a>
<a href="install.html#boost_regex.install.gcc_2_95_and_later_">GCC(2.95 and later)</a> <a href="install.html#boost_regex.install.gcc_2_95_and_later_">GCC(2.95 and later)</a>
</h5> </h6>
<p> <p>
You can build with gcc using the normal boost Jamfile in <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></tt>, alternatively You can build with gcc using the normal boost Jamfile in <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></code>, alternatively
there is a conservative makefile for the g++ compiler. From the command prompt there is a conservative makefile for the g++ compiler. From the command prompt
change to the &lt;boost&gt;/libs/regex/build directory and type: change to the &lt;boost&gt;/libs/regex/build directory and type:
</p> </p>
@ -298,16 +298,16 @@
LIBS: additional library files. LIBS: additional library files.
</p> </p>
<p> <p>
For the more adventurous there is a configure script in <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">config</span></tt>; For the more adventurous there is a configure script in <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">config</span></code>;
see the <a href="../../../../config/index.html" target="_top">config library documentation</a>. see the <a href="../../../../config/index.html" target="_top">config library documentation</a>.
</p> </p>
<a name="boost_regex.install.sun_workshop_6_1"></a><h5> <a name="boost_regex.install.sun_workshop_6_1"></a><h6>
<a name="id456781"></a> <a name="id490804"></a>
<a href="install.html#boost_regex.install.sun_workshop_6_1">Sun Workshop 6.1</a> <a href="install.html#boost_regex.install.sun_workshop_6_1">Sun Workshop 6.1</a>
</h5> </h6>
<p> <p>
There is a makefile for the sun (6.1) compiler (C++ version 3.12). From the There is a makefile for the sun (6.1) compiler (C++ version 3.12). From the
command prompt change to the <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></tt> directory command prompt change to the <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></code> directory
and type: and type:
</p> </p>
<pre class="programlisting">dmake -f sunpro.mak </pre> <pre class="programlisting">dmake -f sunpro.mak </pre>
@ -316,7 +316,7 @@
single and multithread versions of the library (libboost_regex.a, libboost_regex.so, single and multithread versions of the library (libboost_regex.a, libboost_regex.so,
libboost_regex_mt.a and libboost_regex_mt.so). When you build projects that libboost_regex_mt.a and libboost_regex_mt.so). When you build projects that
use Boost.Regex, you will need to add the boost install directory to your list use Boost.Regex, you will need to add the boost install directory to your list
of include paths and add <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span><span class="special">/</span><span class="identifier">sunpro</span><span class="special">/</span></tt> to of include paths and add <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span><span class="special">/</span><span class="identifier">sunpro</span><span class="special">/</span></code> to
your library search path. your library search path.
</p> </p>
<p> <p>
@ -342,26 +342,27 @@
This makefile does not set any architecture specific options like -xarch=v9, This makefile does not set any architecture specific options like -xarch=v9,
you can set these by defining the appropriate macros, for example: you can set these by defining the appropriate macros, for example:
</p> </p>
<pre class="programlisting">dmake CXXFLAGS="-xarch<tt class="literal">v9" LDFLAGS</tt>"-xarch<tt class="literal">v9" LIBSUFFIX</tt>"_v9" -f sunpro.mak</pre> <pre class="programlisting">dmake CXXFLAGS="-xarch<code class="literal">v9" LDFLAGS</code>"-xarch<code class="literal">v9" LIBSUFFIX</code>"_v9" -f sunpro.mak</pre>
<p> <p>
will build v9 variants of the regex library named libboost_regex_v9.a etc. will build v9 variants of the regex library named libboost_regex_v9.a etc.
</p> </p>
<a name="boost_regex.install.makefiles_for_other_compilers"></a><h5> <a name="boost_regex.install.makefiles_for_other_compilers"></a><h6>
<a name="id457001"></a> <a name="id491026"></a>
<a href="install.html#boost_regex.install.makefiles_for_other_compilers">Makefiles <a href="install.html#boost_regex.install.makefiles_for_other_compilers">Makefiles
for Other compilers</a> for Other compilers</a>
</h5> </h6>
<p> <p>
There is a generic makefile (generic.mak ) provided in <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">-</span><span class="identifier">root</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></tt> - see that makefile for details of There is a generic makefile (generic.mak ) provided in <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">-</span><span class="identifier">root</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></code> - see that makefile for details of
environment variables that need to be set before use. environment variables that need to be set before use.
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Introduction and <title>Introduction and Overview</title>
Overview</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../index.html" title="Boost.Regex"> <link rel="start" href="../index.html" title="Boost.Regex">
<link rel="up" href="../index.html" title="Boost.Regex"> <link rel="up" href="../index.html" title="Boost.Regex">
<link rel="prev" href="install.html" title=" Building and Installing the Library"> <link rel="prev" href="install.html" title="Building and Installing the Library">
<link rel="next" href="unicode.html" title=" Unicode and Boost.Regex"> <link rel="next" href="unicode.html" title="Unicode and Boost.Regex">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_regex.introduction_and_overview"></a><a href="introduction_and_overview.html" title="Introduction and <a name="boost_regex.introduction_and_overview"></a><a href="introduction_and_overview.html" title="Introduction and Overview">Introduction and
Overview">Introduction and Overview</a>
Overview</a></h2></div></div></div> </h2></div></div></div>
<p> <p>
Regular expressions are a form of pattern-matching that are often used in text Regular expressions are a form of pattern-matching that are often used in text
processing; many users will be familiar with the Unix utilities grep, sed and processing; many users will be familiar with the Unix utilities grep, sed and
@ -40,16 +39,15 @@
libraries can not do. libraries can not do.
</p> </p>
<p> <p>
The class <a href="ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> The class <a href="ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>
is the key class in this library; it represents a "machine readable" is the key class in this library; it represents a "machine readable"
regular expression, and is very closely modeled on <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></tt>, regular expression, and is very closely modeled on <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>,
think of it as a string plus the actual state-machine required by the regular think of it as a string plus the actual state-machine required by the regular
expression algorithms. Like <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></tt> expression algorithms. Like <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>
there are two typedefs that are almost always the means by which this class there are two typedefs that are almost always the means by which this class
is referenced: is referenced:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span>
<span class="keyword">class</span> <span class="identifier">traits</span> <span class="special">=</span> <span class="identifier">regex_traits</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">traits</span> <span class="special">=</span> <span class="identifier">regex_traits</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="special">&gt;</span>
@ -87,8 +85,7 @@
Now let's take that expression and place it in some C++ code to validate the Now let's take that expression and place it in some C++ code to validate the
format of a credit card number: format of a credit card number:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">validate_card_format</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">)</span>
<span class="keyword">bool</span> <span class="identifier">validate_card_format</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">)</span>
<span class="special">{</span> <span class="special">{</span>
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"(\\d{4}[- ]){3}\\d{4}"</span><span class="special">);</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"(\\d{4}[- ]){3}\\d{4}"</span><span class="special">);</span>
<span class="keyword">return</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="identifier">e</span><span class="special">);</span> <span class="keyword">return</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="identifier">e</span><span class="special">);</span>
@ -100,7 +97,7 @@
regular expression engine, consequently escapes in regular expressions have regular expression engine, consequently escapes in regular expressions have
to be doubled up when embedding them in C/C++ code. Also note that all the to be doubled up when embedding them in C/C++ code. Also note that all the
examples assume that your compiler supports argument-dependent-lookup lookup, examples assume that your compiler supports argument-dependent-lookup lookup,
if yours doesn't (for example VC6), then you will have to add some <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span></tt> prefixes if yours doesn't (for example VC6), then you will have to add some <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span></code> prefixes
to some of the function calls in the examples. to some of the function calls in the examples.
</p> </p>
<p> <p>
@ -113,11 +110,10 @@
the utilities sed and Perl will already be ahead here; we need two strings the utilities sed and Perl will already be ahead here; we need two strings
- one a regular expression - the other a "format string" that provides - one a regular expression - the other a "format string" that provides
a description of the text to replace the match with. In Boost.Regex this search a description of the text to replace the match with. In Boost.Regex this search
and replace operation is performed with the algorithm <a href="ref/regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a>, for our credit card and replace operation is performed with the algorithm <a href="ref/regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a>, for our credit card
example we can write two algorithms like this to provide the format conversions: example we can write two algorithms like this to provide the format conversions:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="comment">// match any format with the regular expression:
<span class="comment">// match any format with the regular expression:
</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z"</span><span class="special">);</span> </span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z"</span><span class="special">);</span>
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">machine_format</span><span class="special">(</span><span class="string">"\\1\\2\\3\\4"</span><span class="special">);</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">machine_format</span><span class="special">(</span><span class="string">"\\1\\2\\3\\4"</span><span class="special">);</span>
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">human_format</span><span class="special">(</span><span class="string">"\\1-\\2-\\3-\\4"</span><span class="special">);</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">human_format</span><span class="special">(</span><span class="string">"\\1-\\2-\\3-\\4"</span><span class="special">);</span>
@ -142,11 +138,10 @@
expression match, however in general the result of a match contains a number expression match, however in general the result of a match contains a number
of sub-expression matches in addition to the overall match. When the library of sub-expression matches in addition to the overall match. When the library
needs to report a regular expression match it does so using an instance of needs to report a regular expression match it does so using an instance of
the class <a href="ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a>, the class <a href="ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>,
as before there are typedefs of this class for the most common cases: as before there are typedefs of this class for the most common cases:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
<span class="keyword">typedef</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*&gt;</span> <span class="identifier">cmatch</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*&gt;</span> <span class="identifier">cmatch</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*&gt;</span> <span class="identifier">wcmatch</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*&gt;</span> <span class="identifier">wcmatch</span><span class="special">;</span>
@ -156,12 +151,12 @@
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<p> <p>
The algorithms <a href="ref/regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> The algorithms <a href="ref/regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>
and <a href="ref/regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a> and <a href="ref/regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>
make use of <a href="ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> make use of <a href="ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>
to report what matched; the difference between these algorithms is that <a href="ref/regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a> to report what matched; the difference between these algorithms is that <a href="ref/regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>
will only find matches that consume <span class="emphasis"><em>all</em></span> of the input text, will only find matches that consume <span class="emphasis"><em>all</em></span> of the input text,
where as <a href="ref/regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> where as <a href="ref/regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>
will search for a match anywhere within the text being matched. will search for a match anywhere within the text being matched.
</p> </p>
<p> <p>
@ -170,22 +165,21 @@
of seamlessly searching almost any kind of data. of seamlessly searching almost any kind of data.
</p> </p>
<p> <p>
For search and replace operations, in addition to the algorithm <a href="ref/regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a> that we have already For search and replace operations, in addition to the algorithm <a href="ref/regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a> that we have already
seen, the <a href="ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> seen, the <a href="ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>
class has a <tt class="computeroutput"><span class="identifier">format</span></tt> member that class has a <code class="computeroutput"><span class="identifier">format</span></code> member that
takes the result of a match and a format string, and produces a new string takes the result of a match and a format string, and produces a new string
by merging the two. by merging the two.
</p> </p>
<p> <p>
For iterating through all occurences of an expression within a text, there For iterating through all occurences of an expression within a text, there
are two iterator types: <a href="ref/regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> will enumerate over are two iterator types: <a href="ref/regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> will enumerate over
the <a href="ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> the <a href="ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>
objects found, while <a href="ref/regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> will enumerate objects found, while <a href="ref/regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> will enumerate
a series of strings (similar to perl style split operations). a series of strings (similar to perl style split operations).
</p> </p>
<p> <p>
For those that dislike templates, there is a high level wrapper class <a href="ref/deprecated_interfaces/old_regex.html" title=" High For those that dislike templates, there is a high level wrapper class <a href="ref/deprecated_interfaces/old_regex.html" title="High Level Class RegEx (Deprecated)"><code class="computeroutput"><span class="identifier">RegEx</span></code></a>
Level Class RegEx (Deprecated)"><tt class="computeroutput"><span class="identifier">RegEx</span></tt></a>
that is an encapsulation of the lower level template code - it provides a simplified that is an encapsulation of the lower level template code - it provides a simplified
interface for those that don't need the full power of the library, and supports interface for those that don't need the full power of the library, and supports
only narrow characters, and the "extended" regular expression syntax. only narrow characters, and the "extended" regular expression syntax.
@ -193,12 +187,12 @@
C++ standard library proposal. C++ standard library proposal.
</p> </p>
<p> <p>
The POSIX API functions: <a href="ref/posix.html#boost_regex.ref.posix.regcomp"><tt class="computeroutput"><span class="identifier">regcomp</span></tt></a>, <a href="ref/posix.html#boost_regex.ref.posix.regexec"><tt class="computeroutput"><span class="identifier">regexec</span></tt></a>, <a href="ref/posix.html#boost_regex.ref.posix.regfree"><tt class="computeroutput"><span class="identifier">regfree</span></tt></a> and [regerr], are available The POSIX API functions: <a href="ref/posix.html#boost_regex.ref.posix.regcomp"><code class="computeroutput"><span class="identifier">regcomp</span></code></a>, <a href="ref/posix.html#boost_regex.ref.posix.regexec"><code class="computeroutput"><span class="identifier">regexec</span></code></a>, <a href="ref/posix.html#boost_regex.ref.posix.regfree"><code class="computeroutput"><span class="identifier">regfree</span></code></a> and [regerr], are available
in both narrow character and Unicode versions, and are provided for those who in both narrow character and Unicode versions, and are provided for those who
need compatibility with these API's. need compatibility with these API's.
</p> </p>
<p> <p>
Finally, note that the library now has <a href="background_information/locale.html" title=" Localization">run-time Finally, note that the library now has <a href="background_information/locale.html" title="Localization">run-time
localization support</a>, and recognizes the full POSIX regular expression localization support</a>, and recognizes the full POSIX regular expression
syntax - including advanced features like multi-character collating elements syntax - including advanced features like multi-character collating elements
and equivalence classes - as well as providing compatibility with other regular and equivalence classes - as well as providing compatibility with other regular
@ -207,10 +201,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Partial Matches</title> <title>Partial Matches</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../index.html" title="Boost.Regex"> <link rel="start" href="../index.html" title="Boost.Regex">
<link rel="up" href="../index.html" title="Boost.Regex"> <link rel="up" href="../index.html" title="Boost.Regex">
<link rel="prev" href="captures.html" title=" Understanding Marked Sub-Expressions <link rel="prev" href="captures.html" title="Understanding Marked Sub-Expressions and Captures">
and Captures"> <link rel="next" href="syntax.html" title="Regular Expression Syntax">
<link rel="next" href="syntax.html" title=" Regular Expression Syntax">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,13 +24,13 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_regex.partial_matches"></a><a href="partial_matches.html" title=" Partial Matches"> Partial Matches</a></h2></div></div></div> <a name="boost_regex.partial_matches"></a><a href="partial_matches.html" title="Partial Matches"> Partial Matches</a>
</h2></div></div></div>
<p> <p>
The <a href="ref/match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> The <a href="ref/match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>
<tt class="computeroutput"><span class="identifier">match_partial</span></tt> can be passed <code class="computeroutput"><span class="identifier">match_partial</span></code> can be passed
to the following algorithms: <a href="ref/regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>, <a href="ref/regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>, and <a href="ref/deprecated_interfaces/regex_grep.html" title=" to the following algorithms: <a href="ref/regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>, <a href="ref/regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>, and <a href="ref/deprecated_interfaces/regex_grep.html" title="regex_grep (Deprecated)"><code class="computeroutput"><span class="identifier">regex_grep</span></code></a>, and used with the iterator
regex_grep (Deprecated)"><tt class="computeroutput"><span class="identifier">regex_grep</span></tt></a>, and used with the iterator <a href="ref/regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>.
<a href="ref/regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a>.
When used it indicates that partial as well as full matches should be found. When used it indicates that partial as well as full matches should be found.
A partial match is one that matched one or more characters at the end of the A partial match is one that matched one or more characters at the end of the
text input, but did not match all of the regular expression (although it may text input, but did not match all of the regular expression (although it may
@ -41,10 +40,9 @@
into memory (or even into a memory mapped file), or are of indeterminate length into memory (or even into a memory mapped file), or are of indeterminate length
(for example the source may be a socket or similar). Partial and full matches (for example the source may be a socket or similar). Partial and full matches
can be differentiated as shown in the following table (the variable M represents can be differentiated as shown in the following table (the variable M represents
an instance of <a href="ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> as filled in by <a href="ref/regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>, an instance of <a href="ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> as filled in by <a href="ref/regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>,
<a href="ref/regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> <a href="ref/regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>
or <a href="ref/deprecated_interfaces/regex_grep.html" title=" or <a href="ref/deprecated_interfaces/regex_grep.html" title="regex_grep (Deprecated)"><code class="computeroutput"><span class="identifier">regex_grep</span></code></a>):
regex_grep (Deprecated)"><tt class="computeroutput"><span class="identifier">regex_grep</span></tt></a>):
</p> </p>
<div class="informaltable"><table class="table"> <div class="informaltable"><table class="table">
<colgroup> <colgroup>
@ -186,7 +184,7 @@
<p> <p>
The following example tests to see whether the text could be a valid credit The following example tests to see whether the text could be a valid credit
card number, as the user presses a key, the character entered would be added card number, as the user presses a key, the character entered would be added
to the string being built up, and passed to <tt class="computeroutput"><span class="identifier">is_possible_card_number</span></tt>. to the string being built up, and passed to <code class="computeroutput"><span class="identifier">is_possible_card_number</span></code>.
If this returns true then the text could be a valid card number, so the user If this returns true then the text could be a valid card number, so the user
interface's OK button would be enabled. If it returns false, then this is not interface's OK button would be enabled. If it returns false, then this is not
yet a valid card number, but could be with more input, so the user interface yet a valid card number, but could be with more input, so the user interface
@ -194,8 +192,7 @@
the input could never become a valid number, and the inputted character must the input could never become a valid number, and the inputted character must
be discarded, and a suitable error indication displayed to the user. be discarded, and a suitable error indication displayed to the user.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@ -230,8 +227,7 @@
if a partial match was encountered, then the partial match gets searched a if a partial match was encountered, then the partial match gets searched a
second time as the start of the next batch of text: second time as the start of the next batch of text:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">fstream</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">fstream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">sstream</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">sstream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
@ -297,10 +293,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Reference</title> <title>Reference</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../index.html" title="Boost.Regex"> <link rel="start" href="../index.html" title="Boost.Regex">
<link rel="up" href="../index.html" title="Boost.Regex"> <link rel="up" href="../index.html" title="Boost.Regex">
<link rel="prev" href="format/boost_format_syntax.html" title=" Boost-Extended <link rel="prev" href="format/boost_format_syntax.html" title="Boost-Extended Format String Syntax">
Format String Syntax"> <link rel="next" href="ref/basic_regex.html" title="basic_regex">
<link rel="next" href="ref/basic_regex.html" title=" basic_regex">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_regex.ref"></a><a href="ref.html" title=" Reference"> Reference</a></h2></div></div></div> <a name="boost_regex.ref"></a><a href="ref.html" title="Reference"> Reference</a>
</h2></div></div></div>
<div class="toc"><dl> <div class="toc"><dl>
<dt><span class="section"><a href="ref/basic_regex.html"> basic_regex</a></span></dt> <dt><span class="section"><a href="ref/basic_regex.html"> basic_regex</a></span></dt>
<dt><span class="section"><a href="ref/match_results.html"> match_results</a></span></dt> <dt><span class="section"><a href="ref/match_results.html"> match_results</a></span></dt>
@ -91,7 +91,7 @@
<dt><span class="section"><a href="ref/concepts/traits_concept.html"> Traits Class <dt><span class="section"><a href="ref/concepts/traits_concept.html"> Traits Class
Requirements</a></span></dt> Requirements</a></span></dt>
<dt><span class="section"><a href="ref/concepts/iterator_concepts.html"> Iterator <dt><span class="section"><a href="ref/concepts/iterator_concepts.html"> Iterator
Rrequirements</a></span></dt> Requirements</a></span></dt>
</dl></dd> </dl></dd>
<dt><span class="section"><a href="ref/deprecated_interfaces.html">Deprecated Interfaces</a></span></dt> <dt><span class="section"><a href="ref/deprecated_interfaces.html">Deprecated Interfaces</a></span></dt>
<dd><dl> <dd><dl>
@ -105,35 +105,14 @@
Level Class RegEx (Deprecated)</a></span></dt> Level Class RegEx (Deprecated)</a></span></dt>
</dl></dd> </dl></dd>
</dl></div> </dl></div>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> bad_expression</title> <title>bad_expression</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="regex_token_iterator.html" title=" regex_token_iterator"> <link rel="prev" href="regex_token_iterator.html" title="regex_token_iterator">
<link rel="next" href="syntax_option_type.html" title=" syntax_option_type"> <link rel="next" href="syntax_option_type.html" title="syntax_option_type">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,21 +24,20 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.bad_expression"></a><a href="bad_expression.html" title=" bad_expression"> bad_expression</a></h3></div></div></div> <a name="boost_regex.ref.bad_expression"></a><a href="bad_expression.html" title="bad_expression"> bad_expression</a>
<a name="boost_regex.ref.bad_expression.synopsis"></a><h4> </h3></div></div></div>
<a name="id563003"></a> <a name="boost_regex.ref.bad_expression.synopsis"></a><h5>
<a name="id596313"></a>
<a href="bad_expression.html#boost_regex.ref.bad_expression.synopsis">Synopsis</a> <a href="bad_expression.html#boost_regex.ref.bad_expression.synopsis">Synopsis</a>
</h4> </h5>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">pattern_except</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">pattern_except</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre> </pre>
<p> <p>
The class <tt class="computeroutput"><span class="identifier">regex_error</span></tt> defines The class <code class="computeroutput"><span class="identifier">regex_error</span></code> defines
the type of objects thrown as exceptions to report errors during the conversion the type of objects thrown as exceptions to report errors during the conversion
from a string representing a regular expression to a finite state machine. from a string representing a regular expression to a finite state machine.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
<span class="keyword">class</span> <span class="identifier">regex_error</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span> <span class="keyword">class</span> <span class="identifier">regex_error</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span>
<span class="special">{</span> <span class="special">{</span>
@ -54,49 +53,47 @@
</span> </span>
<span class="special">}</span> <span class="comment">// namespace boost <span class="special">}</span> <span class="comment">// namespace boost
</span></pre> </span></pre>
<a name="boost_regex.ref.bad_expression.description"></a><h4> <a name="boost_regex.ref.bad_expression.description"></a><h5>
<a name="id563510"></a> <a name="id596816"></a>
<a href="bad_expression.html#boost_regex.ref.bad_expression.description">Description</a> <a href="bad_expression.html#boost_regex.ref.bad_expression.description">Description</a>
</h4> </h5>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_error</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <span class="identifier">err</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <span class="identifier">pos</span><span class="special">);</span>
<span class="identifier">regex_error</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <span class="identifier">err</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <span class="identifier">pos</span><span class="special">);</span>
<span class="identifier">regex_error</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <span class="identifier">err</span><span class="special">);</span> <span class="identifier">regex_error</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <span class="identifier">err</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects:</b></span> Constructs an object of class regex_error. <span class="bold"><strong>Effects:</strong></span> Constructs an object of class regex_error.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <span class="identifier">code</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <span class="identifier">code</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects:</b></span> returns the error code that represents <span class="bold"><strong>Effects:</strong></span> returns the error code that represents
parsing error that occurred. parsing error that occurred.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <span class="identifier">position</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <span class="identifier">position</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects:</b></span> returns the location in the expression <span class="bold"><strong>Effects:</strong></span> returns the location in the expression
where parsing stopped. where parsing stopped.
</p> </p>
<p> <p>
Footnotes: the choice of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> Footnotes: the choice of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
as the base class for <tt class="computeroutput"><span class="identifier">regex_error</span></tt> as the base class for <code class="computeroutput"><span class="identifier">regex_error</span></code>
is moot; depending upon how the library is used exceptions may be either is moot; depending upon how the library is used exceptions may be either
logic errors (programmer supplied expressions) or run time errors (user supplied logic errors (programmer supplied expressions) or run time errors (user supplied
expressions). The library previously used <tt class="computeroutput"><span class="identifier">bad_pattern</span></tt> expressions). The library previously used <code class="computeroutput"><span class="identifier">bad_pattern</span></code>
and <tt class="computeroutput"><span class="identifier">bad_expression</span></tt> for errors, and <code class="computeroutput"><span class="identifier">bad_expression</span></code> for errors,
these have been replaced by the single class <tt class="computeroutput"><span class="identifier">regex_error</span></tt> these have been replaced by the single class <code class="computeroutput"><span class="identifier">regex_error</span></code>
to keep the library in synchronization with the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">Technical to keep the library in synchronization with the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">Technical
Report on C++ Library Extensions</a>. Report on C++ Library Extensions</a>.
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Concepts</title> <title>Concepts</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="posix.html" title=" POSIX Compatible C API's"> <link rel="prev" href="posix.html" title="POSIX Compatible C API's">
<link rel="next" href="concepts/charT_concept.html" title=" charT Requirements"> <link rel="next" href="concepts/charT_concept.html" title="charT Requirements">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,21 +24,23 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.concepts"></a><a href="concepts.html" title=" Concepts"> Concepts</a></h3></div></div></div> <a name="boost_regex.ref.concepts"></a><a href="concepts.html" title="Concepts"> Concepts</a>
</h3></div></div></div>
<div class="toc"><dl> <div class="toc"><dl>
<dt><span class="section"><a href="concepts/charT_concept.html"> charT Requirements</a></span></dt> <dt><span class="section"><a href="concepts/charT_concept.html"> charT Requirements</a></span></dt>
<dt><span class="section"><a href="concepts/traits_concept.html"> Traits Class <dt><span class="section"><a href="concepts/traits_concept.html"> Traits Class
Requirements</a></span></dt> Requirements</a></span></dt>
<dt><span class="section"><a href="concepts/iterator_concepts.html"> Iterator <dt><span class="section"><a href="concepts/iterator_concepts.html"> Iterator
Rrequirements</a></span></dt> Requirements</a></span></dt>
</dl></div> </dl></div>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> charT Requirements</title> <title>charT Requirements</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../concepts.html" title=" Concepts"> <link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="../concepts.html" title=" Concepts"> <link rel="prev" href="../concepts.html" title="Concepts">
<link rel="next" href="traits_concept.html" title=" Traits Class <link rel="next" href="traits_concept.html" title="Traits Class Requirements">
Requirements">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,16 +24,17 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.concepts.charT_concept"></a><a href="charT_concept.html" title=" charT Requirements"> charT Requirements</a></h4></div></div></div> <a name="boost_regex.ref.concepts.charT_concept"></a><a href="charT_concept.html" title="charT Requirements"> charT Requirements</a>
</h4></div></div></div>
<p> <p>
Type <tt class="computeroutput"><span class="identifier">charT</span></tt> used a template Type <code class="computeroutput"><span class="identifier">charT</span></code> used a template
argument to class template <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>, must have a trivial argument to class template <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>, must have a trivial
default constructor, copy constructor, assignment operator, and destructor. default constructor, copy constructor, assignment operator, and destructor.
In addition the following requirements must be met for objects; <span class="emphasis"><em>c</em></span> In addition the following requirements must be met for objects; <span class="emphasis"><em>c</em></span>
of type <tt class="computeroutput"><span class="identifier">charT</span></tt>, <span class="emphasis"><em>c1</em></span> of type <code class="computeroutput"><span class="identifier">charT</span></code>, <span class="emphasis"><em>c1</em></span>
and <span class="emphasis"><em>c2</em></span> of type <tt class="computeroutput"><span class="identifier">charT</span> and <span class="emphasis"><em>c2</em></span> of type <code class="computeroutput"><span class="identifier">charT</span>
<span class="keyword">const</span></tt>, and <span class="emphasis"><em>i</em></span> <span class="keyword">const</span></code>, and <span class="emphasis"><em>i</em></span>
of type <tt class="computeroutput"><span class="keyword">int</span></tt>: of type <code class="computeroutput"><span class="keyword">int</span></code>:
</p> </p>
<div class="informaltable"><table class="table"> <div class="informaltable"><table class="table">
<colgroup> <colgroup>
@ -258,10 +258,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,23 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Iterator <title>Iterator Requirements</title>
Rrequirements</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../concepts.html" title=" Concepts"> <link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="traits_concept.html" title=" Traits Class <link rel="prev" href="traits_concept.html" title="Traits Class Requirements">
Requirements">
<link rel="next" href="../deprecated_interfaces.html" title="Deprecated Interfaces"> <link rel="next" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,19 +24,20 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.concepts.iterator_concepts"></a><a href="iterator_concepts.html" title=" Iterator <a name="boost_regex.ref.concepts.iterator_concepts"></a><a href="iterator_concepts.html" title="Iterator Requirements"> Iterator
Rrequirements"> Iterator Requirements</a>
Rrequirements</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
The regular expression algorithms (and iterators) take all require a Bidirectional-Iterator. The regular expression algorithms (and iterators) take all require a Bidirectional-Iterator.
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,23 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Traits Class <title>Traits Class Requirements</title>
Requirements</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../concepts.html" title=" Concepts"> <link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="charT_concept.html" title=" charT Requirements"> <link rel="prev" href="charT_concept.html" title="charT Requirements">
<link rel="next" href="iterator_concepts.html" title=" Iterator <link rel="next" href="iterator_concepts.html" title="Iterator Requirements">
Rrequirements">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,37 +24,37 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.concepts.traits_concept"></a><a href="traits_concept.html" title=" Traits Class <a name="boost_regex.ref.concepts.traits_concept"></a><a href="traits_concept.html" title="Traits Class Requirements"> Traits Class
Requirements"> Traits Class Requirements</a>
Requirements</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
There are two sets of requirements for the <tt class="computeroutput"><span class="identifier">traits</span></tt> There are two sets of requirements for the <code class="computeroutput"><span class="identifier">traits</span></code>
template argument to <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>: a mininal interface template argument to <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>: a mininal interface
(which is part of the regex standardization proposal), and an optional (which is part of the regex standardization proposal), and an optional
Boost-specific enhanced interface. Boost-specific enhanced interface.
</p> </p>
<a name="boost_regex.ref.concepts.traits_concept.minimal_requirements_"></a><h4> <a name="boost_regex.ref.concepts.traits_concept.minimal_requirements_"></a><h5>
<a name="id589905"></a> <a name="id622895"></a>
<a href="traits_concept.html#boost_regex.ref.concepts.traits_concept.minimal_requirements_">Minimal <a href="traits_concept.html#boost_regex.ref.concepts.traits_concept.minimal_requirements_">Minimal
requirements.</a> requirements.</a>
</h4> </h5>
<p> <p>
In the following table <tt class="computeroutput"><span class="identifier">X</span></tt> In the following table <code class="computeroutput"><span class="identifier">X</span></code>
denotes a traits class defining types and functions for the character container denotes a traits class defining types and functions for the character container
type <tt class="computeroutput"><span class="identifier">charT</span></tt>; <span class="emphasis"><em>u</em></span> type <code class="computeroutput"><span class="identifier">charT</span></code>; <span class="emphasis"><em>u</em></span>
is an object of type <tt class="computeroutput"><span class="identifier">X</span></tt>; is an object of type <code class="computeroutput"><span class="identifier">X</span></code>;
<span class="emphasis"><em>v</em></span> is an object of type <tt class="computeroutput"><span class="keyword">const</span> <span class="emphasis"><em>v</em></span> is an object of type <code class="computeroutput"><span class="keyword">const</span>
<span class="identifier">X</span></tt>; <span class="emphasis"><em>p</em></span> is <span class="identifier">X</span></code>; <span class="emphasis"><em>p</em></span> is
a value of type <tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span></tt>; <span class="emphasis"><em>I1</em></span> and <span class="emphasis"><em>I2</em></span> a value of type <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span></code>; <span class="emphasis"><em>I1</em></span> and <span class="emphasis"><em>I2</em></span>
are Input Iterators; <span class="emphasis"><em>c</em></span> is a value of type <tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span></tt>; are Input Iterators; <span class="emphasis"><em>c</em></span> is a value of type <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span></code>;
<span class="emphasis"><em>s</em></span> is an object of type <tt class="computeroutput"><span class="identifier">X</span><span class="special">::</span><span class="identifier">string_type</span></tt>; <span class="emphasis"><em>s</em></span> is an object of type <code class="computeroutput"><span class="identifier">X</span><span class="special">::</span><span class="identifier">string_type</span></code>;
<span class="emphasis"><em>cs</em></span> is an object of type <tt class="computeroutput"><span class="keyword">const</span> <span class="emphasis"><em>cs</em></span> is an object of type <code class="computeroutput"><span class="keyword">const</span>
<span class="identifier">X</span><span class="special">::</span><span class="identifier">string_type</span></tt>; <span class="emphasis"><em>b</em></span> is <span class="identifier">X</span><span class="special">::</span><span class="identifier">string_type</span></code>; <span class="emphasis"><em>b</em></span> is
a value of type <tt class="computeroutput"><span class="keyword">bool</span></tt>; <span class="emphasis"><em>I</em></span> a value of type <code class="computeroutput"><span class="keyword">bool</span></code>; <span class="emphasis"><em>I</em></span>
is a value of type <tt class="computeroutput"><span class="keyword">int</span></tt>; <span class="emphasis"><em>F1</em></span> is a value of type <code class="computeroutput"><span class="keyword">int</span></code>; <span class="emphasis"><em>F1</em></span>
and <span class="emphasis"><em>F2</em></span> are values of type <tt class="computeroutput"><span class="keyword">const</span> and <span class="emphasis"><em>F2</em></span> are values of type <code class="computeroutput"><span class="keyword">const</span>
<span class="identifier">charT</span><span class="special">*</span></tt>; <span class="identifier">charT</span><span class="special">*</span></code>;
and <span class="emphasis"><em>loc</em></span> is an object of type <tt class="computeroutput"><span class="identifier">X</span><span class="special">::</span><span class="identifier">locale_type</span></tt>. and <span class="emphasis"><em>loc</em></span> is an object of type <code class="computeroutput"><span class="identifier">X</span><span class="special">::</span><span class="identifier">locale_type</span></code>.
</p> </p>
<div class="informaltable"><table class="table"> <div class="informaltable"><table class="table">
<colgroup> <colgroup>
@ -329,7 +327,7 @@
<tr> <tr>
<td> <td>
<p> <p>
v.value(c, i) v.value(c, I)
</p> </p>
</td> </td>
<td> <td>
@ -380,39 +378,19 @@
</p> </p>
</td> </td>
</tr> </tr>
<tr>
<td>
<p>
v.error_string(i)
</p>
</td>
<td>
<p>
std::string
</p>
</td>
<td>
<p>
Returns a human readable error string for the error condition i,
where i is one of the values enumerated by type regex_constants::error_type.
If the value i is not recognized then returns the string "Unknown
error" or a localized equivalent.
</p>
</td>
</tr>
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.ref.concepts.traits_concept.additional_optional_requirements"></a><h4> <a name="boost_regex.ref.concepts.traits_concept.additional_optional_requirements"></a><h5>
<a name="id590748"></a> <a name="id623722"></a>
<a href="traits_concept.html#boost_regex.ref.concepts.traits_concept.additional_optional_requirements">Additional <a href="traits_concept.html#boost_regex.ref.concepts.traits_concept.additional_optional_requirements">Additional
Optional Requirements</a> Optional Requirements</a>
</h4> </h5>
<p> <p>
The following additional requirements are strictly optional, however in The following additional requirements are strictly optional, however in
order for <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> order for <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>
to take advantage of these additional interfaces, all of the following to take advantage of these additional interfaces, all of the following
requirements must be met; <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> will detect the presence requirements must be met; <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> will detect the presence
or absense of the member <tt class="computeroutput"><span class="identifier">boost_extensions_tag</span></tt> or absense of the member <code class="computeroutput"><span class="identifier">boost_extensions_tag</span></code>
and configure itself appropriately. and configure itself appropriately.
</p> </p>
<div class="informaltable"><table class="table"> <div class="informaltable"><table class="table">
@ -493,8 +471,8 @@
that signifies the meaning of character c within the regular expression that signifies the meaning of character c within the regular expression
grammar, when c has been preceded by an escape character. Precondition: grammar, when c has been preceded by an escape character. Precondition:
if b is the character preceding c in the expression being parsed if b is the character preceding c in the expression being parsed
then: <tt class="computeroutput"><span class="identifier">v</span><span class="special">.</span><span class="identifier">syntax_type</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span> then: <code class="computeroutput"><span class="identifier">v</span><span class="special">.</span><span class="identifier">syntax_type</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span>
<span class="special">==</span> <span class="identifier">syntax_escape</span></tt> <span class="special">==</span> <span class="identifier">syntax_escape</span></code>
</p> </p>
</td> </td>
</tr> </tr>
@ -512,9 +490,9 @@
<td> <td>
<p> <p>
Returns a character d such that: for any character d that is to Returns a character d such that: for any character d that is to
be considered equivalent to c then <tt class="computeroutput"><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span><span class="keyword">false</span><span class="special">)==</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">d</span><span class="special">,</span><span class="keyword">false</span><span class="special">)</span></tt>. Likewise for all characters C be considered equivalent to c then <code class="computeroutput"><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span><span class="keyword">false</span><span class="special">)==</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">d</span><span class="special">,</span><span class="keyword">false</span><span class="special">)</span></code>. Likewise for all characters C
that are to be considered equivalent to c when comparisons are that are to be considered equivalent to c when comparisons are
to be performed without regard to case, then <tt class="computeroutput"><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span><span class="keyword">true</span><span class="special">)==</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">C</span><span class="special">,</span><span class="keyword">true</span><span class="special">)</span></tt>. to be performed without regard to case, then <code class="computeroutput"><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span><span class="keyword">true</span><span class="special">)==</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">C</span><span class="special">,</span><span class="keyword">true</span><span class="special">)</span></code>.
</p> </p>
</td> </td>
</tr> </tr>
@ -531,9 +509,9 @@
</td> </td>
<td> <td>
<p> <p>
Behaves as follows: if <tt class="computeroutput"><span class="identifier">p</span> Behaves as follows: if <code class="computeroutput"><span class="identifier">p</span>
<span class="special">==</span> <span class="identifier">q</span></tt> <span class="special">==</span> <span class="identifier">q</span></code>
or if <tt class="computeroutput"><span class="special">*</span><span class="identifier">p</span></tt> or if <code class="computeroutput"><span class="special">*</span><span class="identifier">p</span></code>
is not a digit character then returns -1. Otherwise performs formatted is not a digit character then returns -1. Otherwise performs formatted
numeric input on the sequence [p,q) and returns the result as an numeric input on the sequence [p,q) and returns the result as an
int. Postcondition: either p == q or *p is a non-digit character. int. Postcondition: either p == q or *p is a non-digit character.
@ -543,7 +521,7 @@
<tr> <tr>
<td> <td>
<p> <p>
v.error_string(i) v.error_string(I)
</p> </p>
</td> </td>
<td> <td>
@ -555,8 +533,8 @@
<p> <p>
Returns a human readable error string for the error condition i, Returns a human readable error string for the error condition i,
where i is one of the values enumerated by type regex_constants::error_type. where i is one of the values enumerated by type regex_constants::error_type.
If the value i is not recognized then returns the string "Unknown If the value <span class="emphasis"><em>I</em></span> is not recognized then returns
error" or a localized equivalent. the string "Unknown error" or a localized equivalent.
</p> </p>
</td> </td>
</tr> </tr>
@ -601,10 +579,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -3,21 +3,19 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Deprecated Interfaces</title> <title>Deprecated Interfaces</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="concepts/iterator_concepts.html" title=" Iterator <link rel="prev" href="concepts/iterator_concepts.html" title="Iterator Requirements">
Rrequirements"> <link rel="next" href="deprecated_interfaces/regex_format.html" title="regex_format (Deprecated)">
<link rel="next" href="deprecated_interfaces/regex_format.html" title="
regex_format (Deprecated)">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.deprecated_interfaces"></a><a href="deprecated_interfaces.html" title="Deprecated Interfaces">Deprecated Interfaces</a></h3></div></div></div> <a name="boost_regex.ref.deprecated_interfaces"></a><a href="deprecated_interfaces.html" title="Deprecated Interfaces">Deprecated Interfaces</a>
</h3></div></div></div>
<div class="toc"><dl> <div class="toc"><dl>
<dt><span class="section"><a href="deprecated_interfaces/regex_format.html"> <dt><span class="section"><a href="deprecated_interfaces/regex_format.html">
regex_format (Deprecated)</a></span></dt> regex_format (Deprecated)</a></span></dt>
@ -37,21 +36,14 @@
<dt><span class="section"><a href="deprecated_interfaces/old_regex.html"> High <dt><span class="section"><a href="deprecated_interfaces/old_regex.html"> High
Level Class RegEx (Deprecated)</a></span></dt> Level Class RegEx (Deprecated)</a></span></dt>
</dl></div> </dl></div>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,23 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> High <title>High Level Class RegEx (Deprecated)</title>
Level Class RegEx (Deprecated)</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces"> <link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
<link rel="prev" href="regex_split.html" title=" <link rel="prev" href="regex_split.html" title="regex_split (deprecated)">
regex_split (deprecated)">
<link rel="next" href="../../background_information.html" title="Background Information"> <link rel="next" href="../../background_information.html" title="Background Information">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,17 +24,16 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.deprecated_interfaces.old_regex"></a><a href="old_regex.html" title=" High <a name="boost_regex.ref.deprecated_interfaces.old_regex"></a><a href="old_regex.html" title="High Level Class RegEx (Deprecated)"> High
Level Class RegEx (Deprecated)"> High Level Class RegEx (Deprecated)</a>
Level Class RegEx (Deprecated)</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
The high level wrapper class RegEx is now deprecated and does not form The high level wrapper class RegEx is now deprecated and does not form
part of the regular expression standardization proposal. This type still part of the regular expression standardization proposal. This type still
exists, and existing code will continue to compile, however the following exists, and existing code will continue to compile, however the following
documentation is unlikely to be further updated. documentation is unlikely to be further updated.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre> </pre>
<p> <p>
The class RegEx provides a high level simplified interface to the regular The class RegEx provides a high level simplified interface to the regular
@ -44,8 +41,7 @@
regular expressions always follow the "normal" syntax - that regular expressions always follow the "normal" syntax - that
is the same as the perl / ECMAScript synatx. is the same as the perl / ECMAScript synatx.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(*</span><span class="identifier">GrepCallback</span><span class="special">)(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&amp;</span> <span class="identifier">expression</span><span class="special">);</span>
<span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(*</span><span class="identifier">GrepCallback</span><span class="special">)(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&amp;</span> <span class="identifier">expression</span><span class="special">);</span>
<span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(*</span><span class="identifier">GrepFileCallback</span><span class="special">)(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">file</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&amp;</span> <span class="identifier">expression</span><span class="special">);</span> <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(*</span><span class="identifier">GrepFileCallback</span><span class="special">)(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">file</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&amp;</span> <span class="identifier">expression</span><span class="special">);</span>
<span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(*</span><span class="identifier">FindFilesCallback</span><span class="special">)(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">file</span><span class="special">);</span> <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(*</span><span class="identifier">FindFilesCallback</span><span class="special">)(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">file</span><span class="special">);</span>
@ -138,7 +134,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">();</span></tt> <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">();</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -151,7 +147,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&amp;</span> <span class="identifier">o</span><span class="special">);</span></tt> <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&amp;</span> <span class="identifier">o</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -164,40 +160,40 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">c</span><span class="special">,</span> <span class="keyword">bool</span> <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">c</span><span class="special">,</span> <span class="keyword">bool</span>
<span class="identifier">icase</span> <span class="special">=</span> <span class="identifier">icase</span> <span class="special">=</span>
<span class="keyword">false</span><span class="special">);</span></tt> <span class="keyword">false</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Constructs an instance of RegEx, setting the expression to <span class="emphasis"><em>c</em></span>, Constructs an instance of RegEx, setting the expression to <span class="emphasis"><em>c</em></span>,
if <span class="emphasis"><em>icase</em></span> is true then matching is insensitive if <span class="emphasis"><em>icase</em></span> is true then matching is insensitive
to case, otherwise it is sensitive to case. Throws <a href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure. to case, otherwise it is sensitive to case. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span> <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span>
<span class="identifier">icase</span> <span class="special">=</span> <span class="identifier">icase</span> <span class="special">=</span>
<span class="keyword">false</span><span class="special">);</span></tt> <span class="keyword">false</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Constructs an instance of RegEx, setting the expression to <span class="emphasis"><em>s</em></span>, Constructs an instance of RegEx, setting the expression to <span class="emphasis"><em>s</em></span>,
if <span class="emphasis"><em>icase</em></span> is true then matching is insensitive if <span class="emphasis"><em>icase</em></span> is true then matching is insensitive
to case, otherwise it is sensitive to case. Throws <a href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure. to case, otherwise it is sensitive to case. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">&amp;</span> <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">&amp;</span>
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&amp;</span> <span class="identifier">o</span><span class="special">);</span></tt> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&amp;</span> <span class="identifier">o</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -209,68 +205,68 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">&amp;</span> <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">&amp;</span>
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">);</span></tt> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Assignment operator, equivalent to calling <tt class="computeroutput"><span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">p</span><span class="special">,</span> <span class="keyword">false</span><span class="special">)</span></tt>. Throws <a href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure. Assignment operator, equivalent to calling <code class="computeroutput"><span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">p</span><span class="special">,</span> <span class="keyword">false</span><span class="special">)</span></code>. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">&amp;</span> <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">&amp;</span>
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">);</span></tt> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Assignment operator, equivalent to calling <tt class="computeroutput"><span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="keyword">false</span><span class="special">)</span></tt>. Throws <a href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure. Assignment operator, equivalent to calling <code class="computeroutput"><span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="keyword">false</span><span class="special">)</span></code>. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">constchar</span><span class="special">*</span> <span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">constchar</span><span class="special">*</span>
<span class="identifier">p</span><span class="special">,</span> <span class="identifier">p</span><span class="special">,</span>
<span class="keyword">bool</span> <span class="identifier">icase</span> <span class="keyword">bool</span> <span class="identifier">icase</span>
<span class="special">=</span> <span class="keyword">false</span><span class="special">);</span></tt> <span class="special">=</span> <span class="keyword">false</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Sets the current expression to <span class="emphasis"><em>p</em></span>, if <span class="emphasis"><em>icase</em></span> Sets the current expression to <span class="emphasis"><em>p</em></span>, if <span class="emphasis"><em>icase</em></span>
is true then matching is insensitive to case, otherwise it is sensitive is true then matching is insensitive to case, otherwise it is sensitive
to case. Throws <a href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure. to case. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">SetExpression</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">SetExpression</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span>
<span class="identifier">icase</span> <span class="special">=</span> <span class="identifier">icase</span> <span class="special">=</span>
<span class="keyword">false</span><span class="special">);</span></tt> <span class="keyword">false</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Sets the current expression to <span class="emphasis"><em>s</em></span>, if <span class="emphasis"><em>icase</em></span> Sets the current expression to <span class="emphasis"><em>s</em></span>, if <span class="emphasis"><em>icase</em></span>
is true then matching is insensitive to case, otherwise it is sensitive is true then matching is insensitive to case, otherwise it is sensitive
to case. Throws <a href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure. to case. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Expression</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span></tt> <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Expression</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -282,17 +278,17 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span> <code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span>
<span class="keyword">char</span><span class="special">*</span> <span class="keyword">char</span><span class="special">*</span>
<span class="identifier">p</span><span class="special">,</span> <span class="identifier">p</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Attempts to match the current expression against the text <span class="emphasis"><em>p</em></span> Attempts to match the current expression against the text <span class="emphasis"><em>p</em></span>
using the match flags <span class="emphasis"><em>flags</em></span> - see <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>. Returns using the match flags <span class="emphasis"><em>flags</em></span> - see <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>. Returns
<span class="emphasis"><em>true</em></span> if the expression matches the whole of <span class="emphasis"><em>true</em></span> if the expression matches the whole of
the input string. the input string.
</p> </p>
@ -301,17 +297,17 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span> <code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span>
<span class="identifier">s</span><span class="special">,</span> <span class="identifier">s</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Attempts to match the current expression against the text <span class="emphasis"><em>s</em></span> Attempts to match the current expression against the text <span class="emphasis"><em>s</em></span>
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>. using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
Returns <span class="emphasis"><em>true</em></span> if the expression matches the Returns <span class="emphasis"><em>true</em></span> if the expression matches the
whole of the input string. whole of the input string.
</p> </p>
@ -320,17 +316,17 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Search</span><span class="special">(</span><span class="keyword">const</span> <code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Search</span><span class="special">(</span><span class="keyword">const</span>
<span class="keyword">char</span><span class="special">*</span> <span class="keyword">char</span><span class="special">*</span>
<span class="identifier">p</span><span class="special">,</span> <span class="identifier">p</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Attempts to find a match for the current expression somewhere in Attempts to find a match for the current expression somewhere in
the text <span class="emphasis"><em>p</em></span> using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>. the text <span class="emphasis"><em>p</em></span> using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
Returns <span class="emphasis"><em>true</em></span> if the match succeeds. Returns <span class="emphasis"><em>true</em></span> if the match succeeds.
</p> </p>
</td> </td>
@ -338,17 +334,17 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Search</span><span class="special">(</span><span class="keyword">const</span> <code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Search</span><span class="special">(</span><span class="keyword">const</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span>
<span class="identifier">s</span><span class="special">,</span> <span class="identifier">s</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Attempts to find a match for the current expression somewhere in Attempts to find a match for the current expression somewhere in
the text <span class="emphasis"><em>s</em></span> using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> flags. the text <span class="emphasis"><em>s</em></span> using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> flags.
Returns <span class="emphasis"><em>true</em></span> if the match succeeds. Returns <span class="emphasis"><em>true</em></span> if the match succeeds.
</p> </p>
</td> </td>
@ -356,19 +352,19 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">GrepCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Grep</span><span class="special">(</span><span class="identifier">GrepCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
<span class="keyword">char</span><span class="special">*</span> <span class="keyword">char</span><span class="special">*</span>
<span class="identifier">p</span><span class="special">,</span> <span class="identifier">p</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Finds all matches of the current expression in the text <span class="emphasis"><em>p</em></span> Finds all matches of the current expression in the text <span class="emphasis"><em>p</em></span>
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>. using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
For each match found calls the call-back function cb as: <tt class="computeroutput"><span class="identifier">cb</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span></tt> For each match found calls the call-back function cb as: <code class="computeroutput"><span class="identifier">cb</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span></code>
If at any stage the call-back function returns <span class="emphasis"><em>false</em></span> If at any stage the call-back function returns <span class="emphasis"><em>false</em></span>
then the grep operation terminates, otherwise continues until no then the grep operation terminates, otherwise continues until no
further matches are found. Returns the number of matches found. further matches are found. Returns the number of matches found.
@ -378,19 +374,19 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">GrepCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Grep</span><span class="special">(</span><span class="identifier">GrepCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span>
<span class="identifier">s</span><span class="special">,</span> <span class="identifier">s</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Finds all matches of the current expression in the text <span class="emphasis"><em>s</em></span> Finds all matches of the current expression in the text <span class="emphasis"><em>s</em></span>
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> flags. using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> flags.
For each match found calls the call-back function cb as: <tt class="computeroutput"><span class="identifier">cb</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span></tt> For each match found calls the call-back function cb as: <code class="computeroutput"><span class="identifier">cb</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span></code>
If at any stage the call-back function returns false then the grep If at any stage the call-back function returns false then the grep
operation terminates, otherwise continues until no further matches operation terminates, otherwise continues until no further matches
are found. Returns the number of matches found. are found. Returns the number of matches found.
@ -400,18 +396,18 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;&amp;</span> <span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;&amp;</span>
<span class="identifier">v</span><span class="special">,</span> <span class="identifier">v</span><span class="special">,</span>
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
<span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">flags</span> <span class="special">=</span>
<span class="identifier">match_default</span><span class="special">);</span></tt> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Finds all matches of the current expression in the text <span class="emphasis"><em>p</em></span> Finds all matches of the current expression in the text <span class="emphasis"><em>p</em></span>
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> flags. using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> flags.
For each match pushes a copy of what matched onto <span class="emphasis"><em>v</em></span>. For each match pushes a copy of what matched onto <span class="emphasis"><em>v</em></span>.
Returns the number of matches found. Returns the number of matches found.
</p> </p>
@ -420,18 +416,18 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;&amp;</span> <span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;&amp;</span>
<span class="identifier">v</span><span class="special">,</span> <span class="identifier">v</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
<span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">flags</span> <span class="special">=</span>
<span class="identifier">match_default</span><span class="special">);</span></tt> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Finds all matches of the current expression in the text <span class="emphasis"><em>s</em></span> Finds all matches of the current expression in the text <span class="emphasis"><em>s</em></span>
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>. using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
For each match pushes a copy of what matched onto <span class="emphasis"><em>v</em></span>. For each match pushes a copy of what matched onto <span class="emphasis"><em>v</em></span>.
Returns the number of matches found. Returns the number of matches found.
</p> </p>
@ -440,18 +436,18 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">,</span> <span class="keyword">const</span>
<span class="keyword">char</span><span class="special">*</span> <span class="keyword">char</span><span class="special">*</span>
<span class="identifier">p</span><span class="special">,</span> <span class="identifier">p</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Finds all matches of the current expression in the text <span class="emphasis"><em>p</em></span> Finds all matches of the current expression in the text <span class="emphasis"><em>p</em></span>
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>. using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
For each match pushes the starting index of what matched onto For each match pushes the starting index of what matched onto
<span class="emphasis"><em>v</em></span>. Returns the number of matches found. <span class="emphasis"><em>v</em></span>. Returns the number of matches found.
</p> </p>
@ -460,18 +456,18 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">,</span> <span class="keyword">const</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span>
<span class="identifier">s</span><span class="special">,</span> <span class="identifier">s</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Finds all matches of the current expression in the text <span class="emphasis"><em>s</em></span> Finds all matches of the current expression in the text <span class="emphasis"><em>s</em></span>
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>. using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
For each match pushes the starting index of what matched onto For each match pushes the starting index of what matched onto
<span class="emphasis"><em>v</em></span>. Returns the number of matches found. <span class="emphasis"><em>v</em></span>. Returns the number of matches found.
</p> </p>
@ -480,20 +476,20 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">GrepFiles</span><span class="special">(</span><span class="identifier">GrepFileCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">GrepFiles</span><span class="special">(</span><span class="identifier">GrepFileCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
<span class="keyword">char</span><span class="special">*</span> <span class="keyword">char</span><span class="special">*</span>
<span class="identifier">files</span><span class="special">,</span> <span class="identifier">files</span><span class="special">,</span>
<span class="keyword">bool</span> <span class="identifier">recurse</span> <span class="keyword">bool</span> <span class="identifier">recurse</span>
<span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
<span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">flags</span> <span class="special">=</span>
<span class="identifier">match_default</span><span class="special">);</span></tt> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Finds all matches of the current expression in the files files Finds all matches of the current expression in the files files
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>. using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
For each match calls the call-back function cb. If the call-back For each match calls the call-back function cb. If the call-back
returns false then the algorithm returns without considering further returns false then the algorithm returns without considering further
matches in the current file, or any further files. matches in the current file, or any further files.
@ -507,7 +503,7 @@
Returns the total number of matches found. Returns the total number of matches found.
</p> </p>
<p> <p>
May throw an exception derived from <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> May throw an exception derived from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if file io fails. if file io fails.
</p> </p>
</td> </td>
@ -515,20 +511,20 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">GrepFiles</span><span class="special">(</span><span class="identifier">GrepFileCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">GrepFiles</span><span class="special">(</span><span class="identifier">GrepFileCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span>
<span class="identifier">files</span><span class="special">,</span> <span class="identifier">files</span><span class="special">,</span>
<span class="keyword">bool</span> <span class="identifier">recurse</span> <span class="keyword">bool</span> <span class="identifier">recurse</span>
<span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
<span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">flags</span> <span class="special">=</span>
<span class="identifier">match_default</span><span class="special">);</span></tt> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Finds all matches of the current expression in the files files Finds all matches of the current expression in the files files
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>. using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
For each match calls the call-back function cb. For each match calls the call-back function cb.
</p> </p>
<p> <p>
@ -545,7 +541,7 @@
Returns the total number of matches found. Returns the total number of matches found.
</p> </p>
<p> <p>
May throw an exception derived from <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> May throw an exception derived from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if file io fails. if file io fails.
</p> </p>
</td> </td>
@ -553,20 +549,20 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">FindFiles</span><span class="special">(</span><span class="identifier">FindFilesCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">FindFiles</span><span class="special">(</span><span class="identifier">FindFilesCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
<span class="keyword">char</span><span class="special">*</span> <span class="keyword">char</span><span class="special">*</span>
<span class="identifier">files</span><span class="special">,</span> <span class="identifier">files</span><span class="special">,</span>
<span class="keyword">bool</span> <span class="identifier">recurse</span> <span class="keyword">bool</span> <span class="identifier">recurse</span>
<span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
<span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">flags</span> <span class="special">=</span>
<span class="identifier">match_default</span><span class="special">);</span></tt> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Searches files to find all those which contain at least one match Searches files to find all those which contain at least one match
of the current expression using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>. of the current expression using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
For each matching file calls the call-back function cb. If the For each matching file calls the call-back function cb. If the
call-back returns false then the algorithm returns without considering call-back returns false then the algorithm returns without considering
any further files. any further files.
@ -580,7 +576,7 @@
Returns the total number of files found. Returns the total number of files found.
</p> </p>
<p> <p>
May throw an exception derived from <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> May throw an exception derived from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if file io fails. if file io fails.
</p> </p>
</td> </td>
@ -588,20 +584,20 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">FindFiles</span><span class="special">(</span><span class="identifier">FindFilesCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">FindFiles</span><span class="special">(</span><span class="identifier">FindFilesCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span>
<span class="identifier">files</span><span class="special">,</span> <span class="identifier">files</span><span class="special">,</span>
<span class="keyword">bool</span> <span class="identifier">recurse</span> <span class="keyword">bool</span> <span class="identifier">recurse</span>
<span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
<span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">flags</span> <span class="special">=</span>
<span class="identifier">match_default</span><span class="special">);</span></tt> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Searches files to find all those which contain at least one match Searches files to find all those which contain at least one match
of the current expression using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>. of the current expression using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
For each matching file calls the call-back function cb. For each matching file calls the call-back function cb.
</p> </p>
<p> <p>
@ -617,7 +613,7 @@
Returns the total number of files found. Returns the total number of files found.
</p> </p>
<p> <p>
May throw an exception derived from <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> May throw an exception derived from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if file io fails. if file io fails.
</p> </p>
</td> </td>
@ -625,14 +621,14 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Merge</span><span class="special">(</span><span class="keyword">const</span> <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Merge</span><span class="special">(</span><span class="keyword">const</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span>
<span class="identifier">in</span><span class="special">,</span> <span class="identifier">in</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="keyword">bool</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="keyword">bool</span>
<span class="identifier">copy</span> <span class="special">=</span> <span class="identifier">copy</span> <span class="special">=</span>
<span class="keyword">true</span><span class="special">,</span> <span class="keyword">true</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -645,22 +641,22 @@
If <span class="emphasis"><em>copy</em></span> is true then all unmatched sections If <span class="emphasis"><em>copy</em></span> is true then all unmatched sections
of input are copied unchanged to output, if the flag <span class="emphasis"><em>format_first_only</em></span> of input are copied unchanged to output, if the flag <span class="emphasis"><em>format_first_only</em></span>
is set then only the first occurance of the pattern found is replaced. is set then only the first occurance of the pattern found is replaced.
Returns the new string. See also <a href="../../format.html" title=" Search and Replace Format String Syntax">format Returns the new string. See also <a href="../../format.html" title="Search and Replace Format String Syntax">format
string syntax</a>, and <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>. string syntax</a>, and <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Merge</span><span class="special">(</span><span class="keyword">const</span> <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Merge</span><span class="special">(</span><span class="keyword">const</span>
<span class="keyword">char</span><span class="special">*</span> <span class="keyword">char</span><span class="special">*</span>
<span class="identifier">in</span><span class="special">,</span> <span class="identifier">in</span><span class="special">,</span>
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="keyword">bool</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="keyword">bool</span>
<span class="identifier">copy</span> <span class="special">=</span> <span class="identifier">copy</span> <span class="special">=</span>
<span class="keyword">true</span><span class="special">,</span> <span class="keyword">true</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -673,19 +669,19 @@
If <span class="emphasis"><em>copy</em></span> is true then all unmatched sections If <span class="emphasis"><em>copy</em></span> is true then all unmatched sections
of input are copied unchanged to output, if the flag <span class="emphasis"><em>format_first_only</em></span> of input are copied unchanged to output, if the flag <span class="emphasis"><em>format_first_only</em></span>
is set then only the first occurance of the pattern found is replaced. is set then only the first occurance of the pattern found is replaced.
Returns the new string. See also <a href="../../format.html" title=" Search and Replace Format String Syntax">format Returns the new string. See also <a href="../../format.html" title="Search and Replace Format String Syntax">format
string syntax</a>, and <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>. string syntax</a>, and <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="identifier">Split</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="identifier">Split</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
<span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">flags</span> <span class="special">=</span>
<span class="identifier">match_default</span><span class="special">,</span> <span class="identifier">match_default</span><span class="special">,</span>
<span class="keyword">unsigned</span> <span class="identifier">max_count</span> <span class="keyword">unsigned</span> <span class="identifier">max_count</span>
<span class="special">=</span> <span class="special">~</span><span class="number">0</span><span class="special">);</span></tt> <span class="special">=</span> <span class="special">~</span><span class="number">0</span><span class="special">);</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -706,17 +702,17 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">Position</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="identifier">Position</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span>
<span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></tt> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Returns the position of what matched sub-expression <span class="emphasis"><em>i</em></span>. Returns the position of what matched sub-expression <span class="emphasis"><em>i</em></span>.
If <tt class="computeroutput"><span class="identifier">i</span> <span class="special">=</span> If <code class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
<span class="number">0</span></tt> then returns the position <span class="number">0</span></code> then returns the position
of the whole match. Returns <tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></tt> of the whole match. Returns <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></code>
if the supplied index is invalid, or if the specified sub-expression if the supplied index is invalid, or if the specified sub-expression
did not participate in the match. did not participate in the match.
</p> </p>
@ -725,16 +721,16 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">Length</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="identifier">Length</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span>
<span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></tt> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Returns the length of what matched sub-expression i. If <tt class="computeroutput"><span class="identifier">i</span> <span class="special">=</span> Returns the length of what matched sub-expression i. If <code class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
<span class="number">0</span></tt> then returns the length <span class="number">0</span></code> then returns the length
of the whole match. Returns <tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></tt> of the whole match. Returns <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></code>
if the supplied index is invalid, or if the specified sub-expression if the supplied index is invalid, or if the specified sub-expression
did not participate in the match. did not participate in the match.
</p> </p>
@ -743,8 +739,8 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Matched</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Matched</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span>
<span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></tt> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -757,23 +753,23 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">Line</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span></tt> <span class="identifier">Line</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Returns the line on which the match occurred, indexes start from Returns the line on which the match occurred, indexes start from
1 not zero, if no match occurred then returns <tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></tt>. 1 not zero, if no match occurred then returns <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></code>.
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">Marks</span><span class="special">()</span> <span class="identifier">Marks</span><span class="special">()</span>
<span class="keyword">const</span><span class="special">;</span></tt> <span class="keyword">const</span><span class="special">;</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -787,14 +783,14 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">What</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></tt> <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">What</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Returns a copy of what matched sub-expression <span class="emphasis"><em>i</em></span>. Returns a copy of what matched sub-expression <span class="emphasis"><em>i</em></span>.
If <tt class="computeroutput"><span class="identifier">i</span> <span class="special">=</span> If <code class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
<span class="number">0</span></tt> then returns a copy of <span class="number">0</span></code> then returns a copy of
the whole match. Returns a null string if the index is invalid the whole match. Returns a null string if the index is invalid
or if the specified sub-expression did not participate in a match. or if the specified sub-expression did not participate in a match.
</p> </p>
@ -803,13 +799,13 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">int</span> <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">int</span>
<span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span> <span class="special">;</span></tt> <span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span> <span class="special">;</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
Returns <tt class="computeroutput"><span class="identifier">what</span><span class="special">(</span><span class="identifier">i</span><span class="special">);</span></tt> Returns <code class="computeroutput"><span class="identifier">what</span><span class="special">(</span><span class="identifier">i</span><span class="special">);</span></code>
Can be used to simplify access to sub-expression matches, and make Can be used to simplify access to sub-expression matches, and make
usage more perl-like. usage more perl-like.
</p> </p>
@ -820,10 +816,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,23 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>regex_format (Deprecated)</title>
regex_format (Deprecated)</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces"> <link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
<link rel="prev" href="../deprecated_interfaces.html" title="Deprecated Interfaces"> <link rel="prev" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
<link rel="next" href="regex_grep.html" title=" <link rel="next" href="regex_grep.html" title="regex_grep (Deprecated)">
regex_grep (Deprecated)">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,31 +24,29 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.deprecated_interfaces.regex_format"></a><a href="regex_format.html" title=" <a name="boost_regex.ref.deprecated_interfaces.regex_format"></a><a href="regex_format.html" title="regex_format (Deprecated)">
regex_format (Deprecated)"> regex_format (Deprecated)</a>
regex_format (Deprecated)</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
The algorithm <tt class="computeroutput"><span class="identifier">regex_format</span></tt> The algorithm <code class="computeroutput"><span class="identifier">regex_format</span></code>
is deprecated; new code should use <a href="../match_results.html#boost_regex.match_results_format"><tt class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;&gt;::</span><span class="identifier">format</span></tt></a> instead. Existing code is deprecated; new code should use <a href="../match_results.html#boost_regex.match_results_format"><code class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;&gt;::</span><span class="identifier">format</span></code></a> instead. Existing code
will continue to compile, the following documentation is taken from the will continue to compile, the following documentation is taken from the
previous version of Boost.Regex and will not be further updated: previous version of Boost.Regex and will not be further updated:
</p> </p>
<a name="boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format"></a><h4> <a name="boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format"></a><h5>
<a name="id591505"></a> <a name="id624460"></a>
<a href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm <a href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm
regex_format</a> regex_format</a>
</h4> </h5>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre> </pre>
<p> <p>
The algorithm <tt class="computeroutput"><span class="identifier">regex_format</span></tt> The algorithm <code class="computeroutput"><span class="identifier">regex_format</span></code>
takes the results of a match and creates a new string based upon a format takes the results of a match and creates a new string based upon a format
string, <tt class="computeroutput"><span class="identifier">regex_format</span></tt> can string, <code class="computeroutput"><span class="identifier">regex_format</span></code> can
be used for search and replace operations: be used for search and replace operations:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="identifier">OutputIterator</span> <span class="identifier">regex_format</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">OutputIterator</span> <span class="identifier">regex_format</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span><span class="special">,</span>
@ -62,7 +58,7 @@
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="number">0</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="number">0</span><span class="special">);</span>
</pre> </pre>
<p> <p>
The library also defines the following convenience variation of <tt class="computeroutput"><span class="identifier">regex_format</span></tt>, which returns the result The library also defines the following convenience variation of <code class="computeroutput"><span class="identifier">regex_format</span></code>, which returns the result
directly as a string, rather than outputting to an iterator. directly as a string, rather than outputting to an iterator.
</p> </p>
<div class="note"><table border="0" summary="Note"> <div class="note"><table border="0" summary="Note">
@ -70,13 +66,12 @@
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/html/images/note.png"></td> <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/html/images/note.png"></td>
<th align="left">Note</th> <th align="left">Note</th>
</tr> </tr>
<tr><td colspan="2" align="left" valign="top"><p> <tr><td align="left" valign="top"><p>
This version may not be available, or may be available in a more limited This version may not be available, or may be available in a more limited
form, depending upon your compilers capabilities form, depending upon your compilers capabilities
</p></td></tr> </p></td></tr>
</table></div> </table></div>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">regex_format</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">regex_format</span>
<span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span><span class="special">,</span>
@ -112,7 +107,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">OutputIterator</span> <span class="identifier">out</span></tt> <code class="computeroutput"><span class="identifier">OutputIterator</span> <span class="identifier">out</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -125,12 +120,12 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span></tt> <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
An instance of <a href="../match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> obtained An instance of <a href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> obtained
from one of the matching algorithms above, and denoting what matched. from one of the matching algorithms above, and denoting what matched.
</p> </p>
</td> </td>
@ -138,7 +133,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span></tt> <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -151,7 +146,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="identifier">flags</span></tt> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="identifier">flags</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -163,19 +158,20 @@
</tbody> </tbody>
</table></div> </table></div>
<p> <p>
Format flags are described under <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>. Format flags are described under <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
</p> </p>
<p> <p>
The format string syntax (and available options) is described more fully The format string syntax (and available options) is described more fully
under <a href="../../format.html" title=" Search and Replace Format String Syntax">format strings</a>. under <a href="../../format.html" title="Search and Replace Format String Syntax">format strings</a>.
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,24 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>regex_grep (Deprecated)</title>
regex_grep (Deprecated)</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces"> <link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
<link rel="prev" href="regex_format.html" title=" <link rel="prev" href="regex_format.html" title="regex_format (Deprecated)">
regex_format (Deprecated)"> <link rel="next" href="regex_split.html" title="regex_split (deprecated)">
<link rel="next" href="regex_split.html" title="
regex_split (deprecated)">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -27,28 +24,26 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.deprecated_interfaces.regex_grep"></a><a href="regex_grep.html" title=" <a name="boost_regex.ref.deprecated_interfaces.regex_grep"></a><a href="regex_grep.html" title="regex_grep (Deprecated)">
regex_grep (Deprecated)"> regex_grep (Deprecated)</a>
regex_grep (Deprecated)</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
The algorithm <tt class="computeroutput"><span class="identifier">regex_grep</span></tt> The algorithm <code class="computeroutput"><span class="identifier">regex_grep</span></code>
is deprecated in favor of <a href="../regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> which provides is deprecated in favor of <a href="../regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> which provides
a more convenient and standard library friendly interface. a more convenient and standard library friendly interface.
</p> </p>
<p> <p>
The following documentation is taken unchanged from the previous boost The following documentation is taken unchanged from the previous boost
release, and will not be updated in future. release, and will not be updated in future.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre> </pre>
<p> <p>
<tt class="computeroutput"><span class="identifier">regex_grep</span></tt> allows you to <code class="computeroutput"><span class="identifier">regex_grep</span></code> allows you to
search through a bidirectional-iterator range and locate all the (non-overlapping) search through a bidirectional-iterator range and locate all the (non-overlapping)
matches with a given regular expression. The function is declared as: matches with a given regular expression. The function is declared as:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">regex_grep</span><span class="special">(</span><span class="identifier">Predicate</span> <span class="identifier">foo</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">regex_grep</span><span class="special">(</span><span class="identifier">Predicate</span> <span class="identifier">foo</span><span class="special">,</span>
<span class="identifier">iterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">iterator</span> <span class="identifier">first</span><span class="special">,</span>
<span class="identifier">iterator</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">iterator</span> <span class="identifier">last</span><span class="special">,</span>
@ -57,12 +52,11 @@
</pre> </pre>
<p> <p>
The library also defines the following convenience versions, which take The library also defines the following convenience versions, which take
either a <tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span></tt>, or a <tt class="computeroutput"><span class="keyword">const</span> either a <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span></code>, or a <code class="computeroutput"><span class="keyword">const</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;&gt;&amp;</span></tt> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;&gt;&amp;</span></code>
in place of a pair of iterators. in place of a pair of iterators.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">regex_grep</span><span class="special">(</span><span class="identifier">Predicate</span> <span class="identifier">foo</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">regex_grep</span><span class="special">(</span><span class="identifier">Predicate</span> <span class="identifier">foo</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
@ -75,7 +69,7 @@
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
The parameters for the primary version of <tt class="computeroutput"><span class="identifier">regex_grep</span></tt> The parameters for the primary version of <code class="computeroutput"><span class="identifier">regex_grep</span></code>
have the following meanings: have the following meanings:
</p> </p>
<p> <p>
@ -97,9 +91,9 @@
</p> </p>
<p> <p>
The algorithm finds all of the non-overlapping matches of the expression The algorithm finds all of the non-overlapping matches of the expression
<span class="emphasis"><em>e</em></span>, for each match it fills a <tt class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">&gt;</span></tt> structure, which contains information <span class="emphasis"><em>e</em></span>, for each match it fills a <code class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">&gt;</span></code> structure, which contains information
on what matched, and calls the predicate <span class="emphasis"><em>foo</em></span>, passing on what matched, and calls the predicate <span class="emphasis"><em>foo</em></span>, passing
the <tt class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">&gt;</span></tt> the <code class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">&gt;</span></code>
as a single argument. If the predicate returns <span class="emphasis"><em>true</em></span>, as a single argument. If the predicate returns <span class="emphasis"><em>true</em></span>,
then the grep operation continues, otherwise it terminates without searching then the grep operation continues, otherwise it terminates without searching
for further matches. The function returns the number of matches found. for further matches. The function returns the number of matches found.
@ -107,8 +101,7 @@
<p> <p>
The general form of the predicate is: The general form of the predicate is:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">grep_predicate</span>
<span class="keyword">struct</span> <span class="identifier">grep_predicate</span>
<span class="special">{</span> <span class="special">{</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">iterator_type</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">);</span> <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">iterator_type</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">);</span>
<span class="special">};</span> <span class="special">};</span>
@ -123,12 +116,12 @@
utilities would output the results to the screen, another program could utilities would output the results to the screen, another program could
index a file based on a regular expression and store a set of bookmarks index a file based on a regular expression and store a set of bookmarks
in a list, or a text file conversion utility would output to file. The in a list, or a text file conversion utility would output to file. The
results of one <tt class="computeroutput"><span class="identifier">regex_grep</span></tt> results of one <code class="computeroutput"><span class="identifier">regex_grep</span></code>
can even be chained into another <tt class="computeroutput"><span class="identifier">regex_grep</span></tt> can even be chained into another <code class="computeroutput"><span class="identifier">regex_grep</span></code>
to create recursive parsers. to create recursive parsers.
</p> </p>
<p> <p>
The algorithm may throw <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> The algorithm may throw <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if the complexity of matching the expression against an <span class="emphasis"><em>N</em></span> if the complexity of matching the expression against an <span class="emphasis"><em>N</em></span>
character string begins to exceed O(N<sup>2</sup>), or if the program runs out of character string begins to exceed O(N<sup>2</sup>), or if the program runs out of
stack space while matching the expression (if Boost.Regex is configured stack space while matching the expression (if Boost.Regex is configured
@ -136,10 +129,9 @@
(if Boost.Regex is configured in non-recursive mode). (if Boost.Regex is configured in non-recursive mode).
</p> </p>
<p> <p>
Example: convert the example from <a href="../regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> to use <tt class="computeroutput"><span class="identifier">regex_grep</span></tt> instead: Example: convert the example from <a href="../regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a> to use <code class="computeroutput"><span class="identifier">regex_grep</span></code> instead:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@ -198,11 +190,10 @@
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<p> <p>
Example: Use <tt class="computeroutput"><span class="identifier">regex_grep</span></tt> Example: Use <code class="computeroutput"><span class="identifier">regex_grep</span></code>
to call a global callback function: to call a global callback function:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@ -258,12 +249,11 @@
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<p> <p>
Example: use <tt class="computeroutput"><span class="identifier">regex_grep</span></tt> Example: use <code class="computeroutput"><span class="identifier">regex_grep</span></code>
to call a class member function, use the standard library adapters <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">mem_fun</span></tt> and <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bind1st</span></tt> to call a class member function, use the standard library adapters <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">mem_fun</span></code> and <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bind1st</span></code>
to convert the member function into a predicate: to convert the member function into a predicate:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">functional</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">functional</span><span class="special">&gt;</span>
@ -316,8 +306,7 @@
Finally, C++ Builder users can use C++ Builder's closure type as a callback Finally, C++ Builder users can use C++ Builder's closure type as a callback
argument: argument:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">functional</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">functional</span><span class="special">&gt;</span>
@ -373,10 +362,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,24 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>regex_split (deprecated)</title>
regex_split (deprecated)</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces"> <link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
<link rel="prev" href="regex_grep.html" title=" <link rel="prev" href="regex_grep.html" title="regex_grep (Deprecated)">
regex_grep (Deprecated)"> <link rel="next" href="old_regex.html" title="High Level Class RegEx (Deprecated)">
<link rel="next" href="old_regex.html" title=" High
Level Class RegEx (Deprecated)">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -27,31 +24,26 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.deprecated_interfaces.regex_split"></a><a href="regex_split.html" title=" <a name="boost_regex.ref.deprecated_interfaces.regex_split"></a><a href="regex_split.html" title="regex_split (deprecated)">
regex_split (deprecated)"> regex_split (deprecated)</a>
regex_split (deprecated)</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
The algorithm <a href="regex_split.html" title=" The algorithm <a href="regex_split.html" title="regex_split (deprecated)"><code class="computeroutput"><span class="identifier">regex_split</span></code></a> has been deprecated
regex_split (deprecated)"><tt class="computeroutput"><span class="identifier">regex_split</span></tt></a> has been deprecated in favor of the iterator <a href="../regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> which has
in favor of the iterator <a href="../regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> which has
a more flexible and powerful interface, as well as following the more usual a more flexible and powerful interface, as well as following the more usual
standard library "pull" rather than "push" semantics. standard library "pull" rather than "push" semantics.
</p> </p>
<p> <p>
Code which uses <a href="regex_split.html" title=" Code which uses <a href="regex_split.html" title="regex_split (deprecated)"><code class="computeroutput"><span class="identifier">regex_split</span></code></a> will continue to compile,
regex_split (deprecated)"><tt class="computeroutput"><span class="identifier">regex_split</span></tt></a> will continue to compile,
the following documentation is taken from a previous Boost.Regex version: the following documentation is taken from a previous Boost.Regex version:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre> </pre>
<p> <p>
Algorithm <a href="regex_split.html" title=" Algorithm <a href="regex_split.html" title="regex_split (deprecated)"><code class="computeroutput"><span class="identifier">regex_split</span></code></a> performs a similar
regex_split (deprecated)"><tt class="computeroutput"><span class="identifier">regex_split</span></tt></a> performs a similar
operation to the perl split operation, and comes in three overloaded forms: operation to the perl split operation, and comes in three overloaded forms:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits2</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits2</span><span class="special">&gt;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">regex_split</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">regex_split</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits1</span><span class="special">,</span> <span class="identifier">Alloc1</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits1</span><span class="special">,</span> <span class="identifier">Alloc1</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits2</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits2</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
@ -69,7 +61,7 @@
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits1</span><span class="special">,</span> <span class="identifier">Alloc1</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits1</span><span class="special">,</span> <span class="identifier">Alloc1</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Each version of the algorithm <span class="bold"><strong>Effects</strong></span>: Each version of the algorithm
takes an output-iterator for output, and a string for input. If the expression takes an output-iterator for output, and a string for input. If the expression
contains no marked sub-expressions, then the algorithm writes one string contains no marked sub-expressions, then the algorithm writes one string
onto the output-iterator for each section of input that does not match onto the output-iterator for each section of input that does not match
@ -80,11 +72,11 @@
processed will be deleted from the string <span class="emphasis"><em>s</em></span> (if <span class="emphasis"><em>max_split</em></span> processed will be deleted from the string <span class="emphasis"><em>s</em></span> (if <span class="emphasis"><em>max_split</em></span>
is not reached then all of <span class="emphasis"><em>s</em></span> will be deleted). Returns is not reached then all of <span class="emphasis"><em>s</em></span> will be deleted). Returns
the number of strings written to the output-iterator. If the parameter the number of strings written to the output-iterator. If the parameter
<span class="emphasis"><em>max_split</em></span> is not specified then it defaults to <tt class="computeroutput"><span class="identifier">UINT_MAX</span></tt>. If no expression is specified, <span class="emphasis"><em>max_split</em></span> is not specified then it defaults to <code class="computeroutput"><span class="identifier">UINT_MAX</span></code>. If no expression is specified,
then it defaults to "\s+", and splitting occurs on whitespace. then it defaults to "\s+", and splitting occurs on whitespace.
</p> </p>
<p> <p>
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> <span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if the complexity of matching the expression against an N character string if the complexity of matching the expression against an N character string
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while
matching the expression (if Boost.Regex is configured in recursive mode), matching the expression (if Boost.Regex is configured in recursive mode),
@ -92,12 +84,11 @@
is configured in non-recursive mode). is configured in non-recursive mode).
</p> </p>
<p> <p>
<span class="bold"><b>Example</b></span>: the following function will split <span class="bold"><strong>Example</strong></span>: the following function will split
the input string into a series of tokens, and remove each token from the the input string into a series of tokens, and remove each token from the
string <span class="emphasis"><em>s</em></span>: string <span class="emphasis"><em>s</em></span>:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">unsigned</span> <span class="identifier">tokenise</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;&amp;</span> <span class="identifier">l</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">)</span>
<span class="keyword">unsigned</span> <span class="identifier">tokenise</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;&amp;</span> <span class="identifier">l</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">)</span>
<span class="special">{</span> <span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_split</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">l</span><span class="special">),</span> <span class="identifier">s</span><span class="special">);</span> <span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_split</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">l</span><span class="special">),</span> <span class="identifier">s</span><span class="special">);</span>
<span class="special">}</span> <span class="special">}</span>
@ -106,8 +97,7 @@
Example: the following short program will extract all of the URL's from Example: the following short program will extract all of the URL's from
a html file, and print them out to cout: a html file, and print them out to cout:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">list</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">list</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">fstream</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">fstream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@ -159,10 +149,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> error_type</title> <title>error_type</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="match_flag_type.html" title=" match_flag_type"> <link rel="prev" href="match_flag_type.html" title="match_flag_type">
<link rel="next" href="regex_traits.html" title=" regex_traits"> <link rel="next" href="regex_traits.html" title="regex_traits">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,17 +24,17 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.error_type"></a><a href="error_type.html" title=" error_type"> error_type</a></h3></div></div></div> <a name="boost_regex.ref.error_type"></a><a href="error_type.html" title="error_type"> error_type</a>
<a name="boost_regex.ref.error_type.synopsis"></a><h4> </h3></div></div></div>
<a name="id569168"></a> <a name="boost_regex.ref.error_type.synopsis"></a><h5>
<a name="id602297"></a>
<a href="error_type.html#boost_regex.ref.error_type.synopsis">Synopsis</a> <a href="error_type.html#boost_regex.ref.error_type.synopsis">Synopsis</a>
</h4> </h5>
<p> <p>
Type error type represents the different types of errors that can be raised Type error type represents the different types of errors that can be raised
by the library when parsing a regular expression. by the library when parsing a regular expression.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">regex_constants</span><span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">regex_constants</span><span class="special">{</span>
<span class="keyword">typedef</span> <span class="identifier">implementation</span><span class="special">-</span><span class="identifier">specific</span><span class="special">-</span><span class="identifier">type</span> <span class="identifier">error_type</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">implementation</span><span class="special">-</span><span class="identifier">specific</span><span class="special">-</span><span class="identifier">type</span> <span class="identifier">error_type</span><span class="special">;</span>
@ -56,12 +56,12 @@
<span class="special">}</span> <span class="comment">// namespace regex_constants <span class="special">}</span> <span class="comment">// namespace regex_constants
</span><span class="special">}</span> <span class="comment">// namespace boost </span><span class="special">}</span> <span class="comment">// namespace boost
</span></pre> </span></pre>
<a name="boost_regex.ref.error_type.description"></a><h4> <a name="boost_regex.ref.error_type.description"></a><h5>
<a name="id569735"></a> <a name="id602860"></a>
<a href="error_type.html#boost_regex.ref.error_type.description">Description</a> <a href="error_type.html#boost_regex.ref.error_type.description">Description</a>
</h4> </h5>
<p> <p>
The type <tt class="computeroutput"><span class="identifier">error_type</span></tt> is an The type <code class="computeroutput"><span class="identifier">error_type</span></code> is an
implementation-specific enumeration type that may take one of the following implementation-specific enumeration type that may take one of the following
values: values:
</p> </p>
@ -257,10 +257,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> match_flag_type</title> <title>match_flag_type</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="syntax_option_type/syntax_option_type_literal.html" title=" <link rel="prev" href="syntax_option_type/syntax_option_type_literal.html" title="Options for Literal Strings">
Options for Literal Strings"> <link rel="next" href="error_type.html" title="error_type">
<link rel="next" href="error_type.html" title=" error_type">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,15 +24,15 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.match_flag_type"></a><a href="match_flag_type.html" title=" match_flag_type"> match_flag_type</a></h3></div></div></div> <a name="boost_regex.ref.match_flag_type"></a><a href="match_flag_type.html" title="match_flag_type"> match_flag_type</a>
</h3></div></div></div>
<p> <p>
The type <tt class="computeroutput"><span class="identifier">match_flag_type</span></tt> The type <code class="computeroutput"><span class="identifier">match_flag_type</span></code>
is an implementation specific bitmask type (see C++ std 17.3.2.1.2) that is an implementation specific bitmask type (see C++ std 17.3.2.1.2) that
controls how a regular expression is matched against a character sequence. controls how a regular expression is matched against a character sequence.
The behavior of the format flags is described in more detail in the <a href="../format.html" title=" Search and Replace Format String Syntax">format syntax guide</a>. The behavior of the format flags is described in more detail in the <a href="../format.html" title="Search and Replace Format String Syntax">format syntax guide</a>.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">regex_constants</span><span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">regex_constants</span><span class="special">{</span>
<span class="keyword">typedef</span> <span class="identifier">implemenation</span><span class="special">-</span><span class="identifier">specific</span><span class="special">-</span><span class="identifier">bitmask</span><span class="special">-</span><span class="identifier">type</span> <span class="identifier">match_flag_type</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">implemenation</span><span class="special">-</span><span class="identifier">specific</span><span class="special">-</span><span class="identifier">bitmask</span><span class="special">-</span><span class="identifier">type</span> <span class="identifier">match_flag_type</span><span class="special">;</span>
@ -69,12 +68,12 @@
<span class="special">}</span> <span class="comment">// namespace regex_constants <span class="special">}</span> <span class="comment">// namespace regex_constants
</span><span class="special">}</span> <span class="comment">// namespace boost </span><span class="special">}</span> <span class="comment">// namespace boost
</span></pre> </span></pre>
<a name="boost_regex.ref.match_flag_type.description"></a><h4> <a name="boost_regex.ref.match_flag_type.description"></a><h5>
<a name="id568392"></a> <a name="id601531"></a>
<a href="match_flag_type.html#boost_regex.ref.match_flag_type.description">Description</a> <a href="match_flag_type.html#boost_regex.ref.match_flag_type.description">Description</a>
</h4> </h5>
<p> <p>
The type <tt class="computeroutput"><span class="identifier">match_flag_type</span></tt> The type <code class="computeroutput"><span class="identifier">match_flag_type</span></code>
is an implementation specific bitmask type (see C++ std 17.3.2.1.2). When is an implementation specific bitmask type (see C++ std 17.3.2.1.2). When
matching a regular expression against a sequence of characters [first, last) matching a regular expression against a sequence of characters [first, last)
then setting its elements has the effects listed in the table below: then setting its elements has the effects listed in the table below:
@ -314,7 +313,7 @@
</td> </td>
<td> <td>
<p> <p>
Specified that the expression "." does not match a character Specifies that the expression "." does not match a character
null '\0'. null '\0'.
</p> </p>
</td> </td>
@ -328,8 +327,7 @@
<td> <td>
<p> <p>
Specifies that the expression should be matched according to the Specifies that the expression should be matched according to the
POSIX <a href="../syntax/leftmost_longest_rule.html" title=" The Leftmost POSIX <a href="../syntax/leftmost_longest_rule.html" title="The Leftmost Longest Rule">leftmost-longest
Longest Rule">leftmost-longest
rule</a>, regardless of what kind of expression was compiled. rule</a>, regardless of what kind of expression was compiled.
Be warned that these rules do not work well with many Perl-specific Be warned that these rules do not work well with many Perl-specific
features such as non-greedy repeats. features such as non-greedy repeats.
@ -360,7 +358,7 @@
<td> <td>
<p> <p>
Makes the expression behave as if it had no marked subexpressions, Makes the expression behave as if it had no marked subexpressions,
no matter how many capturing groups are actually present. The <a href="match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> no matter how many capturing groups are actually present. The <a href="match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>
class will only contain information about the overall match, and class will only contain information about the overall match, and
not any sub-expressions. not any sub-expressions.
</p> </p>
@ -380,7 +378,7 @@
Specification, Chapter 15 part 5.4.11 String.prototype.replace. (FWD.1). Specification, Chapter 15 part 5.4.11 String.prototype.replace. (FWD.1).
</p> </p>
<p> <p>
This is functionally identical to the <a href="../format/perl_format.html" title=" Perl Format String Syntax">Perl This is functionally identical to the <a href="../format/perl_format.html" title="Perl Format String Syntax">Perl
format string rules</a>. format string rules</a>.
</p> </p>
<p> <p>
@ -402,7 +400,7 @@
Specifies that when a regular expression match is to be replaced Specifies that when a regular expression match is to be replaced
by a new string, that the new string is constructed using the rules by a new string, that the new string is constructed using the rules
used by the Unix sed utility in IEEE Std 1003.1-2001, Portable Operating used by the Unix sed utility in IEEE Std 1003.1-2001, Portable Operating
SystemInterface (POSIX ), Shells and Utilities. See also the <a href="../format/sed_format.html" title=" Sed Format String Syntax">Sed Format string reference</a>. SystemInterface (POSIX ), Shells and Utilities. See also the <a href="../format/sed_format.html" title="Sed Format String Syntax">Sed Format string reference</a>.
</p> </p>
</td> </td>
</tr> </tr>
@ -415,7 +413,7 @@
<td> <td>
<p> <p>
Specifies that when a regular expression match is to be replaced Specifies that when a regular expression match is to be replaced
by a new string, that the new string is constructed using <a href="../format/perl_format.html" title=" Perl Format String Syntax">the by a new string, that the new string is constructed using <a href="../format/perl_format.html" title="Perl Format String Syntax">the
same rules as Perl 5</a>. same rules as Perl 5</a>.
</p> </p>
</td> </td>
@ -428,7 +426,7 @@
</td> </td>
<td> <td>
<p> <p>
Specified that when a regular expression match is to be replaced Specifies that when a regular expression match is to be replaced
by a new string, that the new string is a literal copy of the replacement by a new string, that the new string is a literal copy of the replacement
text. text.
</p> </p>
@ -443,8 +441,7 @@
<td> <td>
<p> <p>
Specifies that all syntax extensions are enabled, including conditional Specifies that all syntax extensions are enabled, including conditional
(?ddexpression1:expression2) replacements: see the <a href="../format/boost_format_syntax.html" title=" Boost-Extended (?ddexpression1:expression2) replacements: see the <a href="../format/boost_format_syntax.html" title="Boost-Extended Format String Syntax">format
Format String Syntax">format
string guide</a> for more details. string guide</a> for more details.
</p> </p>
</td> </td>
@ -481,10 +478,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> match_results</title> <title>match_results</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="basic_regex.html" title=" basic_regex"> <link rel="prev" href="basic_regex.html" title="basic_regex">
<link rel="next" href="sub_match.html" title=" sub_match"> <link rel="next" href="sub_match.html" title="sub_match">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,45 +24,44 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.match_results"></a><a href="match_results.html" title=" match_results"> match_results</a></h3></div></div></div> <a name="boost_regex.ref.match_results"></a><a href="match_results.html" title="match_results"> match_results</a>
<a name="boost_regex.ref.match_results.synopsis"></a><h4> </h3></div></div></div>
<a name="id498310"></a> <a name="boost_regex.ref.match_results.synopsis"></a><h5>
<a name="id531997"></a>
<a href="match_results.html#boost_regex.ref.match_results.synopsis">Synopsis</a> <a href="match_results.html#boost_regex.ref.match_results.synopsis">Synopsis</a>
</h4> </h5>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre> </pre>
<p> <p>
Regular expressions are different from many simple pattern-matching algorithms Regular expressions are different from many simple pattern-matching algorithms
in that as well as finding an overall match they can also produce sub-expression in that as well as finding an overall match they can also produce sub-expression
matches: each sub-expression being delimited in the pattern by a pair of matches: each sub-expression being delimited in the pattern by a pair of
parenthesis (...). There has to be some method for reporting sub-expression parenthesis (...). There has to be some method for reporting sub-expression
matches back to the user: this is achieved this by defining a class <tt class="computeroutput"><span class="identifier">match_results</span></tt> that acts as an indexed collection matches back to the user: this is achieved this by defining a class <code class="computeroutput"><span class="identifier">match_results</span></code> that acts as an indexed collection
of sub-expression matches, each sub-expression match being contained in an of sub-expression matches, each sub-expression match being contained in an
object of type <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a>. object of type <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>.
</p> </p>
<p> <p>
Template class <tt class="computeroutput"><span class="identifier">match_results</span></tt> Template class <code class="computeroutput"><span class="identifier">match_results</span></code>
denotes a collection of character sequences representing the result of a denotes a collection of character sequences representing the result of a
regular expression match. Objects of type <tt class="computeroutput"><span class="identifier">match_results</span></tt> regular expression match. Objects of type <code class="computeroutput"><span class="identifier">match_results</span></code>
are passed to the algorithms <a href="regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a> and <a href="regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>, and are returned by are passed to the algorithms <a href="regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a> and <a href="regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>, and are returned by
the iterator <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a>. Storage for the the iterator <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>. Storage for the
collection is allocated and freed as necessary by the member functions of collection is allocated and freed as necessary by the member functions of
class <tt class="computeroutput"><span class="identifier">match_results</span></tt>. class <code class="computeroutput"><span class="identifier">match_results</span></code>.
</p> </p>
<p> <p>
The template class <tt class="computeroutput"><span class="identifier">match_results</span></tt> The template class <code class="computeroutput"><span class="identifier">match_results</span></code>
conforms to the requirements of a Sequence, as specified in (lib.sequence.reqmts), conforms to the requirements of a Sequence, as specified in (lib.sequence.reqmts),
except that only operations defined for const-qualified Sequences are supported. except that only operations defined for const-qualified Sequences are supported.
</p> </p>
<p> <p>
Class template <tt class="computeroutput"><span class="identifier">match_results</span></tt> Class template <code class="computeroutput"><span class="identifier">match_results</span></code>
is most commonly used as one of the typedefs <tt class="computeroutput"><span class="identifier">cmatch</span></tt>, is most commonly used as one of the typedefs <code class="computeroutput"><span class="identifier">cmatch</span></code>,
<tt class="computeroutput"><span class="identifier">wcmatch</span></tt>, <tt class="computeroutput"><span class="identifier">smatch</span></tt>, <code class="computeroutput"><span class="identifier">wcmatch</span></code>, <code class="computeroutput"><span class="identifier">smatch</span></code>,
or <tt class="computeroutput"><span class="identifier">wsmatch</span></tt>: or <code class="computeroutput"><span class="identifier">wsmatch</span></code>:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
<span class="keyword">class</span> <span class="identifier">Allocator</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">sub_match</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">Allocator</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">sub_match</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span> <span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">match_results</span><span class="special">;</span> <span class="keyword">class</span> <span class="identifier">match_results</span><span class="special">;</span>
@ -142,23 +141,22 @@
<span class="keyword">void</span> <a href="match_results.html#boost_regex.match_results.op_swap">swap</a><span class="special">(</span><span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m1</span><span class="special">,</span> <span class="keyword">void</span> <a href="match_results.html#boost_regex.match_results.op_swap">swap</a><span class="special">(</span><span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m1</span><span class="special">,</span>
<span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m2</span><span class="special">);</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m2</span><span class="special">);</span>
</pre> </pre>
<a name="boost_regex.ref.match_results.description"></a><h4> <a name="boost_regex.ref.match_results.description"></a><h5>
<a name="id501232"></a> <a name="id534900"></a>
<a href="match_results.html#boost_regex.ref.match_results.description">Description</a> <a href="match_results.html#boost_regex.ref.match_results.description">Description</a>
</h4> </h5>
<p> <p>
In all <tt class="computeroutput"><span class="identifier">match_results</span></tt> constructors, In all <code class="computeroutput"><span class="identifier">match_results</span></code> constructors,
a copy of the Allocator argument is used for any memory allocation performed a copy of the Allocator argument is used for any memory allocation performed
by the constructor or member functions during the lifetime of the object. by the constructor or member functions during the lifetime of the object.
</p> </p>
<a name="boost_regex.match_results.construct"></a><p> <a name="boost_regex.match_results.construct"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">match_results</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Allocator</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">Allocator</span><span class="special">());</span>
<span class="identifier">match_results</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Allocator</span><span class="special">&amp;</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">Allocator</span><span class="special">());</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Constructs an object of class <span class="bold"><strong>Effects</strong></span>: Constructs an object of class
<tt class="computeroutput"><span class="identifier">match_results</span></tt>. The postconditions <code class="computeroutput"><span class="identifier">match_results</span></code>. The postconditions
of this function are indicated in the table: of this function are indicated in the table:
</p> </p>
<div class="informaltable"><table class="table"> <div class="informaltable"><table class="table">
@ -219,20 +217,18 @@
</table></div> </table></div>
<a name="boost_regex.match_results.copy_construct"></a><p> <a name="boost_regex.match_results.copy_construct"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">match_results</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&amp;</span> <span class="identifier">m</span><span class="special">);</span>
<span class="identifier">match_results</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&amp;</span> <span class="identifier">m</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Constructs an object of class match_results, <span class="bold"><strong>Effects</strong></span>: Constructs an object of class match_results,
as a copy of m. as a copy of m.
</p> </p>
<a name="boost_regex.match_results.assign"></a><p> <a name="boost_regex.match_results.assign"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">match_results</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&amp;</span> <span class="identifier">m</span><span class="special">);</span>
<span class="identifier">match_results</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&amp;</span> <span class="identifier">m</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Assigns m to *this. The postconditions <span class="bold"><strong>Effects</strong></span>: Assigns m to *this. The postconditions
of this function are indicated in the table: of this function are indicated in the table:
</p> </p>
<div class="informaltable"><table class="table"> <div class="informaltable"><table class="table">
@ -353,218 +349,201 @@
</table></div> </table></div>
<a name="boost_regex.match_results.size"></a><p> <a name="boost_regex.match_results.size"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">size_type</span> <span class="identifier">size</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
<span class="identifier">size_type</span> <span class="identifier">size</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns the number of <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> elements stored in *this; <span class="bold"><strong>Effects</strong></span>: Returns the number of <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a> elements stored in *this;
that is the number of marked sub-expressions in the regular expression that that is the number of marked sub-expressions in the regular expression that
was matched plus one. was matched plus one.
</p> </p>
<a name="boost_regex.match_results.max_size"></a><p> <a name="boost_regex.match_results.max_size"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">size_type</span> <span class="identifier">max_size</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
<span class="identifier">size_type</span> <span class="identifier">max_size</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns the maximum number of <span class="bold"><strong>Effects</strong></span>: Returns the maximum number of
<a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
elements that can be stored in *this. elements that can be stored in *this.
</p> </p>
<a name="boost_regex.match_results.empty"></a><p> <a name="boost_regex.match_results.empty"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">empty</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
<span class="keyword">bool</span> <span class="identifier">empty</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns size() == 0. <span class="bold"><strong>Effects</strong></span>: Returns size() == 0.
</p> </p>
<a name="boost_regex.match_results.length"></a><p> <a name="boost_regex.match_results.length"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">difference_type</span> <span class="identifier">length</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
<span class="identifier">difference_type</span> <span class="identifier">length</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns the length of sub-expression <span class="bold"><strong>Effects</strong></span>: Returns the length of sub-expression
<span class="emphasis"><em>sub</em></span>, that is to say: <tt class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">sub</span><span class="special">].</span><span class="identifier">length</span><span class="special">()</span></tt>. <span class="emphasis"><em>sub</em></span>, that is to say: <code class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">sub</span><span class="special">].</span><span class="identifier">length</span><span class="special">()</span></code>.
</p> </p>
<a name="boost_regex.match_results.position"></a><p> <a name="boost_regex.match_results.position"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">difference_type</span> <span class="identifier">position</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
<span class="identifier">difference_type</span> <span class="identifier">position</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns the starting location of <span class="bold"><strong>Effects</strong></span>: Returns the starting location of
sub-expression <span class="emphasis"><em>sub</em></span>, or -1 if <span class="emphasis"><em>sub</em></span> sub-expression <span class="emphasis"><em>sub</em></span>, or -1 if <span class="emphasis"><em>sub</em></span>
was not matched. Note that if this represents a partial match , then <tt class="computeroutput"><span class="identifier">position</span><span class="special">()</span></tt> was not matched. Note that if this represents a partial match , then <code class="computeroutput"><span class="identifier">position</span><span class="special">()</span></code>
will return the location of the partial match even though <tt class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></tt> will return the location of the partial match even though <code class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></code>
is false. is false.
</p> </p>
<a name="boost_regex.match_results.str"></a><p> <a name="boost_regex.match_results.str"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">string_type</span> <span class="identifier">str</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
<span class="identifier">string_type</span> <span class="identifier">str</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns sub-expression <span class="emphasis"><em>sub</em></span> <span class="bold"><strong>Effects</strong></span>: Returns sub-expression <span class="emphasis"><em>sub</em></span>
as a string: <tt class="computeroutput"><span class="identifier">string_type</span><span class="special">((*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">sub</span><span class="special">])</span></tt>. as a string: <code class="computeroutput"><span class="identifier">string_type</span><span class="special">((*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">sub</span><span class="special">])</span></code>.
</p> </p>
<a name="boost_regex.match_results.subscript"></a><p> <a name="boost_regex.match_results.subscript"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">const_reference</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="identifier">const_reference</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns a reference to the <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> <span class="bold"><strong>Effects</strong></span>: Returns a reference to the <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
object representing the character sequence that matched marked sub-expression object representing the character sequence that matched marked sub-expression
<span class="emphasis"><em>n</em></span>. If <tt class="computeroutput"><span class="identifier">n</span> <span class="special">==</span> <span class="number">0</span></tt> then returns <span class="emphasis"><em>n</em></span>. If <code class="computeroutput"><span class="identifier">n</span> <span class="special">==</span> <span class="number">0</span></code> then returns
a reference to a <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> object representing the a reference to a <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a> object representing the
character sequence that matched the whole regular expression. If <span class="emphasis"><em>n</em></span> character sequence that matched the whole regular expression. If <span class="emphasis"><em>n</em></span>
is out of range, or if <span class="emphasis"><em>n</em></span> is an unmatched sub-expression, is out of range, or if <span class="emphasis"><em>n</em></span> is an unmatched sub-expression,
then returns a <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> then returns a <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
object whose matched member is false. object whose matched member is false.
</p> </p>
<a name="boost_regex.match_results.prefix"></a><p> <a name="boost_regex.match_results.prefix"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">const_reference</span> <span class="identifier">prefix</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
<span class="identifier">const_reference</span> <span class="identifier">prefix</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns a reference to the <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> <span class="bold"><strong>Effects</strong></span>: Returns a reference to the <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
object representing the character sequence from the start of the string being object representing the character sequence from the start of the string being
matched or searched, to the start of the match found. matched or searched, to the start of the match found.
</p> </p>
<a name="boost_regex.match_results.suffix"></a><p> <a name="boost_regex.match_results.suffix"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">const_reference</span> <span class="identifier">suffix</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
<span class="identifier">const_reference</span> <span class="identifier">suffix</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns a reference to the <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> <span class="bold"><strong>Effects</strong></span>: Returns a reference to the <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
object representing the character sequence from the end of the match found object representing the character sequence from the end of the match found
to the end of the string being matched or searched. to the end of the string being matched or searched.
</p> </p>
<a name="boost_regex.match_results.begin"></a><p> <a name="boost_regex.match_results.begin"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">const_iterator</span> <span class="identifier">begin</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
<span class="identifier">const_iterator</span> <span class="identifier">begin</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns a starting iterator that <span class="bold"><strong>Effects</strong></span>: Returns a starting iterator that
enumerates over all the marked sub-expression matches stored in *this. enumerates over all the marked sub-expression matches stored in *this.
</p> </p>
<a name="boost_regex.match_results.end"></a><p> <a name="boost_regex.match_results.end"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">const_iterator</span> <span class="identifier">end</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
<span class="identifier">const_iterator</span> <span class="identifier">end</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns a terminating iterator <span class="bold"><strong>Effects</strong></span>: Returns a terminating iterator
that enumerates over all the marked sub-expression matches stored in *this. that enumerates over all the marked sub-expression matches stored in *this.
</p> </p>
<a name="boost_regex.match_results_format"></a><a name="boost_regex.match_results.format"></a><p> <a name="boost_regex.match_results_format"></a><a name="boost_regex.match_results.format"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">&gt;</span>
<span class="identifier">OutputIterator</span> <span class="identifier">format</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">OutputIterator</span> <span class="identifier">format</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">string_type</span><span class="special">&amp;</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span><span class="special">&amp;</span> <span class="identifier">fmt</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Requires</b></span>: The type <tt class="computeroutput"><span class="identifier">OutputIterator</span></tt> <span class="bold"><strong>Requires</strong></span>: The type <code class="computeroutput"><span class="identifier">OutputIterator</span></code>
conforms to the Output Iterator requirements (C++ std 24.1.2). conforms to the Output Iterator requirements (C++ std 24.1.2).
</p> </p>
<p> <p>
<span class="bold"><b>Effects</b></span>: Copies the character sequence <span class="bold"><strong>Effects</strong></span>: Copies the character sequence
<tt class="computeroutput"><span class="special">[</span><span class="identifier">fmt</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">fmt</span><span class="special">.</span><span class="identifier">end</span><span class="special">())</span></tt> <code class="computeroutput"><span class="special">[</span><span class="identifier">fmt</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">fmt</span><span class="special">.</span><span class="identifier">end</span><span class="special">())</span></code>
to <tt class="computeroutput"><span class="identifier">OutputIterator</span></tt> <span class="emphasis"><em>out</em></span>. to <code class="computeroutput"><span class="identifier">OutputIterator</span></code> <span class="emphasis"><em>out</em></span>.
For each format specifier or escape sequence in <span class="emphasis"><em>fmt</em></span>, For each format specifier or escape sequence in <span class="emphasis"><em>fmt</em></span>,
replace that sequence with either the character(s) it represents, or the replace that sequence with either the character(s) it represents, or the
sequence of characters within <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt> to which it refers. The bitmasks specified sequence of characters within <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> to which it refers. The bitmasks specified
in flags determines what format specifiers or escape sequences are recognized, in flags determines what format specifiers or escape sequences are recognized,
by default this is the format used by ECMA-262, ECMAScript Language Specification, by default this is the format used by ECMA-262, ECMAScript Language Specification,
Chapter 15 part 5.4.11 String.prototype.replace. Chapter 15 part 5.4.11 String.prototype.replace.
</p> </p>
<p> <p>
See the <a href="../format.html" title=" Search and Replace Format String Syntax">format syntax guide for more information</a>. See the <a href="../format.html" title="Search and Replace Format String Syntax">format syntax guide for more information</a>.
</p> </p>
<p> <p>
<span class="bold"><b>Returns</b></span>: out. <span class="bold"><strong>Returns</strong></span>: out.
</p> </p>
<a name="boost_regex.match_results.format2"></a><p> <a name="boost_regex.match_results.format2"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">string_type</span> <span class="identifier">format</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">string_type</span><span class="special">&amp;</span> <span class="identifier">fmt</span><span class="special">,</span>
<span class="identifier">string_type</span> <span class="identifier">format</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">string_type</span><span class="special">&amp;</span> <span class="identifier">fmt</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns a copy of the string <span class="emphasis"><em>fmt</em></span>. <span class="bold"><strong>Effects</strong></span>: Returns a copy of the string <span class="emphasis"><em>fmt</em></span>.
For each format specifier or escape sequence in <span class="emphasis"><em>fmt</em></span>, For each format specifier or escape sequence in <span class="emphasis"><em>fmt</em></span>,
replace that sequence with either the character(s) it represents, or the replace that sequence with either the character(s) it represents, or the
sequence of characters within <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt> to which it refers. The bitmasks specified sequence of characters within <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> to which it refers. The bitmasks specified
in flags determines what format specifiers or escape sequences are recognized, in flags determines what format specifiers or escape sequences are recognized,
by default this is the format used by ECMA-262, ECMAScript Language Specification, by default this is the format used by ECMA-262, ECMAScript Language Specification,
Chapter 15 part 5.4.11 String.prototype.replace. Chapter 15 part 5.4.11 String.prototype.replace.
</p> </p>
<p> <p>
See the <a href="../format.html" title=" Search and Replace Format String Syntax">format syntax guide for more information</a>. See the <a href="../format.html" title="Search and Replace Format String Syntax">format syntax guide for more information</a>.
</p> </p>
<a name="boost_regex.match_results.get_allocator"></a><p> <a name="boost_regex.match_results.get_allocator"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">allocator_type</span> <span class="identifier">get_allocator</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
<span class="identifier">allocator_type</span> <span class="identifier">get_allocator</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns a copy of the Allocator <span class="bold"><strong>Effects</strong></span>: Returns a copy of the Allocator
that was passed to the object's constructor. that was passed to the object's constructor.
</p> </p>
<a name="boost_regex.match_results.swap"></a><p> <a name="boost_regex.match_results.swap"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">match_results</span><span class="special">&amp;</span> <span class="identifier">that</span><span class="special">);</span>
<span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">match_results</span><span class="special">&amp;</span> <span class="identifier">that</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Swaps the contents of the two sequences. <span class="bold"><strong>Effects</strong></span>: Swaps the contents of the two sequences.
</p> </p>
<p> <p>
<span class="bold"><b>Postcondition</b></span>: *this contains the sequence <span class="bold"><strong>Postcondition</strong></span>: *this contains the sequence
of matched sub-expressions that were in that, that contains the sequence of matched sub-expressions that were in that, that contains the sequence
of matched sub-expressions that were in *this. of matched sub-expressions that were in *this.
</p> </p>
<p> <p>
<span class="bold"><b>Complexity</b></span>: constant time. <span class="bold"><strong>Complexity</strong></span>: constant time.
</p> </p>
<a name="boost_regex.match_results.capture_type"></a><p> <a name="boost_regex.match_results.capture_type"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">value_type</span><span class="special">::</span><span class="identifier">capture_sequence_type</span> <span class="identifier">capture_sequence_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">value_type</span><span class="special">::</span><span class="identifier">capture_sequence_type</span> <span class="identifier">capture_sequence_type</span><span class="special">;</span>
</pre> </pre>
<p> <p>
Defines an implementation-specific type that satisfies the requirements of Defines an implementation-specific type that satisfies the requirements of
a standard library Sequence (21.1.1 including the optional Table 68 operations), a standard library Sequence (21.1.1 including the optional Table 68 operations),
whose value_type is a <tt class="computeroutput"><span class="identifier">sub_match</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span></tt>. This type happens to be <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">sub_match</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span> <span class="special">&gt;</span></tt>, whose value_type is a <code class="computeroutput"><span class="identifier">sub_match</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span></code>. This type happens to be <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">sub_match</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span> <span class="special">&gt;</span></code>,
but you shouldn't actually rely on that. but you shouldn't actually rely on that.
</p> </p>
<a name="boost_regex.match_results.captures"></a><p> <a name="boost_regex.match_results.captures"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">const</span> <span class="identifier">capture_sequence_type</span><span class="special">&amp;</span> <span class="identifier">captures</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
<span class="keyword">const</span> <span class="identifier">capture_sequence_type</span><span class="special">&amp;</span> <span class="identifier">captures</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns a sequence containing all <span class="bold"><strong>Effects</strong></span>: returns a sequence containing all
the captures obtained for sub-expression i. the captures obtained for sub-expression i.
</p> </p>
<p> <p>
<span class="bold"><b>Returns</b></span>: <tt class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">i</span><span class="special">].</span><span class="identifier">captures</span><span class="special">();</span></tt> <span class="bold"><strong>Returns</strong></span>: <code class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">i</span><span class="special">].</span><span class="identifier">captures</span><span class="special">();</span></code>
</p> </p>
<p> <p>
<span class="bold"><b>Preconditions</b></span>: the library must be built <span class="bold"><strong>Preconditions</strong></span>: the library must be built
and used with BOOST_REGEX_MATCH_EXTRA defined, and you must pass the flag and used with BOOST_REGEX_MATCH_EXTRA defined, and you must pass the flag
match_extra to the regex matching functions ( <a href="regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>, <a href="regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>, <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> or <a href="regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a>) in order for match_extra to the regex matching functions ( <a href="regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>, <a href="regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>, <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> or <a href="regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a>) in order for
this member function to be defined and return useful information. this member function to be defined and return useful information.
</p> </p>
<p> <p>
<span class="bold"><b>Rationale</b></span>: Enabling this feature has several <span class="bold"><strong>Rationale</strong></span>: Enabling this feature has several
consequences: consequences:
</p> </p>
<div class="itemizedlist"><ul type="disc"> <div class="itemizedlist"><ul type="disc">
@ -584,57 +563,54 @@
</ul></div> </ul></div>
<a name="boost_regex.match_results.op_eq"></a><p> <a name="boost_regex.match_results.op_eq"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m1</span><span class="special">,</span> <span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m1</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m2</span><span class="special">);</span> <span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m2</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Compares the two sequences for <span class="bold"><strong>Effects</strong></span>: Compares the two sequences for
equality. equality.
</p> </p>
<a name="boost_regex.match_results.op_ne"></a><p> <a name="boost_regex.match_results.op_ne"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m1</span><span class="special">,</span> <span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m1</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m2</span><span class="special">);</span> <span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m2</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Compares the two sequences for <span class="bold"><strong>Effects</strong></span>: Compares the two sequences for
inequality. inequality.
</p> </p>
<a name="boost_regex.match_results.op_stream"></a><p> <a name="boost_regex.match_results.op_stream"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
<span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span>
<span class="keyword">operator</span> <span class="special">&lt;&lt;</span> <span class="special">(</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">operator</span> <span class="special">&lt;&lt;</span> <span class="special">(</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">os</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">);</span> <span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Writes the contents of <span class="emphasis"><em>m</em></span> <span class="bold"><strong>Effects</strong></span>: Writes the contents of <span class="emphasis"><em>m</em></span>
to the stream <span class="emphasis"><em>os</em></span> as if by calling <tt class="computeroutput"><span class="identifier">os</span> to the stream <span class="emphasis"><em>os</em></span> as if by calling <code class="computeroutput"><span class="identifier">os</span>
<span class="special">&lt;&lt;</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">str</span><span class="special">()</span></tt>; <span class="special">&lt;&lt;</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">str</span><span class="special">()</span></code>;
Returns <span class="emphasis"><em>os</em></span>. Returns <span class="emphasis"><em>os</em></span>.
</p> </p>
<a name="boost_regex.match_results.op_swap"></a><p> <a name="boost_regex.match_results.op_swap"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
<span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m1</span><span class="special">,</span> <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m1</span><span class="special">,</span>
<span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m2</span><span class="special">);</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m2</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Swaps the contents of the two sequences. <span class="bold"><strong>Effects</strong></span>: Swaps the contents of the two sequences.
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,23 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Interfacing With Non-Standard <title>Interfacing With Non-Standard String Types</title>
String Types</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="regex_traits.html" title=" regex_traits"> <link rel="prev" href="regex_traits.html" title="regex_traits">
<link rel="next" href="non_std_strings/icu.html" title=" Working With <link rel="next" href="non_std_strings/icu.html" title="Working With Unicode and ICU String Types">
Unicode and ICU String Types">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.non_std_strings"></a><a href="non_std_strings.html" title=" Interfacing With Non-Standard <a name="boost_regex.ref.non_std_strings"></a><a href="non_std_strings.html" title="Interfacing With Non-Standard String Types"> Interfacing With Non-Standard
String Types"> Interfacing With Non-Standard String Types</a>
String Types</a></h3></div></div></div> </h3></div></div></div>
<div class="toc"><dl> <div class="toc"><dl>
<dt><span class="section"><a href="non_std_strings/icu.html"> Working With <dt><span class="section"><a href="non_std_strings/icu.html"> Working With
Unicode and ICU String Types</a></span></dt> Unicode and ICU String Types</a></span></dt>
@ -72,15 +70,14 @@
been provided for them already: currently this includes the ICU and MFC string been provided for them already: currently this includes the ICU and MFC string
class types. class types.
</p> </p>
<p>
</p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,25 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Working With <title>Working With Unicode and ICU String Types</title>
Unicode and ICU String Types</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../non_std_strings.html" title=" Interfacing With Non-Standard <link rel="up" href="../non_std_strings.html" title="Interfacing With Non-Standard String Types">
String Types"> <link rel="prev" href="../non_std_strings.html" title="Interfacing With Non-Standard String Types">
<link rel="prev" href="../non_std_strings.html" title=" Interfacing With Non-Standard <link rel="next" href="icu/intro.html" title="Introduction to using Regex with ICU">
String Types">
<link rel="next" href="icu/intro.html" title=" Introduction
to using Regex with ICU">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -28,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.non_std_strings.icu"></a><a href="icu.html" title=" Working With <a name="boost_regex.ref.non_std_strings.icu"></a><a href="icu.html" title="Working With Unicode and ICU String Types"> Working With
Unicode and ICU String Types"> Working With Unicode and ICU String Types</a>
Unicode and ICU String Types</a></h4></div></div></div> </h4></div></div></div>
<div class="toc"><dl> <div class="toc"><dl>
<dt><span class="section"><a href="icu/intro.html"> Introduction <dt><span class="section"><a href="icu/intro.html"> Introduction
to using Regex with ICU</a></span></dt> to using Regex with ICU</a></span></dt>
@ -44,10 +40,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,25 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Introduction <title>Introduction to using Regex with ICU</title>
to using Regex with ICU</title>
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../../index.html" title="Boost.Regex">
<link rel="up" href="../icu.html" title=" Working With <link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
Unicode and ICU String Types"> <link rel="prev" href="../icu.html" title="Working With Unicode and ICU String Types">
<link rel="prev" href="../icu.html" title=" Working With <link rel="next" href="unicode_types.html" title="Unicode regular expression types">
Unicode and ICU String Types">
<link rel="next" href="unicode_types.html" title="
Unicode regular expression types">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -28,14 +24,13 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title"> <div class="titlepage"><div><div><h5 class="title">
<a name="boost_regex.ref.non_std_strings.icu.intro"></a><a href="intro.html" title=" Introduction <a name="boost_regex.ref.non_std_strings.icu.intro"></a><a href="intro.html" title="Introduction to using Regex with ICU"> Introduction
to using Regex with ICU"> Introduction to using Regex with ICU</a>
to using Regex with ICU</a></h5></div></div></div> </h5></div></div></div>
<p> <p>
The header: The header:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre> </pre>
<p> <p>
contains the data types and algorithms necessary for working with regular contains the data types and algorithms necessary for working with regular
@ -67,10 +62,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,25 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Unicode Regular Expression Algorithms</title>
Unicode Regular Expression Algorithms</title>
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../../index.html" title="Boost.Regex">
<link rel="up" href="../icu.html" title=" Working With <link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
Unicode and ICU String Types"> <link rel="prev" href="unicode_types.html" title="Unicode regular expression types">
<link rel="prev" href="unicode_types.html" title=" <link rel="next" href="unicode_iter.html" title="Unicode Aware Regex Iterators">
Unicode regular expression types">
<link rel="next" href="unicode_iter.html" title="
Unicode Aware Regex Iterators">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -28,41 +24,40 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title"> <div class="titlepage"><div><div><h5 class="title">
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo"></a><a href="unicode_algo.html" title=" <a name="boost_regex.ref.non_std_strings.icu.unicode_algo"></a><a href="unicode_algo.html" title="Unicode Regular Expression Algorithms">
Unicode Regular Expression Algorithms"> Unicode Regular Expression Algorithms</a>
Unicode Regular Expression Algorithms</a></h5></div></div></div> </h5></div></div></div>
<p> <p>
The regular expression algorithms <a href="../../regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>, <a href="../../regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> and <a href="../../regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a> all expect that The regular expression algorithms <a href="../../regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>, <a href="../../regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a> and <a href="../../regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a> all expect that
the character sequence upon which they operate, is encoded in the same the character sequence upon which they operate, is encoded in the same
character encoding as the regular expression object with which they are character encoding as the regular expression object with which they are
used. For Unicode regular expressions that behavior is undesirable: while used. For Unicode regular expressions that behavior is undesirable: while
we may want to process the data in UTF-32 "chunks", the actual we may want to process the data in UTF-32 "chunks", the actual
data is much more likely to encoded as either UTF-8 or UTF-16. Therefore data is much more likely to encoded as either UTF-8 or UTF-16. Therefore
the header &lt;boost/regex/icu.hpp&gt; provides a series of thin wrappers the header &lt;boost/regex/icu.hpp&gt; provides a series of thin wrappers
around these algorithms, called <tt class="computeroutput"><span class="identifier">u32regex_match</span></tt>, around these algorithms, called <code class="computeroutput"><span class="identifier">u32regex_match</span></code>,
<tt class="computeroutput"><span class="identifier">u32regex_search</span></tt>, and <code class="computeroutput"><span class="identifier">u32regex_search</span></code>, and
<tt class="computeroutput"><span class="identifier">u32regex_replace</span></tt>. These <code class="computeroutput"><span class="identifier">u32regex_replace</span></code>. These
wrappers use iterator-adapters internally to make external UTF-8 or UTF-16 wrappers use iterator-adapters internally to make external UTF-8 or UTF-16
data look as though it's really a UTF-32 sequence, that can then be passed data look as though it's really a UTF-32 sequence, that can then be passed
on to the "real" algorithm. on to the "real" algorithm.
</p> </p>
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match"></a><h4> <a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match"></a><h5>
<a name="id572213"></a> <a name="id605295"></a>
<a href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match">u32regex_match</a> <a href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match">u32regex_match</a>
</h4> </h5>
<p> <p>
For each <a href="../../regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a> For each <a href="../../regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>
algorithm defined by <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt>, algorithm defined by <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>,
then <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt> defines an overloaded algorithm that then <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code> defines an overloaded algorithm that
takes the same arguments, but which is called <tt class="computeroutput"><span class="identifier">u32regex_match</span></tt>, takes the same arguments, but which is called <code class="computeroutput"><span class="identifier">u32regex_match</span></code>,
and which will accept UTF-8, UTF-16 or UTF-32 encoded data, as well as and which will accept UTF-8, UTF-16 or UTF-32 encoded data, as well as
an ICU UnicodeString as input. an ICU UnicodeString as input.
</p> </p>
<p> <p>
Example: match a password, encoded in a UTF-16 UnicodeString: Example: match a password, encoded in a UTF-16 UnicodeString:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="comment">//
<span class="comment">//
</span><span class="comment">// Find out if *password* meets our password requirements, </span><span class="comment">// Find out if *password* meets our password requirements,
</span><span class="comment">// as defined by the regular expression *requirements*. </span><span class="comment">// as defined by the regular expression *requirements*.
</span><span class="comment">// </span><span class="comment">//
@ -74,8 +69,7 @@
<p> <p>
Example: match a UTF-8 encoded filename: Example: match a UTF-8 encoded filename:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="comment">//
<span class="comment">//
</span><span class="comment">// Extract filename part of a path from a UTF-8 encoded std::string and return the result </span><span class="comment">// Extract filename part of a path from a UTF-8 encoded std::string and return the result
</span><span class="comment">// as another std::string: </span><span class="comment">// as another std::string:
</span><span class="comment">// </span><span class="comment">//
@ -94,23 +88,22 @@
<span class="special">}</span> <span class="special">}</span>
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search"></a><h4> <a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search"></a><h5>
<a name="id572936"></a> <a name="id606015"></a>
<a href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search">u32regex_search</a> <a href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search">u32regex_search</a>
</h4> </h5>
<p> <p>
For each <a href="../../regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> For each <a href="../../regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>
algorithm defined by <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt>, algorithm defined by <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>,
then <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt> defines an overloaded algorithm that then <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code> defines an overloaded algorithm that
takes the same arguments, but which is called <tt class="computeroutput"><span class="identifier">u32regex_search</span></tt>, takes the same arguments, but which is called <code class="computeroutput"><span class="identifier">u32regex_search</span></code>,
and which will accept UTF-8, UTF-16 or UTF-32 encoded data, as well as and which will accept UTF-8, UTF-16 or UTF-32 encoded data, as well as
an ICU UnicodeString as input. an ICU UnicodeString as input.
</p> </p>
<p> <p>
Example: search for a character sequence in a specific language block: Example: search for a character sequence in a specific language block:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">UnicodeString</span> <span class="identifier">extract_greek</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UnicodeString</span><span class="special">&amp;</span> <span class="identifier">text</span><span class="special">)</span>
<span class="identifier">UnicodeString</span> <span class="identifier">extract_greek</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UnicodeString</span><span class="special">&amp;</span> <span class="identifier">text</span><span class="special">)</span>
<span class="special">{</span> <span class="special">{</span>
<span class="comment">// searches through some UTF-16 encoded text for a block encoded in Greek, <span class="comment">// searches through some UTF-16 encoded text for a block encoded in Greek,
</span> <span class="comment">// this expression is imperfect, but the best we can do for now - searching </span> <span class="comment">// this expression is imperfect, but the best we can do for now - searching
@ -134,15 +127,15 @@
<span class="special">}</span> <span class="special">}</span>
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace"></a><h4> <a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace"></a><h5>
<a name="id573532"></a> <a name="id606608"></a>
<a href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace">u32regex_replace</a> <a href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace">u32regex_replace</a>
</h4> </h5>
<p> <p>
For each <a href="../../regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a> algorithm defined For each <a href="../../regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a> algorithm defined
by <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt>, then <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt> by <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>, then <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
defines an overloaded algorithm that takes the same arguments, but which defines an overloaded algorithm that takes the same arguments, but which
is called <tt class="computeroutput"><span class="identifier">u32regex_replace</span></tt>, is called <code class="computeroutput"><span class="identifier">u32regex_replace</span></code>,
and which will accept UTF-8, UTF-16 or UTF-32 encoded data, as well as and which will accept UTF-8, UTF-16 or UTF-32 encoded data, as well as
an ICU UnicodeString as input. The input sequence and the format string an ICU UnicodeString as input. The input sequence and the format string
specifier passed to the algorithm, can be encoded independently (for specifier passed to the algorithm, can be encoded independently (for
@ -153,8 +146,7 @@
<p> <p>
Example: Credit card number reformatting: Example: Credit card number reformatting:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="comment">//
<span class="comment">//
</span><span class="comment">// Take a credit card number as a string of digits, </span><span class="comment">// Take a credit card number as a string of digits,
</span><span class="comment">// and reformat it as a human readable string with "-" </span><span class="comment">// and reformat it as a human readable string with "-"
</span><span class="comment">// separating each group of four digit;, </span><span class="comment">// separating each group of four digit;,
@ -174,10 +166,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,25 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Unicode Aware Regex Iterators</title>
Unicode Aware Regex Iterators</title>
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../../index.html" title="Boost.Regex">
<link rel="up" href="../icu.html" title=" Working With <link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
Unicode and ICU String Types"> <link rel="prev" href="unicode_algo.html" title="Unicode Regular Expression Algorithms">
<link rel="prev" href="unicode_algo.html" title=" <link rel="next" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
Unicode Regular Expression Algorithms">
<link rel="next" href="../mfc_strings.html" title=" Using
Boost Regex With MFC Strings">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -28,23 +24,22 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title"> <div class="titlepage"><div><div><h5 class="title">
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter"></a><a href="unicode_iter.html" title=" <a name="boost_regex.ref.non_std_strings.icu.unicode_iter"></a><a href="unicode_iter.html" title="Unicode Aware Regex Iterators">
Unicode Aware Regex Iterators"> Unicode Aware Regex Iterators</a>
Unicode Aware Regex Iterators</a></h5></div></div></div> </h5></div></div></div>
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator"></a><h4> <a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator"></a><h5>
<a name="id573998"></a> <a name="id607067"></a>
<a href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator">u32regex_iterator</a> <a href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator">u32regex_iterator</a>
</h4> </h5>
<p> <p>
Type <tt class="computeroutput"><span class="identifier">u32regex_iterator</span></tt> Type <code class="computeroutput"><span class="identifier">u32regex_iterator</span></code>
is in all respects the same as <a href="../../regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> except that since is in all respects the same as <a href="../../regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> except that since
the regular expression type is always <tt class="computeroutput"><span class="identifier">u32regex</span></tt> the regular expression type is always <code class="computeroutput"><span class="identifier">u32regex</span></code>
it only takes one template parameter (the iterator type). It also calls it only takes one template parameter (the iterator type). It also calls
<tt class="computeroutput"><span class="identifier">u32regex_search</span></tt> internally, <code class="computeroutput"><span class="identifier">u32regex_search</span></code> internally,
allowing it to interface correctly with UTF-8, UTF-16, and UTF-32 data: allowing it to interface correctly with UTF-8, UTF-16, and UTF-32 data:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">u32regex_iterator</span> <span class="keyword">class</span> <span class="identifier">u32regex_iterator</span>
<span class="special">{</span> <span class="special">{</span>
<span class="comment">// for members see regex_iterator <span class="comment">// for members see regex_iterator
@ -55,12 +50,11 @@
<span class="keyword">typedef</span> <span class="identifier">u32regex_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">UChar32</span><span class="special">*&gt;</span> <span class="identifier">utf32regex_iterator</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">u32regex_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">UChar32</span><span class="special">*&gt;</span> <span class="identifier">utf32regex_iterator</span><span class="special">;</span>
</pre> </pre>
<p> <p>
In order to simplify the construction of a <tt class="computeroutput"><span class="identifier">u32regex_iterator</span></tt> In order to simplify the construction of a <code class="computeroutput"><span class="identifier">u32regex_iterator</span></code>
from a string, there are a series of non-member helper functions called from a string, there are a series of non-member helper functions called
make_u32regex_iterator: make_u32regex_iterator:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">u32regex_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*&gt;</span>
<span class="identifier">u32regex_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*&gt;</span>
<span class="identifier">make_u32regex_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">make_u32regex_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">s</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">u32regex</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">u32regex</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
@ -95,8 +89,7 @@
Example: search for international currency symbols, along with their Example: search for international currency symbols, along with their
associated numeric value: associated numeric value:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">enumerate_currencies</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">text</span><span class="special">)</span>
<span class="keyword">void</span> <span class="identifier">enumerate_currencies</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">text</span><span class="special">)</span>
<span class="special">{</span> <span class="special">{</span>
<span class="comment">// enumerate and print all the currency symbols, along <span class="comment">// enumerate and print all the currency symbols, along
</span> <span class="comment">// with any associated numeric values: </span> <span class="comment">// with any associated numeric values:
@ -132,20 +125,19 @@
<p> <p>
Provided of course that the input is encoded as UTF-8. Provided of course that the input is encoded as UTF-8.
</p> </p>
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator"></a><h4> <a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator"></a><h5>
<a name="id575751"></a> <a name="id608814"></a>
<a href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator">u32regex_token_iterator</a> <a href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator">u32regex_token_iterator</a>
</h4> </h5>
<p> <p>
Type <tt class="computeroutput"><span class="identifier">u32regex_token_iterator</span></tt> Type <code class="computeroutput"><span class="identifier">u32regex_token_iterator</span></code>
is in all respects the same as <a href="../../regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> except is in all respects the same as <a href="../../regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> except
that since the regular expression type is always <tt class="computeroutput"><span class="identifier">u32regex</span></tt> that since the regular expression type is always <code class="computeroutput"><span class="identifier">u32regex</span></code>
it only takes one template parameter (the iterator type). It also calls it only takes one template parameter (the iterator type). It also calls
<tt class="computeroutput"><span class="identifier">u32regex_search</span></tt> internally, <code class="computeroutput"><span class="identifier">u32regex_search</span></code> internally,
allowing it to interface correctly with UTF-8, UTF-16, and UTF-32 data: allowing it to interface correctly with UTF-8, UTF-16, and UTF-32 data:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">u32regex_token_iterator</span> <span class="keyword">class</span> <span class="identifier">u32regex_token_iterator</span>
<span class="special">{</span> <span class="special">{</span>
<span class="comment">// for members see regex_token_iterator <span class="comment">// for members see regex_token_iterator
@ -156,12 +148,11 @@
<span class="keyword">typedef</span> <span class="identifier">u32regex_token_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">UChar32</span><span class="special">*&gt;</span> <span class="identifier">utf32regex_token_iterator</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">u32regex_token_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">UChar32</span><span class="special">*&gt;</span> <span class="identifier">utf32regex_token_iterator</span><span class="special">;</span>
</pre> </pre>
<p> <p>
In order to simplify the construction of a <tt class="computeroutput"><span class="identifier">u32regex_token_iterator</span></tt> In order to simplify the construction of a <code class="computeroutput"><span class="identifier">u32regex_token_iterator</span></code>
from a string, there are a series of non-member helper functions called from a string, there are a series of non-member helper functions called
<tt class="computeroutput"><span class="identifier">make_u32regex_token_iterator</span></tt>: <code class="computeroutput"><span class="identifier">make_u32regex_token_iterator</span></code>:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">u32regex_token_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*&gt;</span>
<span class="identifier">u32regex_token_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*&gt;</span>
<span class="identifier">make_u32regex_token_iterator</span><span class="special">(</span> <span class="identifier">make_u32regex_token_iterator</span><span class="special">(</span>
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">s</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">u32regex</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">u32regex</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">,</span>
@ -202,8 +193,7 @@
of marked sub-expression sub in regular expression <span class="emphasis"><em>e</em></span>, of marked sub-expression sub in regular expression <span class="emphasis"><em>e</em></span>,
found in text <span class="emphasis"><em>s</em></span>, using match_flags <span class="emphasis"><em>m</em></span>. found in text <span class="emphasis"><em>s</em></span>, using match_flags <span class="emphasis"><em>m</em></span>.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">&gt;</span>
<span class="identifier">u32regex_token_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*&gt;</span> <span class="identifier">u32regex_token_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*&gt;</span>
<span class="identifier">make_u32regex_token_iterator</span><span class="special">(</span> <span class="identifier">make_u32regex_token_iterator</span><span class="special">(</span>
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
@ -248,8 +238,7 @@
for each submatch in regular expression <span class="emphasis"><em>e</em></span>, found for each submatch in regular expression <span class="emphasis"><em>e</em></span>, found
in text <span class="emphasis"><em>s</em></span>, using match_flags <span class="emphasis"><em>m</em></span>. in text <span class="emphasis"><em>s</em></span>, using match_flags <span class="emphasis"><em>m</em></span>.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">u32regex_token_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*&gt;</span>
<span class="identifier">u32regex_token_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*&gt;</span>
<span class="identifier">make_u32regex_token_iterator</span><span class="special">(</span> <span class="identifier">make_u32regex_token_iterator</span><span class="special">(</span>
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">u32regex</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">u32regex</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">,</span>
@ -294,8 +283,7 @@
Example: search for international currency symbols, along with their Example: search for international currency symbols, along with their
associated numeric value: associated numeric value:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">enumerate_currencies2</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">text</span><span class="special">)</span>
<span class="keyword">void</span> <span class="identifier">enumerate_currencies2</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">text</span><span class="special">)</span>
<span class="special">{</span> <span class="special">{</span>
<span class="comment">// enumerate and print all the currency symbols, along <span class="comment">// enumerate and print all the currency symbols, along
</span> <span class="comment">// with any associated numeric values: </span> <span class="comment">// with any associated numeric values:
@ -321,10 +309,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,25 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Unicode regular expression types</title>
Unicode regular expression types</title>
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../../index.html" title="Boost.Regex">
<link rel="up" href="../icu.html" title=" Working With <link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
Unicode and ICU String Types"> <link rel="prev" href="intro.html" title="Introduction to using Regex with ICU">
<link rel="prev" href="intro.html" title=" Introduction <link rel="next" href="unicode_algo.html" title="Unicode Regular Expression Algorithms">
to using Regex with ICU">
<link rel="next" href="unicode_algo.html" title="
Unicode Regular Expression Algorithms">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -28,113 +24,105 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title"> <div class="titlepage"><div><div><h5 class="title">
<a name="boost_regex.ref.non_std_strings.icu.unicode_types"></a><a href="unicode_types.html" title=" <a name="boost_regex.ref.non_std_strings.icu.unicode_types"></a><a href="unicode_types.html" title="Unicode regular expression types">
Unicode regular expression types"> Unicode regular expression types</a>
Unicode regular expression types</a></h5></div></div></div> </h5></div></div></div>
<p> <p>
Header <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt> provides a regular expression traits Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code> provides a regular expression traits
class that handles UTF-32 characters: class that handles UTF-32 characters:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">class</span> <span class="identifier">icu_regex_traits</span><span class="special">;</span>
<span class="keyword">class</span> <span class="identifier">icu_regex_traits</span><span class="special">;</span>
</pre> </pre>
<p> <p>
and a regular expression type based upon that: and a regular expression type based upon that:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">UChar32</span><span class="special">,</span><span class="identifier">icu_regex_traits</span><span class="special">&gt;</span> <span class="identifier">u32regex</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">UChar32</span><span class="special">,</span><span class="identifier">icu_regex_traits</span><span class="special">&gt;</span> <span class="identifier">u32regex</span><span class="special">;</span>
</pre> </pre>
<p> <p>
The type <tt class="computeroutput"><span class="identifier">u32regex</span></tt> is The type <code class="computeroutput"><span class="identifier">u32regex</span></code> is
regular expression type to use for all Unicode regular expressions; internally regular expression type to use for all Unicode regular expressions; internally
it uses UTF-32 code points, but can be created from, and used to search, it uses UTF-32 code points, but can be created from, and used to search,
either UTF-8, or UTF-16 encoded strings as well as UTF-32 ones. either UTF-8, or UTF-16 encoded strings as well as UTF-32 ones.
</p> </p>
<p> <p>
The constructors, and assign member functions of <tt class="computeroutput"><span class="identifier">u32regex</span></tt>, The constructors, and assign member functions of <code class="computeroutput"><span class="identifier">u32regex</span></code>,
require UTF-32 encoded strings, but there are a series of overloaded require UTF-32 encoded strings, but there are a series of overloaded
algorithms called <tt class="computeroutput"><span class="identifier">make_u32regex</span></tt> algorithms called <code class="computeroutput"><span class="identifier">make_u32regex</span></code>
which allow regular expressions to be created from UTF-8, UTF-16, or which allow regular expressions to be created from UTF-8, UTF-16, or
UTF-32 encoded strings: UTF-32 encoded strings:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">InputIterator</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">InputIterator</span><span class="special">&gt;</span>
<span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="identifier">InputIterator</span> <span class="identifier">i</span><span class="special">,</span> <span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="identifier">InputIterator</span> <span class="identifier">i</span><span class="special">,</span>
<span class="identifier">InputIterator</span> <span class="identifier">j</span><span class="special">,</span> <span class="identifier">InputIterator</span> <span class="identifier">j</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span><span class="special">);</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Creates a regular expression <span class="bold"><strong>Effects</strong></span>: Creates a regular expression
object from the iterator sequence [i,j). The character encoding of the object from the iterator sequence [i,j). The character encoding of the
sequence is determined based upon sizeof(*i): 1 implies UTF-8, 2 implies sequence is determined based upon sizeof(*i): 1 implies UTF-8, 2 implies
UTF-16, and 4 implies UTF-32. UTF-16, and 4 implies UTF-32.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
<span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span>
<span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Creates a regular expression <span class="bold"><strong>Effects</strong></span>: Creates a regular expression
object from the Null-terminated UTF-8 characater sequence <span class="emphasis"><em>p</em></span>. object from the Null-terminated UTF-8 characater sequence <span class="emphasis"><em>p</em></span>.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
<span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span>
<span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Creates a regular expression <span class="bold"><strong>Effects</strong></span>: Creates a regular expression
object from the Null-terminated UTF-8 characater sequence p. object from the Null-terminated UTF-8 characater sequence p.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
<span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span>
<span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Creates a regular expression <span class="bold"><strong>Effects</strong></span>: Creates a regular expression
object from the Null-terminated characater sequence p. The character object from the Null-terminated characater sequence p. The character
encoding of the sequence is determined based upon sizeof(wchar_t): 1 encoding of the sequence is determined based upon sizeof(wchar_t): 1
implies UTF-8, 2 implies UTF-16, and 4 implies UTF-32. implies UTF-8, 2 implies UTF-16, and 4 implies UTF-32.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UChar</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
<span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UChar</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span>
<span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Creates a regular expression <span class="bold"><strong>Effects</strong></span>: Creates a regular expression
object from the Null-terminated UTF-16 characater sequence p. object from the Null-terminated UTF-16 characater sequence p.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">C</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">C</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
<span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">C</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">C</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span>
<span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Creates a regular expression <span class="bold"><strong>Effects</strong></span>: Creates a regular expression
object from the string s. The character encoding of the string is determined object from the string s. The character encoding of the string is determined
based upon sizeof(C): 1 implies UTF-8, 2 implies UTF-16, and 4 implies based upon sizeof(C): 1 implies UTF-8, 2 implies UTF-16, and 4 implies
UTF-32. UTF-32.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UnicodeString</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UnicodeString</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span>
<span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Creates a regular expression <span class="bold"><strong>Effects</strong></span>: Creates a regular expression
object from the UTF-16 encoding string s. object from the UTF-16 encoding string s.
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,25 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Using <title>Using Boost Regex With MFC Strings</title>
Boost Regex With MFC Strings</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../non_std_strings.html" title=" Interfacing With Non-Standard <link rel="up" href="../non_std_strings.html" title="Interfacing With Non-Standard String Types">
String Types"> <link rel="prev" href="icu/unicode_iter.html" title="Unicode Aware Regex Iterators">
<link rel="prev" href="icu/unicode_iter.html" title=" <link rel="next" href="mfc_strings/mfc_intro.html" title="Introduction to Boost.Regex and MFC Strings">
Unicode Aware Regex Iterators">
<link rel="next" href="mfc_strings/mfc_intro.html" title="
Introduction to Boost.Regex and MFC Strings">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -28,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.non_std_strings.mfc_strings"></a><a href="mfc_strings.html" title=" Using <a name="boost_regex.ref.non_std_strings.mfc_strings"></a><a href="mfc_strings.html" title="Using Boost Regex With MFC Strings"> Using
Boost Regex With MFC Strings"> Using Boost Regex With MFC Strings</a>
Boost Regex With MFC Strings</a></h4></div></div></div> </h4></div></div></div>
<div class="toc"><dl> <div class="toc"><dl>
<dt><span class="section"><a href="mfc_strings/mfc_intro.html"> <dt><span class="section"><a href="mfc_strings/mfc_intro.html">
Introduction to Boost.Regex and MFC Strings</a></span></dt> Introduction to Boost.Regex and MFC Strings</a></span></dt>
@ -46,10 +42,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,25 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Overloaded Algorithms For MFC String Types</title>
Overloaded Algorithms For MFC String Types</title>
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../../index.html" title="Boost.Regex">
<link rel="up" href="../mfc_strings.html" title=" Using <link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
Boost Regex With MFC Strings"> <link rel="prev" href="mfc_regex_create.html" title="Regular Expression Creation From an MFC String">
<link rel="prev" href="mfc_regex_create.html" title=" <link rel="next" href="mfc_iter.html" title="Iterating Over the Matches Within An MFC String">
Regular Expression Creation From an MFC String">
<link rel="next" href="mfc_iter.html" title="
Iterating Over the Matches Within An MFC String">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -28,31 +24,30 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title"> <div class="titlepage"><div><div><h5 class="title">
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo"></a><a href="mfc_algo.html" title=" <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo"></a><a href="mfc_algo.html" title="Overloaded Algorithms For MFC String Types">
Overloaded Algorithms For MFC String Types"> Overloaded Algorithms For MFC String Types</a>
Overloaded Algorithms For MFC String Types</a></h5></div></div></div> </h5></div></div></div>
<p> <p>
For each regular expression algorithm that's overloaded for a <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></tt> argument, there is also For each regular expression algorithm that's overloaded for a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code> argument, there is also
one overloaded for the MFC/ATL string types. These algorithm signatures one overloaded for the MFC/ATL string types. These algorithm signatures
all look a lot more complex than they actually are, but for completeness all look a lot more complex than they actually are, but for completeness
here they are anyway: here they are anyway:
</p> </p>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match"></a><h4> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match"></a><h5>
<a name="id580927"></a> <a name="id613970"></a>
<a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match">regex_match</a> <a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match">regex_match</a>
</h4> </h5>
<p> <p>
There are two overloads, the first reports what matched in a match_results There are two overloads, the first reports what matched in a match_results
structure, the second does not. structure, the second does not.
</p> </p>
<p> <p>
All the usual caveats for <a href="../../regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a> apply, in particular All the usual caveats for <a href="../../regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a> apply, in particular
the algorithm will only report a successful match if all of the input the algorithm will only report a successful match if all of the input
text matches the expression, if this isn't what you want then use <a href="../../regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> text matches the expression, if this isn't what you want then use <a href="../../regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>
instead. instead.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span> <span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span>
<span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">B</span><span class="special">*,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">B</span><span class="special">*,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">what</span><span class="special">,</span>
@ -60,15 +55,14 @@
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span>
<span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span>
<span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></tt> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></code>
</p> </p>
<p> <p>
<span class="bold"><b>Example:</b></span> <span class="bold"><strong>Example:</strong></span>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="comment">//
<span class="comment">//
</span><span class="comment">// Extract filename part of a path from a CString and return the result </span><span class="comment">// Extract filename part of a path from a CString and return the result
</span><span class="comment">// as another CString: </span><span class="comment">// as another CString:
</span><span class="comment">// </span><span class="comment">//
@ -87,28 +81,26 @@
<span class="special">}</span> <span class="special">}</span>
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_"></a><h4> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_"></a><h5>
<a name="id581844"></a> <a name="id614882"></a>
<a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_">regex_match <a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_">regex_match
(second overload)</a> (second overload)</a>
</h4> </h5>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span> <span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span>
<span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">B</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">B</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span>
<span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span>
<span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></tt> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></code>
</p> </p>
<p> <p>
<span class="bold"><b>Example:</b></span> <span class="bold"><strong>Example:</strong></span>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="comment">//
<span class="comment">//
</span><span class="comment">// Find out if *password* meets our password requirements, </span><span class="comment">// Find out if *password* meets our password requirements,
</span><span class="comment">// as defined by the regular expression *requirements*. </span><span class="comment">// as defined by the regular expression *requirements*.
</span><span class="comment">// </span><span class="comment">//
@ -117,31 +109,29 @@
<span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">password</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_regex</span><span class="special">(</span><span class="identifier">requirements</span><span class="special">));</span> <span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">password</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_regex</span><span class="special">(</span><span class="identifier">requirements</span><span class="special">));</span>
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search"></a><h4> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search"></a><h5>
<a name="id582440"></a> <a name="id615473"></a>
<a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search">regex_search</a> <a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search">regex_search</a>
</h4> </h5>
<p> <p>
There are two additional overloads for <a href="../../regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>, the first reports There are two additional overloads for <a href="../../regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>, the first reports
what matched the second does not: what matched the second does not:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">what</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns ::boost::regex_search(s.GetString(), <span class="bold"><strong>Effects</strong></span>: returns ::boost::regex_search(s.GetString(),
s.GetString() + s.GetLength(), what, e, f); s.GetString() + s.GetLength(), what, e, f);
</p> </p>
<p> <p>
<span class="bold"><b>Example</b></span>: Postcode extraction from an <span class="bold"><strong>Example</strong></span>: Postcode extraction from an
address string. address string.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">CString</span> <span class="identifier">extract_postcode</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&amp;</span> <span class="identifier">address</span><span class="special">)</span>
<span class="identifier">CString</span> <span class="identifier">extract_postcode</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&amp;</span> <span class="identifier">address</span><span class="special">)</span>
<span class="special">{</span> <span class="special">{</span>
<span class="comment">// searches throw address for a UK postcode and returns the result, <span class="comment">// searches throw address for a UK postcode and returns the result,
</span> <span class="comment">// the expression used is by Phil A. on www.regxlib.com: </span> <span class="comment">// the expression used is by Phil A. on www.regxlib.com:
@ -158,32 +148,30 @@
<span class="special">}</span> <span class="special">}</span>
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_"></a><h4> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_"></a><h5>
<a name="id583183"></a> <a name="id616211"></a>
<a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_">regex_search <a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_">regex_search
(second overload)</a> (second overload)</a>
</h4> </h5>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">inline</span> <span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">inline</span> <span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span>
<span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span>
<span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></tt> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></code>
</p> </p>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace"></a><h4> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace"></a><h5>
<a name="id583590"></a> <a name="id616615"></a>
<a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace">regex_replace</a> <a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace">regex_replace</a>
</h4> </h5>
<p> <p>
There are two additional overloads for <a href="../../regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a>, the first sends There are two additional overloads for <a href="../../regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a>, the first sends
output to an output iterator, while the second creates a new string output to an output iterator, while the second creates a new string
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span>
<span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="identifier">OutputIterator</span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">OutputIterator</span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
<span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span>
@ -193,26 +181,24 @@
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">)</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">)</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">fmt</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">fmt</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span>
<span class="identifier">flags</span><span class="special">);</span></tt> <span class="identifier">flags</span><span class="special">);</span></code>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">fmt</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">)</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">)</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns a new string created <span class="bold"><strong>Effects</strong></span>: returns a new string created
using <a href="../../regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a>, using <a href="../../regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a>,
and the same memory manager as string <span class="emphasis"><em>s</em></span>. and the same memory manager as string <span class="emphasis"><em>s</em></span>.
</p> </p>
<p> <p>
<span class="bold"><b>Example</b></span>: <span class="bold"><strong>Example</strong></span>:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="comment">//
<span class="comment">//
</span><span class="comment">// Take a credit card number as a string of digits, </span><span class="comment">// Take a credit card number as a string of digits,
</span><span class="comment">// and reformat it as a human readable string with "-" </span><span class="comment">// and reformat it as a human readable string with "-"
</span><span class="comment">// separating each group of four digits: </span><span class="comment">// separating each group of four digits:
@ -228,10 +214,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,25 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Introduction to Boost.Regex and MFC Strings</title>
Introduction to Boost.Regex and MFC Strings</title>
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../../index.html" title="Boost.Regex">
<link rel="up" href="../mfc_strings.html" title=" Using <link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
Boost Regex With MFC Strings"> <link rel="prev" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
<link rel="prev" href="../mfc_strings.html" title=" Using <link rel="next" href="mfc_regex_types.html" title="Regex Types Used With MFC Strings">
Boost Regex With MFC Strings">
<link rel="next" href="mfc_regex_types.html" title="
Regex Types Used With MFC Strings">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -28,11 +24,11 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title"> <div class="titlepage"><div><div><h5 class="title">
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_intro"></a><a href="mfc_intro.html" title=" <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_intro"></a><a href="mfc_intro.html" title="Introduction to Boost.Regex and MFC Strings">
Introduction to Boost.Regex and MFC Strings"> Introduction to Boost.Regex and MFC Strings</a>
Introduction to Boost.Regex and MFC Strings</a></h5></div></div></div> </h5></div></div></div>
<p> <p>
The header <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">mfc</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></tt> provides Boost.Regex support for The header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">mfc</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code> provides Boost.Regex support for
MFC string types: note that this support requires Visual Studio .NET MFC string types: note that this support requires Visual Studio .NET
(Visual C++ 7) or later, where all of the MFC and ATL string types are (Visual C++ 7) or later, where all of the MFC and ATL string types are
based around the CSimpleStringT class template. based around the CSimpleStringT class template.
@ -42,8 +38,7 @@
then you can substitute any of the following MFC/ATL types (all of which then you can substitute any of the following MFC/ATL types (all of which
inherit from CSimpleStringT): inherit from CSimpleStringT):
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">CString</span>
<span class="identifier">CString</span>
<span class="identifier">CStringA</span> <span class="identifier">CStringA</span>
<span class="identifier">CStringW</span> <span class="identifier">CStringW</span>
<span class="identifier">CAtlString</span> <span class="identifier">CAtlString</span>
@ -56,10 +51,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,24 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Iterating Over the Matches Within An MFC String</title>
Iterating Over the Matches Within An MFC String</title>
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../../index.html" title="Boost.Regex">
<link rel="up" href="../mfc_strings.html" title=" Using <link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
Boost Regex With MFC Strings"> <link rel="prev" href="mfc_algo.html" title="Overloaded Algorithms For MFC String Types">
<link rel="prev" href="mfc_algo.html" title=" <link rel="next" href="../../posix.html" title="POSIX Compatible C API's">
Overloaded Algorithms For MFC String Types">
<link rel="next" href="../../posix.html" title=" POSIX Compatible C API's">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -27,20 +24,19 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title"> <div class="titlepage"><div><div><h5 class="title">
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter"></a><a href="mfc_iter.html" title=" <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter"></a><a href="mfc_iter.html" title="Iterating Over the Matches Within An MFC String">
Iterating Over the Matches Within An MFC String"> Iterating Over the Matches Within An MFC String</a>
Iterating Over the Matches Within An MFC String</a></h5></div></div></div> </h5></div></div></div>
<p> <p>
The following helper functions are provided to ease the conversion from The following helper functions are provided to ease the conversion from
an MFC/ATL string to a <a href="../../regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> or <a href="../../regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a>: an MFC/ATL string to a <a href="../../regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> or <a href="../../regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a>:
</p> </p>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper"></a><h4> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper"></a><h5>
<a name="id584678"></a> <a name="id617695"></a>
<a href="mfc_iter.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper">regex_iterator <a href="mfc_iter.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper">regex_iterator
creation helper</a> creation helper</a>
</h4> </h5>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="identifier">regex_iterator</span><span class="special">&lt;</span><span class="identifier">charT</span> <span class="keyword">const</span><span class="special">*&gt;</span> <span class="identifier">regex_iterator</span><span class="special">&lt;</span><span class="identifier">charT</span> <span class="keyword">const</span><span class="special">*&gt;</span>
<span class="identifier">make_regex_iterator</span><span class="special">(</span> <span class="identifier">make_regex_iterator</span><span class="special">(</span>
<span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
@ -48,15 +44,14 @@
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="identifier">regex_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="identifier">regex_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
<span class="identifier">e</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">f</span><span class="special">);</span></tt> <span class="identifier">f</span><span class="special">);</span></code>
</p> </p>
<p> <p>
<span class="bold"><b>Example</b></span>: <span class="bold"><strong>Example</strong></span>:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">enumerate_links</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&amp;</span> <span class="identifier">html</span><span class="special">)</span>
<span class="keyword">void</span> <span class="identifier">enumerate_links</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&amp;</span> <span class="identifier">html</span><span class="special">)</span>
<span class="special">{</span> <span class="special">{</span>
<span class="comment">// enumerate and print all the links in some HTML text, <span class="comment">// enumerate and print all the links in some HTML text,
</span> <span class="comment">// the expression used is by Andew Lee on www.regxlib.com: </span> <span class="comment">// the expression used is by Andew Lee on www.regxlib.com:
@ -72,13 +67,12 @@
<span class="special">}</span> <span class="special">}</span>
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers"></a><h4> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers"></a><h5>
<a name="id585433"></a> <a name="id618444"></a>
<a href="mfc_iter.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers">regex_token_iterator <a href="mfc_iter.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers">regex_token_iterator
creation helpers</a> creation helpers</a>
</h4> </h5>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="identifier">regex_token_iterator</span><span class="special">&lt;</span><span class="identifier">charT</span> <span class="keyword">const</span><span class="special">*&gt;</span> <span class="identifier">regex_token_iterator</span><span class="special">&lt;</span><span class="identifier">charT</span> <span class="keyword">const</span><span class="special">*&gt;</span>
<span class="identifier">make_regex_token_iterator</span><span class="special">(</span> <span class="identifier">make_regex_token_iterator</span><span class="special">(</span>
<span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
@ -87,13 +81,12 @@
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
<span class="identifier">e</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">sub</span><span class="special">,</span> <span class="identifier">sub</span><span class="special">,</span>
<span class="identifier">f</span><span class="special">);</span></tt> <span class="identifier">f</span><span class="special">);</span></code>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="identifier">regex_token_iterator</span><span class="special">&lt;</span><span class="identifier">charT</span> <span class="keyword">const</span><span class="special">*&gt;</span> <span class="identifier">regex_token_iterator</span><span class="special">&lt;</span><span class="identifier">charT</span> <span class="keyword">const</span><span class="special">*&gt;</span>
<span class="identifier">make_regex_token_iterator</span><span class="special">(</span> <span class="identifier">make_regex_token_iterator</span><span class="special">(</span>
<span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
@ -102,13 +95,12 @@
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
<span class="identifier">e</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">subs</span><span class="special">,</span> <span class="identifier">subs</span><span class="special">,</span>
<span class="identifier">f</span><span class="special">);</span></tt> <span class="identifier">f</span><span class="special">);</span></code>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">&gt;</span>
<span class="identifier">regex_token_iterator</span><span class="special">&lt;</span><span class="identifier">charT</span> <span class="keyword">const</span><span class="special">*&gt;</span> <span class="identifier">regex_token_iterator</span><span class="special">&lt;</span><span class="identifier">charT</span> <span class="keyword">const</span><span class="special">*&gt;</span>
<span class="identifier">make_regex_token_iterator</span><span class="special">(</span> <span class="identifier">make_regex_token_iterator</span><span class="special">(</span>
<span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
@ -117,16 +109,15 @@
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
<span class="identifier">e</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">subs</span><span class="special">,</span> <span class="identifier">subs</span><span class="special">,</span>
<span class="identifier">f</span><span class="special">);</span></tt> <span class="identifier">f</span><span class="special">);</span></code>
</p> </p>
<p> <p>
<span class="bold"><b>Example</b></span>: <span class="bold"><strong>Example</strong></span>:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">enumerate_links2</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&amp;</span> <span class="identifier">html</span><span class="special">)</span>
<span class="keyword">void</span> <span class="identifier">enumerate_links2</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&amp;</span> <span class="identifier">html</span><span class="special">)</span>
<span class="special">{</span> <span class="special">{</span>
<span class="comment">// enumerate and print all the links in some HTML text, <span class="comment">// enumerate and print all the links in some HTML text,
</span> <span class="comment">// the expression used is by Andew Lee on www.regxlib.com: </span> <span class="comment">// the expression used is by Andew Lee on www.regxlib.com:
@ -145,10 +136,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,25 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Regular Expression Creation From an MFC String</title>
Regular Expression Creation From an MFC String</title>
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../../index.html" title="Boost.Regex">
<link rel="up" href="../mfc_strings.html" title=" Using <link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
Boost Regex With MFC Strings"> <link rel="prev" href="mfc_regex_types.html" title="Regex Types Used With MFC Strings">
<link rel="prev" href="mfc_regex_types.html" title=" <link rel="next" href="mfc_algo.html" title="Overloaded Algorithms For MFC String Types">
Regex Types Used With MFC Strings">
<link rel="next" href="mfc_algo.html" title="
Overloaded Algorithms For MFC String Types">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -28,30 +24,30 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title"> <div class="titlepage"><div><div><h5 class="title">
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_regex_create"></a><a href="mfc_regex_create.html" title=" <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_regex_create"></a><a href="mfc_regex_create.html" title="Regular Expression Creation From an MFC String">
Regular Expression Creation From an MFC String"> Regular Expression Creation From an MFC String</a>
Regular Expression Creation From an MFC String</a></h5></div></div></div> </h5></div></div></div>
<p> <p>
The following helper function is available to assist in the creation The following helper function is available to assist in the creation
of a regular expression from an MFC/ATL string type: of a regular expression from an MFC/ATL string type:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span>
<span class="identifier">make_regex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">make_regex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">normal</span><span class="special">);</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">normal</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
<span class="identifier">f</span><span class="special">);</span></tt> <span class="identifier">f</span><span class="special">);</span></code>
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,25 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Regex Types Used With MFC Strings</title>
Regex Types Used With MFC Strings</title>
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../../index.html" title="Boost.Regex">
<link rel="up" href="../mfc_strings.html" title=" Using <link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
Boost Regex With MFC Strings"> <link rel="prev" href="mfc_intro.html" title="Introduction to Boost.Regex and MFC Strings">
<link rel="prev" href="mfc_intro.html" title=" <link rel="next" href="mfc_regex_create.html" title="Regular Expression Creation From an MFC String">
Introduction to Boost.Regex and MFC Strings">
<link rel="next" href="mfc_regex_create.html" title="
Regular Expression Creation From an MFC String">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -28,31 +24,31 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title"> <div class="titlepage"><div><div><h5 class="title">
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_regex_types"></a><a href="mfc_regex_types.html" title=" <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_regex_types"></a><a href="mfc_regex_types.html" title="Regex Types Used With MFC Strings">
Regex Types Used With MFC Strings"> Regex Types Used With MFC Strings</a>
Regex Types Used With MFC Strings</a></h5></div></div></div> </h5></div></div></div>
<p> <p>
The following typedefs are provided for the convenience of those working The following typedefs are provided for the convenience of those working
with TCHAR's: with TCHAR's:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">TCHAR</span><span class="special">&gt;</span> <span class="identifier">tregex</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">TCHAR</span><span class="special">&gt;</span> <span class="identifier">tregex</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">TCHAR</span> <span class="keyword">const</span><span class="special">*&gt;</span> <span class="identifier">tmatch</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">TCHAR</span> <span class="keyword">const</span><span class="special">*&gt;</span> <span class="identifier">tmatch</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">regex_iterator</span><span class="special">&lt;</span><span class="identifier">TCHAR</span> <span class="keyword">const</span><span class="special">*&gt;</span> <span class="identifier">tregex_iterator</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">regex_iterator</span><span class="special">&lt;</span><span class="identifier">TCHAR</span> <span class="keyword">const</span><span class="special">*&gt;</span> <span class="identifier">tregex_iterator</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">regex_token_iterator</span><span class="special">&lt;</span><span class="identifier">TCHAR</span> <span class="keyword">const</span><span class="special">*&gt;</span> <span class="identifier">tregex_token_iterator</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">regex_token_iterator</span><span class="special">&lt;</span><span class="identifier">TCHAR</span> <span class="keyword">const</span><span class="special">*&gt;</span> <span class="identifier">tregex_token_iterator</span><span class="special">;</span>
</pre> </pre>
<p> <p>
If you are working with explicitly narrow or wide characters rather than If you are working with explicitly narrow or wide characters rather than
TCHAR, then use the regular Boost.Regex types <tt class="computeroutput"><span class="identifier">regex</span></tt> TCHAR, then use the regular Boost.Regex types <code class="computeroutput"><span class="identifier">regex</span></code>
and <tt class="computeroutput"><span class="identifier">wregex</span></tt> instead. and <code class="computeroutput"><span class="identifier">wregex</span></code> instead.
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> POSIX Compatible C API's</title> <title>POSIX Compatible C API's</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="non_std_strings/mfc_strings/mfc_iter.html" title=" <link rel="prev" href="non_std_strings/mfc_strings/mfc_iter.html" title="Iterating Over the Matches Within An MFC String">
Iterating Over the Matches Within An MFC String"> <link rel="next" href="concepts.html" title="Concepts">
<link rel="next" href="concepts.html" title=" Concepts">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,13 +24,14 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.posix"></a><a href="posix.html" title=" POSIX Compatible C API's"> POSIX Compatible C API's</a></h3></div></div></div> <a name="boost_regex.ref.posix"></a><a href="posix.html" title="POSIX Compatible C API's"> POSIX Compatible C API's</a>
</h3></div></div></div>
<div class="note"><table border="0" summary="Note"> <div class="note"><table border="0" summary="Note">
<tr> <tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td> <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
<th align="left">Note</th> <th align="left">Note</th>
</tr> </tr>
<tr><td colspan="2" align="left" valign="top"><p> <tr><td align="left" valign="top"><p>
this is an abridged reference to the POSIX API functions, these are provided this is an abridged reference to the POSIX API functions, these are provided
for compatibility with other libraries, rather than as an API to be used for compatibility with other libraries, rather than as an API to be used
in new code (unless you need access from a language other than C++). This in new code (unless you need access from a language other than C++). This
@ -39,14 +39,12 @@
as the names used are macros that expand to the actual function names. as the names used are macros that expand to the actual function names.
</p></td></tr> </p></td></tr>
</table></div> </table></div>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre> </pre>
<p> <p>
or: or:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span>
</pre> </pre>
<p> <p>
The following functions are available for users who need a POSIX compatible The following functions are available for users who need a POSIX compatible
@ -59,9 +57,9 @@
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../../doc/html/images/important.png"></td> <td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../../doc/html/images/important.png"></td>
<th align="left">Important</th> <th align="left">Important</th>
</tr> </tr>
<tr><td colspan="2" align="left" valign="top"><p> <tr><td align="left" valign="top"><p>
Note that all the symbols defined here are enclosed inside namespace <tt class="computeroutput"><span class="identifier">boost</span></tt> when used in C++ programs, unless Note that all the symbols defined here are enclosed inside namespace <code class="computeroutput"><span class="identifier">boost</span></code> when used in C++ programs, unless
you use <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span></tt> you use <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span></code>
instead - in which case the symbols are still defined in namespace boost, instead - in which case the symbols are still defined in namespace boost,
but are made available in the global namespace as well. but are made available in the global namespace as well.
</p></td></tr> </p></td></tr>
@ -69,8 +67,7 @@
<p> <p>
The functions are defined as: The functions are defined as:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">extern</span> <span class="string">"C"</span> <span class="special">{</span>
<span class="keyword">extern</span> <span class="string">"C"</span> <span class="special">{</span>
<span class="keyword">struct</span> <span class="identifier">regex_tA</span><span class="special">;</span> <span class="keyword">struct</span> <span class="identifier">regex_tA</span><span class="special">;</span>
<span class="keyword">struct</span> <span class="identifier">regex_tW</span><span class="special">;</span> <span class="keyword">struct</span> <span class="identifier">regex_tW</span><span class="special">;</span>
@ -125,13 +122,13 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span> <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">re_nsub</span></tt> <span class="identifier">re_nsub</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
This is filled in by <tt class="computeroutput"><span class="identifier">regcomp</span></tt> This is filled in by <code class="computeroutput"><span class="identifier">regcomp</span></code>
and indicates the number of sub-expressions contained in the regular and indicates the number of sub-expressions contained in the regular
expression. expression.
</p> </p>
@ -140,7 +137,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">TCHAR</span><span class="special">*</span> <span class="identifier">re_endp</span></tt> <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">TCHAR</span><span class="special">*</span> <span class="identifier">re_endp</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -157,23 +154,23 @@
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td> <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
<th align="left">Note</th> <th align="left">Note</th>
</tr> </tr>
<tr><td colspan="2" align="left" valign="top"><p> <tr><td align="left" valign="top"><p>
<tt class="computeroutput"><span class="identifier">regex_t</span></tt> is actually a <code class="computeroutput"><span class="identifier">regex_t</span></code> is actually a
<tt class="computeroutput"><span class="preprocessor">#define</span></tt> - it is either <code class="computeroutput"><span class="preprocessor">#define</span></code> - it is either
<tt class="computeroutput"><span class="identifier">regex_tA</span></tt> or <tt class="computeroutput"><span class="identifier">regex_tW</span></tt> depending upon whether <tt class="computeroutput"><span class="identifier">UNICODE</span></tt> is defined or not, <tt class="computeroutput"><span class="identifier">TCHAR</span></tt> is either <tt class="computeroutput"><span class="keyword">char</span></tt> <code class="computeroutput"><span class="identifier">regex_tA</span></code> or <code class="computeroutput"><span class="identifier">regex_tW</span></code> depending upon whether <code class="computeroutput"><span class="identifier">UNICODE</span></code> is defined or not, <code class="computeroutput"><span class="identifier">TCHAR</span></code> is either <code class="computeroutput"><span class="keyword">char</span></code>
or <tt class="computeroutput"><span class="keyword">wchar_t</span></tt> again depending or <code class="computeroutput"><span class="keyword">wchar_t</span></code> again depending
upon the macro <tt class="computeroutput"><span class="identifier">UNICODE</span></tt>. upon the macro <code class="computeroutput"><span class="identifier">UNICODE</span></code>.
</p></td></tr> </p></td></tr>
</table></div> </table></div>
<a name="regcomp"></a><p> <a name="regcomp"></a><p>
</p> </p>
<a name="boost_regex.ref.posix.regcomp"></a><h4> <a name="boost_regex.ref.posix.regcomp"></a><h5>
<a name="id588362"></a> <a name="id621362"></a>
<a href="posix.html#boost_regex.ref.posix.regcomp">regcomp</a> <a href="posix.html#boost_regex.ref.posix.regcomp">regcomp</a>
</h4> </h5>
<p> <p>
<tt class="computeroutput"><span class="identifier">regcomp</span></tt> takes a pointer to <code class="computeroutput"><span class="identifier">regcomp</span></code> takes a pointer to
a <tt class="computeroutput"><span class="identifier">regex_t</span></tt>, a pointer to the a <code class="computeroutput"><span class="identifier">regex_t</span></code>, a pointer to the
expression to compile and a flags parameter which can be a combination of: expression to compile and a flags parameter which can be a combination of:
</p> </p>
<div class="informaltable"><table class="table"> <div class="informaltable"><table class="table">
@ -202,9 +199,9 @@
</td> </td>
<td> <td>
<p> <p>
Compiles modern regular expressions. Equivalent to <tt class="computeroutput"><span class="identifier">regbase</span><span class="special">::</span><span class="identifier">char_classes</span> <span class="special">|</span> Compiles modern regular expressions. Equivalent to <code class="computeroutput"><span class="identifier">regbase</span><span class="special">::</span><span class="identifier">char_classes</span> <span class="special">|</span>
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">intervals</span> <span class="special">|</span> <span class="identifier">regbase</span><span class="special">::</span><span class="identifier">intervals</span> <span class="special">|</span>
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_refs</span></tt>. <span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_refs</span></code>.
</p> </p>
</td> </td>
</tr> </tr>
@ -217,12 +214,12 @@
<td> <td>
<p> <p>
Compiles basic (obsolete) regular expression syntax. Equivalent to Compiles basic (obsolete) regular expression syntax. Equivalent to
<tt class="computeroutput"><span class="identifier">regbase</span><span class="special">::</span><span class="identifier">char_classes</span> <span class="special">|</span> <code class="computeroutput"><span class="identifier">regbase</span><span class="special">::</span><span class="identifier">char_classes</span> <span class="special">|</span>
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">intervals</span> <span class="special">|</span> <span class="identifier">regbase</span><span class="special">::</span><span class="identifier">intervals</span> <span class="special">|</span>
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">limited_ops</span> <span class="special">|</span> <span class="identifier">regbase</span><span class="special">::</span><span class="identifier">limited_ops</span> <span class="special">|</span>
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_braces</span> <span class="special">|</span> <span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_braces</span> <span class="special">|</span>
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_parens</span> <span class="special">|</span> <span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_parens</span> <span class="special">|</span>
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_refs</span></tt>. <span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_refs</span></code>.
</p> </p>
</td> </td>
</tr> </tr>
@ -346,8 +343,8 @@
</td> </td>
<td> <td>
<p> <p>
A shortcut for awk-like behavior: <tt class="computeroutput"><span class="identifier">REG_EXTENDED</span> A shortcut for awk-like behavior: <code class="computeroutput"><span class="identifier">REG_EXTENDED</span>
<span class="special">|</span> <span class="identifier">REG_ESCAPE_IN_LISTS</span></tt> <span class="special">|</span> <span class="identifier">REG_ESCAPE_IN_LISTS</span></code>
</p> </p>
</td> </td>
</tr> </tr>
@ -359,8 +356,8 @@
</td> </td>
<td> <td>
<p> <p>
A shortcut for grep like behavior: <tt class="computeroutput"><span class="identifier">REG_BASIC</span> A shortcut for grep like behavior: <code class="computeroutput"><span class="identifier">REG_BASIC</span>
<span class="special">|</span> <span class="identifier">REG_NEWLINE_ALT</span></tt> <span class="special">|</span> <span class="identifier">REG_NEWLINE_ALT</span></code>
</p> </p>
</td> </td>
</tr> </tr>
@ -372,8 +369,8 @@
</td> </td>
<td> <td>
<p> <p>
A shortcut for egrep like behavior: <tt class="computeroutput"><span class="identifier">REG_EXTENDED</span> A shortcut for egrep like behavior: <code class="computeroutput"><span class="identifier">REG_EXTENDED</span>
<span class="special">|</span> <span class="identifier">REG_NEWLINE_ALT</span></tt> <span class="special">|</span> <span class="identifier">REG_NEWLINE_ALT</span></code>
</p> </p>
</td> </td>
</tr> </tr>
@ -381,10 +378,10 @@
</table></div> </table></div>
<a name="regerror"></a><p> <a name="regerror"></a><p>
</p> </p>
<a name="boost_regex.ref.posix.regerror"></a><h4> <a name="boost_regex.ref.posix.regerror"></a><h5>
<a name="id589006"></a> <a name="id622005"></a>
<a href="posix.html#boost_regex.ref.posix.regerror">regerror</a> <a href="posix.html#boost_regex.ref.posix.regerror">regerror</a>
</h4> </h5>
<p> <p>
regerror takes the following parameters, it maps an error code to a human regerror takes the following parameters, it maps an error code to a human
readable string: readable string:
@ -469,10 +466,10 @@
</p> </p>
<a name="regexec"></a><p> <a name="regexec"></a><p>
</p> </p>
<a name="boost_regex.ref.posix.regexec"></a><h4> <a name="boost_regex.ref.posix.regexec"></a><h5>
<a name="id589189"></a> <a name="id622188"></a>
<a href="posix.html#boost_regex.ref.posix.regexec">regexec</a> <a href="posix.html#boost_regex.ref.posix.regexec">regexec</a>
</h4> </h5>
<p> <p>
regexec finds the first occurrence of expression e within string buf. If regexec finds the first occurrence of expression e within string buf. If
len is non-zero then <span class="emphasis"><em>*m</em></span> is filled in with what matched len is non-zero then <span class="emphasis"><em>*m</em></span> is filled in with what matched
@ -539,21 +536,22 @@
</table></div> </table></div>
<a name="regfree"></a><p> <a name="regfree"></a><p>
</p> </p>
<a name="boost_regex.ref.posix.regfree"></a><h4> <a name="boost_regex.ref.posix.regfree"></a><h5>
<a name="id589331"></a> <a name="id622329"></a>
<a href="posix.html#boost_regex.ref.posix.regfree">regfree</a> <a href="posix.html#boost_regex.ref.posix.regfree">regfree</a>
</h4> </h5>
<p> <p>
<tt class="computeroutput"><span class="identifier">regfree</span></tt> frees all the memory <code class="computeroutput"><span class="identifier">regfree</span></code> frees all the memory
that was allocated by regcomp. that was allocated by regcomp.
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> regex_iterator</title> <title>regex_iterator</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="regex_replace.html" title=" regex_replace"> <link rel="prev" href="regex_replace.html" title="regex_replace">
<link rel="next" href="regex_token_iterator.html" title=" regex_token_iterator"> <link rel="next" href="regex_token_iterator.html" title="regex_token_iterator">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,15 +24,15 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.regex_iterator"></a><a href="regex_iterator.html" title=" regex_iterator"> regex_iterator</a></h3></div></div></div> <a name="boost_regex.ref.regex_iterator"></a><a href="regex_iterator.html" title="regex_iterator"> regex_iterator</a>
</h3></div></div></div>
<p> <p>
The iterator type <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> will enumerate all The iterator type <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> will enumerate all
of the regular expression matches found in some sequence: dereferencing a of the regular expression matches found in some sequence: dereferencing a
<a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>
yields a reference to a <a href="match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> object. yields a reference to a <a href="match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> object.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
<span class="keyword">class</span> <span class="identifier">charT</span> <span class="special">=</span> <span class="identifier">iterator_traits</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;::</span><span class="identifier">value_type</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span> <span class="special">=</span> <span class="identifier">iterator_traits</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;::</span><span class="identifier">value_type</span><span class="special">,</span>
<span class="keyword">class</span> <span class="identifier">traits</span> <span class="special">=</span> <span class="identifier">regex_traits</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">traits</span> <span class="special">=</span> <span class="identifier">regex_traits</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">regex_iterator</span> <span class="keyword">class</span> <span class="identifier">regex_iterator</span>
@ -77,39 +77,37 @@
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<a name="boost_regex.ref.regex_iterator.description"></a><h4> <a name="boost_regex.ref.regex_iterator.description"></a><h5>
<a name="id547078"></a> <a name="id580462"></a>
<a href="regex_iterator.html#boost_regex.ref.regex_iterator.description">Description</a> <a href="regex_iterator.html#boost_regex.ref.regex_iterator.description">Description</a>
</h4> </h5>
<p> <p>
A <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> A <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>
is constructed from a pair of iterators, and enumerates all occurrences of is constructed from a pair of iterators, and enumerates all occurrences of
a regular expression within that iterator range. a regular expression within that iterator range.
</p> </p>
<a name="boost_regex.regex_iterator.construct1"></a><p> <a name="boost_regex.regex_iterator.construct1"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_iterator</span><span class="special">();</span>
<span class="identifier">regex_iterator</span><span class="special">();</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: constructs an end of sequence <span class="bold"><strong>Effects</strong></span>: constructs an end of sequence
<a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a>. <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>.
</p> </p>
<a name="boost_regex.regex_iterator.construct2"></a><p> <a name="boost_regex.regex_iterator.construct2"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">b</span><span class="special">,</span>
<span class="identifier">regex_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">b</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">regex_type</span><span class="special">&amp;</span> <span class="identifier">re</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">regex_type</span><span class="special">&amp;</span> <span class="identifier">re</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: constructs a <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> that will enumerate <span class="bold"><strong>Effects</strong></span>: constructs a <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> that will enumerate
all occurrences of the expression <span class="emphasis"><em>re</em></span>, within the sequence all occurrences of the expression <span class="emphasis"><em>re</em></span>, within the sequence
[a,b), and found using <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>m</em></span>. [a,b), and found using <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>m</em></span>.
The object <span class="emphasis"><em>re</em></span> must exist for the lifetime of the <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a>. The object <span class="emphasis"><em>re</em></span> must exist for the lifetime of the <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>.
</p> </p>
<p> <p>
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> <span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if the complexity of matching the expression against an N character string if the complexity of matching the expression against an N character string
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
the expression (if Boost.Regex is configured in recursive mode), or if the the expression (if Boost.Regex is configured in recursive mode), or if the
@ -118,51 +116,46 @@
</p> </p>
<a name="boost_regex.regex_iterator.construct3"></a><p> <a name="boost_regex.regex_iterator.construct3"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&amp;</span> <span class="identifier">that</span><span class="special">);</span>
<span class="identifier">regex_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&amp;</span> <span class="identifier">that</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: constructs a copy of <tt class="computeroutput"><span class="identifier">that</span></tt>. <span class="bold"><strong>Effects</strong></span>: constructs a copy of <code class="computeroutput"><span class="identifier">that</span></code>.
</p> </p>
<p> <p>
<span class="bold"><b>Postconditions</b></span>: <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span></tt>. <span class="bold"><strong>Postconditions</strong></span>: <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span></code>.
</p> </p>
<a name="boost_regex.regex_iterator.assign"></a><p> <a name="boost_regex.regex_iterator.assign"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&amp;);</span>
<span class="identifier">regex_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&amp;);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: sets <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt> equal to those in <tt class="computeroutput"><span class="identifier">that</span></tt>. <span class="bold"><strong>Effects</strong></span>: sets <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> equal to those in <code class="computeroutput"><span class="identifier">that</span></code>.
</p> </p>
<p> <p>
<span class="bold"><b>Postconditions</b></span>: *this == that. <span class="bold"><strong>Postconditions</strong></span>: *this == that.
</p> </p>
<a name="boost_regex.regex_iterator.op_eq"></a><p> <a name="boost_regex.regex_iterator.op_eq"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&amp;</span> <span class="identifier">that</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&amp;</span> <span class="identifier">that</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns true if *this is equal <span class="bold"><strong>Effects</strong></span>: returns true if *this is equal
to that. to that.
</p> </p>
<a name="boost_regex.regex_iterator.op_ne"></a><p> <a name="boost_regex.regex_iterator.op_ne"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&amp;)</span><span class="keyword">const</span><span class="special">;</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&amp;)</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">!(*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span><span class="special">)</span></tt>. <span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">!(*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span><span class="special">)</span></code>.
</p> </p>
<a name="boost_regex.regex_iterator.op_deref"></a><p> <a name="boost_regex.regex_iterator.op_deref"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">*()</span><span class="keyword">const</span><span class="special">;</span>
<span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">*()</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: dereferencing a <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> object it yields <span class="bold"><strong>Effects</strong></span>: dereferencing a <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> object it yields
a const reference to a <a href="match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> object, whose members a const reference to a <a href="match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> object, whose members
are set as follows: are set as follows:
</p> </p>
<div class="informaltable"><table class="table"> <div class="informaltable"><table class="table">
@ -186,31 +179,31 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">re</span><span class="special">.</span><span class="identifier">mark_count</span><span class="special">()</span></tt> <code class="computeroutput"><span class="identifier">re</span><span class="special">.</span><span class="identifier">mark_count</span><span class="special">()</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">empty</span><span class="special">()</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">empty</span><span class="special">()</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">false</span></tt> <code class="computeroutput"><span class="keyword">false</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -223,44 +216,44 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
The same as the start of the match found: <tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></tt> The same as the start of the match found: <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">matched</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">matched</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
True if the prefix did not match an empty string: <tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span> True if the prefix did not match an empty string: <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span>
<span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">second</span></tt> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
The same as the end of the match found: <tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></tt> The same as the end of the match found: <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -272,20 +265,20 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">matched</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">matched</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
True if the suffix did not match an empty string: <tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span> True if the suffix did not match an empty string: <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span>
<span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">second</span></tt> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -298,7 +291,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -310,7 +303,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -323,12 +316,12 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">first</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">first</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></tt>, For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></code>,
the start of the sequence that matched sub-expression <span class="emphasis"><em>n</em></span>. the start of the sequence that matched sub-expression <span class="emphasis"><em>n</em></span>.
Alternatively, if sub-expression <span class="emphasis"><em>n</em></span> did not participate Alternatively, if sub-expression <span class="emphasis"><em>n</em></span> did not participate
in the match, then last. in the match, then last.
@ -338,12 +331,12 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">second</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></tt>, For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></code>,
the end of the sequence that matched sub-expression <span class="emphasis"><em>n</em></span>. the end of the sequence that matched sub-expression <span class="emphasis"><em>n</em></span>.
Alternatively, if sub-expression <span class="emphasis"><em>n</em></span> did not participate Alternatively, if sub-expression <span class="emphasis"><em>n</em></span> did not participate
in the match, then last. in the match, then last.
@ -353,12 +346,12 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">matched</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">matched</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></tt>, For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></code>,
true if sub-expression <span class="emphasis"><em>n</em></span> participated in the true if sub-expression <span class="emphasis"><em>n</em></span> participated in the
match, false otherwise. match, false otherwise.
</p> </p>
@ -367,12 +360,12 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">position</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span></tt> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">position</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></tt>, For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></code>,
then the distance from the start of the underlying sequence to the then the distance from the start of the underlying sequence to the
start of sub-expression match <span class="emphasis"><em>n</em></span>. start of sub-expression match <span class="emphasis"><em>n</em></span>.
</p> </p>
@ -382,29 +375,27 @@
</table></div> </table></div>
<a name="boost_regex.regex_iterator.op_arrow"></a><p> <a name="boost_regex.regex_iterator.op_arrow"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">-&gt;()</span><span class="keyword">const</span><span class="special">;</span>
<span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">-&gt;()</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">&amp;(*</span><span class="keyword">this</span><span class="special">)</span></tt>. <span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">&amp;(*</span><span class="keyword">this</span><span class="special">)</span></code>.
</p> </p>
<a name="boost_regex.regex_iterator.op_inc"></a><p> <a name="boost_regex.regex_iterator.op_inc"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">++();</span>
<span class="identifier">regex_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">++();</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: moves the iterator to the next <span class="bold"><strong>Effects</strong></span>: moves the iterator to the next
match in the underlying sequence, or the end of sequence iterator if none match in the underlying sequence, or the end of sequence iterator if none
if found. When the last match found matched a zero length string, then the if found. When the last match found matched a zero length string, then the
<a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>
will find the next match as follows: if there exists a non-zero length match will find the next match as follows: if there exists a non-zero length match
that starts at the same location as the last one, then returns it, otherwise that starts at the same location as the last one, then returns it, otherwise
starts looking for the next (possibly zero length) match from one position starts looking for the next (possibly zero length) match from one position
to the right of the last match. to the right of the last match.
</p> </p>
<p> <p>
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> <span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if the complexity of matching the expression against an N character string if the complexity of matching the expression against an N character string
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
the expression (if Boost.Regex is configured in recursive mode), or if the the expression (if Boost.Regex is configured in recursive mode), or if the
@ -412,24 +403,22 @@
in non-recursive mode). in non-recursive mode).
</p> </p>
<p> <p>
<span class="bold"><b>Returns</b></span>: *this. <span class="bold"><strong>Returns</strong></span>: *this.
</p> </p>
<a name="boost_regex.regex_iterator.op_inc2"></a><p> <a name="boost_regex.regex_iterator.op_inc2"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_iterator</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
<span class="identifier">regex_iterator</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: constructs a copy result of <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt>, then <span class="bold"><strong>Effects</strong></span>: constructs a copy result of <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>, then
calls <tt class="computeroutput"><span class="special">++(*</span><span class="keyword">this</span><span class="special">)</span></tt>. calls <code class="computeroutput"><span class="special">++(*</span><span class="keyword">this</span><span class="special">)</span></code>.
</p> </p>
<p> <p>
<span class="bold"><b>Returns</b></span>: result. <span class="bold"><strong>Returns</strong></span>: result.
</p> </p>
<a name="boost_regex.regex_iterator.make"></a><p> <a name="boost_regex.regex_iterator.make"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="identifier">regex_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;</span> <span class="identifier">regex_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="identifier">make_regex_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">make_regex_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
@ -441,21 +430,20 @@
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns an iterator that enumerates <span class="bold"><strong>Effects</strong></span>: returns an iterator that enumerates
all occurences of expression <span class="emphasis"><em>e</em></span> in text <span class="emphasis"><em>p</em></span> all occurences of expression <span class="emphasis"><em>e</em></span> in text <span class="emphasis"><em>p</em></span>
using <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> using <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>
<span class="emphasis"><em>m</em></span>. <span class="emphasis"><em>m</em></span>.
</p> </p>
<a name="boost_regex.ref.regex_iterator.examples"></a><h4> <a name="boost_regex.ref.regex_iterator.examples"></a><h5>
<a name="id550235"></a> <a name="id583597"></a>
<a href="regex_iterator.html#boost_regex.ref.regex_iterator.examples">Examples</a> <a href="regex_iterator.html#boost_regex.ref.regex_iterator.examples">Examples</a>
</h4> </h5>
<p> <p>
The following example takes a C++ source file and builds up an index of class The following example takes a C++ source file and builds up an index of class
names, and the location of that class in the file. names, and the location of that class in the file.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">fstream</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">fstream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
@ -549,10 +537,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> regex_match</title> <title>regex_match</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="sub_match.html" title=" sub_match"> <link rel="prev" href="sub_match.html" title="sub_match">
<link rel="next" href="regex_search.html" title=" regex_search"> <link rel="next" href="regex_search.html" title="regex_search">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,13 +24,13 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.regex_match"></a><a href="regex_match.html" title=" regex_match"> regex_match</a></h3></div></div></div> <a name="boost_regex.ref.regex_match"></a><a href="regex_match.html" title="regex_match"> regex_match</a>
<pre class="programlisting"> </h3></div></div></div>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre> </pre>
<p> <p>
The algorithm <a href="regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a> The algorithm <a href="regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>
determines whether a given regular expression matches <span class="bold"><b>all</b></span> determines whether a given regular expression matches <span class="bold"><strong>all</strong></span>
of a given character sequence denoted by a pair of bidirectional-iterators, of a given character sequence denoted by a pair of bidirectional-iterators,
the algorithm is defined as follows, the main use of this function is data the algorithm is defined as follows, the main use of this function is data
input validation. input validation.
@ -40,15 +40,14 @@
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../../doc/html/images/important.png"></td> <td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../../doc/html/images/important.png"></td>
<th align="left">Important</th> <th align="left">Important</th>
</tr> </tr>
<tr><td colspan="2" align="left" valign="top"><p> <tr><td align="left" valign="top"><p>
Note that the result is true only if the expression matches the <span class="bold"><b>whole</b></span> of the input sequence. If you want to search Note that the result is true only if the expression matches the <span class="bold"><strong>whole</strong></span> of the input sequence. If you want to search
for an expression somewhere within the sequence then use <a href="regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>. If you want to match for an expression somewhere within the sequence then use <a href="regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>. If you want to match
a prefix of the character string then use <a href="regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> with the flag match_continuous a prefix of the character string then use <a href="regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a> with the flag match_continuous
set. set.
</p></td></tr> </p></td></tr>
</table></div> </table></div>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span>
<span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
@ -80,31 +79,30 @@
<span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<a name="boost_regex.ref.regex_match.description"></a><h4> <a name="boost_regex.ref.regex_match.description"></a><h5>
<a name="id530617"></a> <a name="id564067"></a>
<a href="regex_match.html#boost_regex.ref.regex_match.description">Description</a> <a href="regex_match.html#boost_regex.ref.regex_match.description">Description</a>
</h4> </h5>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span>
<span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Requires</b></span>: Type BidirectionalIterator meets <span class="bold"><strong>Requires</strong></span>: Type BidirectionalIterator meets
the requirements of a Bidirectional Iterator (24.1.4). the requirements of a Bidirectional Iterator (24.1.4).
</p> </p>
<p> <p>
<span class="bold"><b>Effects</b></span>: Determines whether there is an <span class="bold"><strong>Effects</strong></span>: Determines whether there is an
exact match between the regular expression <span class="emphasis"><em>e</em></span>, and all exact match between the regular expression <span class="emphasis"><em>e</em></span>, and all
of the character sequence [first, last), parameter <span class="emphasis"><em>flags</em></span> of the character sequence [first, last), parameter <span class="emphasis"><em>flags</em></span>
(see <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>) (see <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>)
is used to control how the expression is matched against the character sequence. is used to control how the expression is matched against the character sequence.
Returns true if such a match exists, false otherwise. Returns true if such a match exists, false otherwise.
</p> </p>
<p> <p>
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> <span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if the complexity of matching the expression against an N character string if the complexity of matching the expression against an N character string
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
the expression (if Boost.Regex is configured in recursive mode), or if the the expression (if Boost.Regex is configured in recursive mode), or if the
@ -112,7 +110,7 @@
in non-recursive mode). in non-recursive mode).
</p> </p>
<p> <p>
<span class="bold"><b>Postconditions</b></span>: If the function returns <span class="bold"><strong>Postconditions</strong></span>: If the function returns
false, then the effect on parameter <span class="emphasis"><em>m</em></span> is undefined, false, then the effect on parameter <span class="emphasis"><em>m</em></span> is undefined,
otherwise the effects on parameter <span class="emphasis"><em>m</em></span> are given in the otherwise the effects on parameter <span class="emphasis"><em>m</em></span> are given in the
table: table:
@ -138,127 +136,127 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">e</span><span class="special">.</span><span class="identifier">mark_count</span><span class="special">()</span></tt> <code class="computeroutput"><span class="identifier">e</span><span class="special">.</span><span class="identifier">mark_count</span><span class="special">()</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">false</span></tt> <code class="computeroutput"><span class="keyword">false</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">first</span></tt> <code class="computeroutput"><span class="identifier">first</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">first</span></tt> <code class="computeroutput"><span class="identifier">first</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">matched</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">matched</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">false</span></tt> <code class="computeroutput"><span class="keyword">false</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">last</span></tt> <code class="computeroutput"><span class="identifier">last</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">last</span></tt> <code class="computeroutput"><span class="identifier">last</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">matched</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">matched</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">false</span></tt> <code class="computeroutput"><span class="keyword">false</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">first</span></tt> <code class="computeroutput"><span class="identifier">first</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">last</span></tt> <code class="computeroutput"><span class="identifier">last</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -271,72 +269,69 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">first</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">first</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>, the start of the sequence that For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>, the start of the sequence that
matched sub-expression <span class="emphasis"><em>n</em></span>. Alternatively, if matched sub-expression <span class="emphasis"><em>n</em></span>. Alternatively, if
sub-expression <span class="emphasis"><em>n</em></span> did not participate in the sub-expression <span class="emphasis"><em>n</em></span> did not participate in the
match, then <tt class="computeroutput"><span class="identifier">last</span></tt>. match, then <code class="computeroutput"><span class="identifier">last</span></code>.
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">second</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>, the end of the sequence that matched For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>, the end of the sequence that matched
sub-expression <span class="emphasis"><em>n</em></span>. Alternatively, if sub-expression sub-expression <span class="emphasis"><em>n</em></span>. Alternatively, if sub-expression
<span class="emphasis"><em>n</em></span> did not participate in the match, then <tt class="computeroutput"><span class="identifier">last</span></tt>. <span class="emphasis"><em>n</em></span> did not participate in the match, then <code class="computeroutput"><span class="identifier">last</span></code>.
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">matched</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">matched</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>, true if sub-expression <span class="emphasis"><em>n</em></span> For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>, true if sub-expression <span class="emphasis"><em>n</em></span>
participated in the match, false otherwise. participated in the match, false otherwise.
</p> </p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table></div> </table></div>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Behaves "as if" by constructing <span class="bold"><strong>Effects</strong></span>: Behaves "as if" by constructing
an instance of <tt class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span> <span class="identifier">what</span></tt>, an instance of <code class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span> <span class="identifier">what</span></code>,
and then returning the result of <tt class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> and then returning the result of <code class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">flags</span><span class="special">)</span></tt>. <span class="identifier">flags</span><span class="special">)</span></code>.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span><span class="special">,</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span><span class="special">,</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span> <span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span>
<span class="special">+</span> <span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;::</span><span class="identifier">length</span><span class="special">(</span><span class="identifier">str</span><span class="special">),</span> <span class="special">+</span> <span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;::</span><span class="identifier">length</span><span class="special">(</span><span class="identifier">str</span><span class="special">),</span>
<span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>. <span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span>
<span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">&gt;::</span><span class="identifier">const_iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">&gt;::</span><span class="identifier">const_iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span>
@ -344,37 +339,34 @@
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>. <span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span> <span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span>
<span class="special">+</span> <span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;::</span><span class="identifier">length</span><span class="special">(</span><span class="identifier">str</span><span class="special">),</span> <span class="special">+</span> <span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;::</span><span class="identifier">length</span><span class="special">(</span><span class="identifier">str</span><span class="special">),</span>
<span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>. <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>. <span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
</p> </p>
<a name="boost_regex.ref.regex_match.examples"></a><h4> <a name="boost_regex.ref.regex_match.examples"></a><h5>
<a name="id533809"></a> <a name="id567246"></a>
<a href="regex_match.html#boost_regex.ref.regex_match.examples">Examples</a> <a href="regex_match.html#boost_regex.ref.regex_match.examples">Examples</a>
</h4> </h5>
<p> <p>
The following example processes an ftp response: The following example processes an ftp response:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">stdlib</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">stdlib</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
@ -408,10 +400,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> regex_replace</title> <title>regex_replace</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="regex_search.html" title=" regex_search"> <link rel="prev" href="regex_search.html" title="regex_search">
<link rel="next" href="regex_iterator.html" title=" regex_iterator"> <link rel="next" href="regex_iterator.html" title="regex_iterator">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,22 +24,21 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.regex_replace"></a><a href="regex_replace.html" title=" regex_replace"> regex_replace</a></h3></div></div></div> <a name="boost_regex.ref.regex_replace"></a><a href="regex_replace.html" title="regex_replace"> regex_replace</a>
<pre class="programlisting"> </h3></div></div></div>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre> </pre>
<p> <p>
The algorithm <a href="regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a> searches through a The algorithm <a href="regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a> searches through a
string finding all the matches to the regular expression: for each match string finding all the matches to the regular expression: for each match
it then calls <a href="match_results.html#boost_regex.match_results_format"><tt class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;&gt;::</span><span class="identifier">format</span></tt></a> to format the string and it then calls <a href="match_results.html#boost_regex.match_results_format"><code class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;&gt;::</span><span class="identifier">format</span></code></a> to format the string and
sends the result to the output iterator. Sections of text that do not match sends the result to the output iterator. Sections of text that do not match
are copied to the output unchanged only if the <span class="emphasis"><em>flags</em></span> are copied to the output unchanged only if the <span class="emphasis"><em>flags</em></span>
parameter does not have the flag <tt class="computeroutput"><span class="identifier">format_no_copy</span></tt> parameter does not have the flag <code class="computeroutput"><span class="identifier">format_no_copy</span></code>
set. If the flag <tt class="computeroutput"><span class="identifier">format_first_only</span></tt> set. If the flag <code class="computeroutput"><span class="identifier">format_first_only</span></code>
is set then only the first occurrence is replaced rather than all occurrences. is set then only the first occurrence is replaced rather than all occurrences.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="identifier">OutputIterator</span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">OutputIterator</span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
<span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span>
<span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span>
@ -53,12 +52,11 @@
<span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">fmt</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<a name="boost_regex.ref.regex_replace.description"></a><h4> <a name="boost_regex.ref.regex_replace.description"></a><h5>
<a name="id541136"></a> <a name="id574547"></a>
<a href="regex_replace.html#boost_regex.ref.regex_replace.description">Description</a> <a href="regex_replace.html#boost_regex.ref.regex_replace.description">Description</a>
</h4> </h5>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="identifier">OutputIterator</span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">OutputIterator</span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
<span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span>
<span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span>
@ -73,84 +71,76 @@
and copies the resulting string to <span class="emphasis"><em>out</em></span>. and copies the resulting string to <span class="emphasis"><em>out</em></span>.
</p> </p>
<p> <p>
If the flag <tt class="computeroutput"><span class="identifier">format_no_copy</span></tt> If the flag <code class="computeroutput"><span class="identifier">format_no_copy</span></code>
is set in <span class="emphasis"><em>flags</em></span> then unmatched sections of text are is set in <span class="emphasis"><em>flags</em></span> then unmatched sections of text are
not copied to output. not copied to output.
</p> </p>
<p> <p>
If the flag <tt class="computeroutput"><span class="identifier">format_first_only</span></tt> If the flag <code class="computeroutput"><span class="identifier">format_first_only</span></code>
is set in flags then only the first occurence of <span class="emphasis"><em>e</em></span> is is set in flags then only the first occurence of <span class="emphasis"><em>e</em></span> is
replaced. replaced.
</p> </p>
<p> <p>
The manner in which the format string <span class="emphasis"><em>fmt</em></span> is interpretted, The manner in which the format string <span class="emphasis"><em>fmt</em></span> is interpretted,
along with the rules used for finding matches, are determined by the flags along with the rules used for finding matches, are determined by the flags
set in <span class="emphasis"><em>flags</em></span>: see <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>. set in <span class="emphasis"><em>flags</em></span>: see <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
</p> </p>
<p> <p>
<span class="bold"><b>Effects</b></span>: Constructs an <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> object: <span class="bold"><strong>Effects</strong></span>: Constructs an <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> object:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_iterator</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
<span class="identifier">regex_iterator</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
<span class="identifier">i</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">),</span> <span class="identifier">i</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">),</span>
</pre> </pre>
<p> <p>
and uses <span class="emphasis"><em>i</em></span> to enumerate through all of the matches and uses <span class="emphasis"><em>i</em></span> to enumerate through all of the matches
<span class="emphasis"><em>m</em></span> of type <a href="match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> <tt class="computeroutput"><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span></tt> <span class="emphasis"><em>m</em></span> of type <a href="match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span></code>
that occur within the sequence [first, last). that occur within the sequence [first, last).
</p> </p>
<p> <p>
If no such matches are found and If no such matches are found and
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="special">!(</span><span class="identifier">flags</span> <span class="special">&amp;</span> <span class="identifier">format_no_copy</span><span class="special">)</span>
<span class="special">!(</span><span class="identifier">flags</span> <span class="special">&amp;</span> <span class="identifier">format_no_copy</span><span class="special">)</span>
</pre> </pre>
<p> <p>
then calls then calls
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">).</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">).</span>
</pre> </pre>
<p> <p>
Otherwise, for each match found, if Otherwise, for each match found, if
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="special">!(</span><span class="identifier">flags</span> <span class="special">&amp;</span> <span class="identifier">format_no_copy</span><span class="special">)</span>
<span class="special">!(</span><span class="identifier">flags</span> <span class="special">&amp;</span> <span class="identifier">format_no_copy</span><span class="special">)</span>
</pre> </pre>
<p> <p>
calls calls
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">),</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">),</span>
</pre> </pre>
<p> <p>
and then calls and then calls
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">m</span><span class="special">.</span><span class="identifier">format</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">).</span>
<span class="identifier">m</span><span class="special">.</span><span class="identifier">format</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">).</span>
</pre> </pre>
<p> <p>
Finally if Finally if
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="special">!(</span><span class="identifier">flags</span> <span class="special">&amp;</span> <span class="identifier">format_no_copy</span><span class="special">)</span>
<span class="special">!(</span><span class="identifier">flags</span> <span class="special">&amp;</span> <span class="identifier">format_no_copy</span><span class="special">)</span>
</pre> </pre>
<p> <p>
calls calls
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">last_m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last_m</span><span class="special">,</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">)</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">last_m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last_m</span><span class="special">,</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">)</span>
</pre> </pre>
<p> <p>
where <span class="emphasis"><em>last_m</em></span> is a copy of the last match found. where <span class="emphasis"><em>last_m</em></span> is a copy of the last match found.
</p> </p>
<p> <p>
If <tt class="computeroutput"><span class="identifier">flags</span> <span class="special">&amp;</span> If <code class="computeroutput"><span class="identifier">flags</span> <span class="special">&amp;</span>
<span class="identifier">format_first_only</span></tt> is non-zero then <span class="identifier">format_first_only</span></code> is non-zero then
only the first match found is replaced. only the first match found is replaced.
</p> </p>
<p> <p>
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> <span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if the complexity of matching the expression against an N character string if the complexity of matching the expression against an N character string
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
the expression (if Boost.Regex is configured in recursive mode), or if the the expression (if Boost.Regex is configured in recursive mode), or if the
@ -158,31 +148,29 @@
in non-recursive mode). in non-recursive mode).
</p> </p>
<p> <p>
<span class="bold"><b>Returns</b></span>: out. <span class="bold"><strong>Returns</strong></span>: out.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;&amp;</span> <span class="identifier">fmt</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Constructs an object <tt class="computeroutput"><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">result</span></tt>, calls <tt class="computeroutput"><span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="bold"><strong>Effects</strong></span>: Constructs an object <code class="computeroutput"><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">result</span></code>, calls <code class="computeroutput"><span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">fmt</span><span class="special">,</span> <span class="identifier">fmt</span><span class="special">,</span>
<span class="identifier">flags</span><span class="special">)</span></tt>, <span class="identifier">flags</span><span class="special">)</span></code>,
and then returns <tt class="computeroutput"><span class="identifier">result</span></tt>. and then returns <code class="computeroutput"><span class="identifier">result</span></code>.
</p> </p>
<a name="boost_regex.ref.regex_replace.examples"></a><h4> <a name="boost_regex.ref.regex_replace.examples"></a><h5>
<a name="id542698"></a> <a name="id576096"></a>
<a href="regex_replace.html#boost_regex.ref.regex_replace.examples">Examples</a> <a href="regex_replace.html#boost_regex.ref.regex_replace.examples">Examples</a>
</h4> </h5>
<p> <p>
The following example takes C/C++ source code as input, and outputs syntax The following example takes C/C++ source code as input, and outputs syntax
highlighted HTML code. highlighted HTML code.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">fstream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">fstream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">sstream</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">sstream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">&gt;</span>
@ -294,10 +282,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> regex_search</title> <title>regex_search</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="regex_match.html" title=" regex_match"> <link rel="prev" href="regex_match.html" title="regex_match">
<link rel="next" href="regex_replace.html" title=" regex_replace"> <link rel="next" href="regex_replace.html" title="regex_replace">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,19 +24,18 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.regex_search"></a><a href="regex_search.html" title=" regex_search"> regex_search</a></h3></div></div></div> <a name="boost_regex.ref.regex_search"></a><a href="regex_search.html" title="regex_search"> regex_search</a>
<pre class="programlisting"> </h3></div></div></div>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre> </pre>
<p> <p>
The algorithm <a href="regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> will search a range The algorithm <a href="regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a> will search a range
denoted by a pair of bidirectional-iterators for a given regular expression. denoted by a pair of bidirectional-iterators for a given regular expression.
The algorithm uses various heuristics to reduce the search time by only checking The algorithm uses various heuristics to reduce the search time by only checking
for a match if a match could conceivably start at that position. The algorithm for a match if a match could conceivably start at that position. The algorithm
is defined as follows: is defined as follows:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
<span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span>
<span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span>
@ -73,30 +72,29 @@
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<a name="boost_regex.ref.regex_search.description"></a><h4> <a name="boost_regex.ref.regex_search.description"></a><h5>
<a name="id536028"></a> <a name="id569456"></a>
<a href="regex_search.html#boost_regex.ref.regex_search.description">Description</a> <a href="regex_search.html#boost_regex.ref.regex_search.description">Description</a>
</h4> </h5>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span>
<span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Requires</b></span>: Type BidirectionalIterator meets <span class="bold"><strong>Requires</strong></span>: Type BidirectionalIterator meets
the requirements of a Bidirectional Iterator (24.1.4). the requirements of a Bidirectional Iterator (24.1.4).
</p> </p>
<p> <p>
<span class="bold"><b>Effects</b></span>: Determines whether there is some <span class="bold"><strong>Effects</strong></span>: Determines whether there is some
sub-sequence within [first,last) that matches the regular expression <span class="emphasis"><em>e</em></span>, sub-sequence within [first,last) that matches the regular expression <span class="emphasis"><em>e</em></span>,
parameter <span class="emphasis"><em>flags</em></span> is used to control how the expression parameter <span class="emphasis"><em>flags</em></span> is used to control how the expression
is matched against the character sequence. Returns true if such a sequence is matched against the character sequence. Returns true if such a sequence
exists, false otherwise. exists, false otherwise.
</p> </p>
<p> <p>
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> <span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if the complexity of matching the expression against an N character string if the complexity of matching the expression against an N character string
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
the expression (if Boost.Regex is configured in recursive mode), or if the the expression (if Boost.Regex is configured in recursive mode), or if the
@ -104,7 +102,7 @@
in non-recursive mode). in non-recursive mode).
</p> </p>
<p> <p>
<span class="bold"><b>Postconditions</b></span>: If the function returns <span class="bold"><strong>Postconditions</strong></span>: If the function returns
false, then the effect on parameter <span class="emphasis"><em>m</em></span> is undefined, false, then the effect on parameter <span class="emphasis"><em>m</em></span> is undefined,
otherwise the effects on parameter <span class="emphasis"><em>m</em></span> are given in the otherwise the effects on parameter <span class="emphasis"><em>m</em></span> are given in the
table: table:
@ -130,105 +128,105 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">e</span><span class="special">.</span><span class="identifier">mark_count</span><span class="special">()</span></tt> <code class="computeroutput"><span class="identifier">e</span><span class="special">.</span><span class="identifier">mark_count</span><span class="special">()</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="keyword">false</span></tt> <code class="computeroutput"><span class="keyword">false</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">first</span></tt> <code class="computeroutput"><span class="identifier">first</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">matched</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">matched</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span>
<span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">second</span></tt> <span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">last</span></tt> <code class="computeroutput"><span class="identifier">last</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">matched</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">matched</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span>
<span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">second</span></tt> <span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -241,7 +239,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -253,7 +251,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -266,12 +264,12 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">first</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">first</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>, the start of the sequence that For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>, the start of the sequence that
matched sub-expression <span class="emphasis"><em>n</em></span>. Alternatively, if matched sub-expression <span class="emphasis"><em>n</em></span>. Alternatively, if
sub-expression <span class="emphasis"><em>n</em></span> did not participate in the sub-expression <span class="emphasis"><em>n</em></span> did not participate in the
match, then last. match, then last.
@ -281,45 +279,43 @@
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">second</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>, the end of the sequence that matched For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>, the end of the sequence that matched
sub-expression <span class="emphasis"><em>n</em></span>. Alternatively, if sub-expression sub-expression <span class="emphasis"><em>n</em></span>. Alternatively, if sub-expression
<span class="emphasis"><em>n</em></span> did not participate in the match, then <tt class="computeroutput"><span class="identifier">last</span></tt>. <span class="emphasis"><em>n</em></span> did not participate in the match, then <code class="computeroutput"><span class="identifier">last</span></code>.
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p> <p>
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">matched</span></tt> <code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">matched</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>, true if sub-expression <span class="emphasis"><em>n</em></span> For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special">&lt;</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>, true if sub-expression <span class="emphasis"><em>n</em></span>
participated in the match, false otherwise. participated in the match, false otherwise.
</p> </p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table></div> </table></div>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span><span class="special">,</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span><span class="special">,</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span> <span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span>
<span class="special">+</span> <span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;::</span><span class="identifier">length</span><span class="special">(</span><span class="identifier">str</span><span class="special">),</span> <span class="special">+</span> <span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;::</span><span class="identifier">length</span><span class="special">(</span><span class="identifier">str</span><span class="special">),</span>
<span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>. <span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span>
<span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">&gt;::</span><span class="identifier">const_iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">&gt;::</span><span class="identifier">const_iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span>
@ -327,53 +323,49 @@
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>. <span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">iterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">iterator</span> <span class="identifier">last</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">iterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">iterator</span> <span class="identifier">last</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Behaves "as if" by constructing <span class="bold"><strong>Effects</strong></span>: Behaves "as if" by constructing
an instance of <tt class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span> <span class="identifier">what</span></tt>, an instance of <code class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;</span> <span class="identifier">what</span></code>,
and then returning the result of <tt class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> and then returning the result of <code class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">flags</span><span class="special">)</span></tt>. <span class="identifier">flags</span><span class="special">)</span></code>.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span> <span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span> <span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span>
<span class="special">+</span> <span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;::</span><span class="identifier">length</span><span class="special">(</span><span class="identifier">str</span><span class="special">),</span> <span class="special">+</span> <span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;::</span><span class="identifier">length</span><span class="special">(</span><span class="identifier">str</span><span class="special">),</span>
<span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>. <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>. <span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
</p> </p>
<a name="boost_regex.ref.regex_search.examples"></a><h4> <a name="boost_regex.ref.regex_search.examples"></a><h5>
<a name="id539302"></a> <a name="id572722"></a>
<a href="regex_search.html#boost_regex.ref.regex_search.examples">Examples</a> <a href="regex_search.html#boost_regex.ref.regex_search.examples">Examples</a>
</h4> </h5>
<p> <p>
The following example, takes the contents of a file in the form of a string, The following example, takes the contents of a file in the form of a string,
and searches for all the C++ class declarations in the file. The code will and searches for all the C++ class declarations in the file. The code will
work regardless of the way that <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></tt> work regardless of the way that <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code>
is implemented, for example it could easily be modified to work with the is implemented, for example it could easily be modified to work with the
SGI rope class, which uses a non-contiguous storage strategy. SGI rope class, which uses a non-contiguous storage strategy.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@ -417,10 +409,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> regex_token_iterator</title> <title>regex_token_iterator</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="regex_iterator.html" title=" regex_iterator"> <link rel="prev" href="regex_iterator.html" title="regex_iterator">
<link rel="next" href="bad_expression.html" title=" bad_expression"> <link rel="next" href="bad_expression.html" title="bad_expression">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -24,22 +24,22 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.regex_token_iterator"></a><a href="regex_token_iterator.html" title=" regex_token_iterator"> regex_token_iterator</a></h3></div></div></div> <a name="boost_regex.ref.regex_token_iterator"></a><a href="regex_token_iterator.html" title="regex_token_iterator"> regex_token_iterator</a>
</h3></div></div></div>
<p> <p>
The template class <a href="regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> is an iterator The template class <a href="regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> is an iterator
adapter; that is to say it represents a new view of an existing iterator adapter; that is to say it represents a new view of an existing iterator
sequence, by enumerating all the occurrences of a regular expression within sequence, by enumerating all the occurrences of a regular expression within
that sequence, and presenting one or more character sequence for each match that sequence, and presenting one or more character sequence for each match
found. Each position enumerated by the iterator is a <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> object that represents found. Each position enumerated by the iterator is a <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a> object that represents
what matched a particular sub-expression within the regular expression. When what matched a particular sub-expression within the regular expression. When
class <a href="regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> is used to class <a href="regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> is used to
enumerate a single sub-expression with index -1, then the iterator performs enumerate a single sub-expression with index -1, then the iterator performs
field splitting: that is to say it enumerates one character sequence for field splitting: that is to say it enumerates one character sequence for
each section of the character container sequence that does not match the each section of the character container sequence that does not match the
regular expression specified. regular expression specified.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
<span class="keyword">class</span> <span class="identifier">charT</span> <span class="special">=</span> <span class="identifier">iterator_traits</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;::</span><span class="identifier">value_type</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span> <span class="special">=</span> <span class="identifier">iterator_traits</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">&gt;::</span><span class="identifier">value_type</span><span class="special">,</span>
<span class="keyword">class</span> <span class="identifier">traits</span> <span class="special">=</span> <span class="identifier">regex_traits</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">traits</span> <span class="special">=</span> <span class="identifier">regex_traits</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">regex_token_iterator</span> <span class="keyword">class</span> <span class="identifier">regex_token_iterator</span>
@ -135,43 +135,41 @@
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;&amp;</span> <span class="identifier">submatch</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;&amp;</span> <span class="identifier">submatch</span><span class="special">,</span>
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<a name="boost_regex.ref.regex_token_iterator.description"></a><h4> <a name="boost_regex.ref.regex_token_iterator.description"></a><h5>
<a name="id556067"></a> <a name="id589414"></a>
<a href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.description">Description</a> <a href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.description">Description</a>
</h4> </h5>
<a name="boost_regex.regex_token_iterator.construct1"></a><p> <a name="boost_regex.regex_token_iterator.construct1"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">();</span>
<span class="identifier">regex_token_iterator</span><span class="special">();</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: constructs an end of sequence iterator. <span class="bold"><strong>Effects</strong></span>: constructs an end of sequence iterator.
</p> </p>
<a name="boost_regex.regex_token_iterator.construct2"></a><p> <a name="boost_regex.regex_token_iterator.construct2"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span>
<span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span>
<span class="identifier">BidirectionalIterator</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">b</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">regex_type</span><span class="special">&amp;</span> <span class="identifier">re</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">regex_type</span><span class="special">&amp;</span> <span class="identifier">re</span><span class="special">,</span>
<span class="keyword">int</span> <span class="identifier">submatch</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">submatch</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Preconditions</b></span>: <tt class="computeroutput"><span class="special">!</span><span class="identifier">re</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></tt>. Object <span class="emphasis"><em>re</em></span> shall exist <span class="bold"><strong>Preconditions</strong></span>: <code class="computeroutput"><span class="special">!</span><span class="identifier">re</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></code>. Object <span class="emphasis"><em>re</em></span> shall exist
for the lifetime of the iterator constructed from it. for the lifetime of the iterator constructed from it.
</p> </p>
<p> <p>
<span class="bold"><b>Effects</b></span>: constructs a <a href="regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> that will enumerate <span class="bold"><strong>Effects</strong></span>: constructs a <a href="regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> that will enumerate
one string for each regular expression match of the expression <span class="emphasis"><em>re</em></span> one string for each regular expression match of the expression <span class="emphasis"><em>re</em></span>
found within the sequence [a,b), using match flags <span class="emphasis"><em>m</em></span> found within the sequence [a,b), using match flags <span class="emphasis"><em>m</em></span>
(see <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>). (see <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>).
The string enumerated is the sub-expression <span class="emphasis"><em>submatch</em></span> The string enumerated is the sub-expression <span class="emphasis"><em>submatch</em></span>
for each match found; if <span class="emphasis"><em>submatch</em></span> is -1, then enumerates for each match found; if <span class="emphasis"><em>submatch</em></span> is -1, then enumerates
all the text sequences that did not match the expression <span class="emphasis"><em>re</em></span> all the text sequences that did not match the expression <span class="emphasis"><em>re</em></span>
(that is to performs field splitting). (that is to performs field splitting).
</p> </p>
<p> <p>
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> <span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if the complexity of matching the expression against an N character string if the complexity of matching the expression against an N character string
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
the expression (if Boost.Regex is configured in recursive mode), or if the the expression (if Boost.Regex is configured in recursive mode), or if the
@ -180,33 +178,32 @@
</p> </p>
<a name="boost_regex.regex_token_iterator.construct3"></a><p> <a name="boost_regex.regex_token_iterator.construct3"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span>
<span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span>
<span class="identifier">BidirectionalIterator</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">b</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">regex_type</span><span class="special">&amp;</span> <span class="identifier">re</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">regex_type</span><span class="special">&amp;</span> <span class="identifier">re</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;&amp;</span> <span class="identifier">submatches</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;&amp;</span> <span class="identifier">submatches</span><span class="special">,</span>
<span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Preconditions</b></span>: <tt class="computeroutput"><span class="identifier">submatches</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="bold"><strong>Preconditions</strong></span>: <code class="computeroutput"><span class="identifier">submatches</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span>
<span class="special">&amp;&amp;</span> <span class="special">!</span><span class="identifier">re</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></tt>. Object <span class="emphasis"><em>re</em></span> shall exist <span class="special">&amp;&amp;</span> <span class="special">!</span><span class="identifier">re</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></code>. Object <span class="emphasis"><em>re</em></span> shall exist
for the lifetime of the iterator constructed from it. for the lifetime of the iterator constructed from it.
</p> </p>
<p> <p>
<span class="bold"><b>Effects</b></span>: constructs a <a href="regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> that will enumerate <span class="bold"><strong>Effects</strong></span>: constructs a <a href="regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> that will enumerate
<tt class="computeroutput"><span class="identifier">submatches</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt> <code class="computeroutput"><span class="identifier">submatches</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>
strings for each regular expression match of the expression <span class="emphasis"><em>re</em></span> strings for each regular expression match of the expression <span class="emphasis"><em>re</em></span>
found within the sequence [a,b), using match flags <span class="emphasis"><em>m</em></span> found within the sequence [a,b), using match flags <span class="emphasis"><em>m</em></span>
(see <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>). (see <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>).
For each match found one string will be enumerated for each sub-expression For each match found one string will be enumerated for each sub-expression
index contained within submatches vector; if <tt class="computeroutput"><span class="identifier">submatches</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></tt> index contained within submatches vector; if <code class="computeroutput"><span class="identifier">submatches</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></code>
is -1, then the first string enumerated for each match will be all of the is -1, then the first string enumerated for each match will be all of the
text from end of the last match to the start of the current match, in addition text from end of the last match to the start of the current match, in addition
there will be one extra string enumerated when no more matches can be found: there will be one extra string enumerated when no more matches can be found:
from the end of the last match found, to the end of the underlying sequence. from the end of the last match found, to the end of the underlying sequence.
</p> </p>
<p> <p>
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> <span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if the complexity of matching the expression against an N character string if the complexity of matching the expression against an N character string
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
the expression (if Boost.Regex is configured in recursive mode), or if the the expression (if Boost.Regex is configured in recursive mode), or if the
@ -215,8 +212,7 @@
</p> </p>
<a name="boost_regex.regex_token_iterator.construct4"></a><p> <a name="boost_regex.regex_token_iterator.construct4"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">&gt;</span>
<span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span>
<span class="identifier">BidirectionalIterator</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">b</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">regex_type</span><span class="special">&amp;</span> <span class="identifier">re</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">regex_type</span><span class="special">&amp;</span> <span class="identifier">re</span><span class="special">,</span>
@ -224,23 +220,23 @@
<span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Preconditions</b></span>: <tt class="computeroutput"><span class="special">!</span><span class="identifier">re</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></tt>. Object <span class="emphasis"><em>re</em></span> shall exist <span class="bold"><strong>Preconditions</strong></span>: <code class="computeroutput"><span class="special">!</span><span class="identifier">re</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></code>. Object <span class="emphasis"><em>re</em></span> shall exist
for the lifetime of the iterator constructed from it. for the lifetime of the iterator constructed from it.
</p> </p>
<p> <p>
<span class="bold"><b>Effects</b></span>: constructs a <a href="regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> that will enumerate <span class="bold"><strong>Effects</strong></span>: constructs a <a href="regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> that will enumerate
<span class="emphasis"><em>R</em></span> strings for each regular expression match of the expression <span class="emphasis"><em>R</em></span> strings for each regular expression match of the expression
<span class="emphasis"><em>re</em></span> found within the sequence [a,b), using match flags <span class="emphasis"><em>re</em></span> found within the sequence [a,b), using match flags
<span class="emphasis"><em>m</em></span> (see <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>). For each match <span class="emphasis"><em>m</em></span> (see <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>). For each match
found one string will be enumerated for each sub-expression index contained found one string will be enumerated for each sub-expression index contained
within the <span class="emphasis"><em>submatches</em></span> array; if <tt class="computeroutput"><span class="identifier">submatches</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></tt> within the <span class="emphasis"><em>submatches</em></span> array; if <code class="computeroutput"><span class="identifier">submatches</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></code>
is -1, then the first string enumerated for each match will be all of the is -1, then the first string enumerated for each match will be all of the
text from end of the last match to the start of the current match, in addition text from end of the last match to the start of the current match, in addition
there will be one extra string enumerated when no more matches can be found: there will be one extra string enumerated when no more matches can be found:
from the end of the last match found, to the end of the underlying sequence. from the end of the last match found, to the end of the underlying sequence.
</p> </p>
<p> <p>
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> <span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if the complexity of matching the expression against an N character string if the complexity of matching the expression against an N character string
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
the expression (if Boost.Regex is configured in recursive mode), or if the the expression (if Boost.Regex is configured in recursive mode), or if the
@ -249,70 +245,63 @@
</p> </p>
<a name="boost_regex.regex_token_iterator.construct5"></a><p> <a name="boost_regex.regex_token_iterator.construct5"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&amp;</span> <span class="identifier">that</span><span class="special">);</span>
<span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&amp;</span> <span class="identifier">that</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: constructs a copy of <tt class="computeroutput"><span class="identifier">that</span></tt>. <span class="bold"><strong>Effects</strong></span>: constructs a copy of <code class="computeroutput"><span class="identifier">that</span></code>.
</p> </p>
<p> <p>
<span class="bold"><b>Postconditions</b></span>: <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span></tt>. <span class="bold"><strong>Postconditions</strong></span>: <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span></code>.
</p> </p>
<a name="boost_regex.regex_token_iterator.assign"></a><p> <a name="boost_regex.regex_token_iterator.assign"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&amp;</span> <span class="identifier">that</span><span class="special">);</span>
<span class="identifier">regex_token_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&amp;</span> <span class="identifier">that</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: sets <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt> to be equal to <tt class="computeroutput"><span class="identifier">that</span></tt>. <span class="bold"><strong>Effects</strong></span>: sets <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> to be equal to <code class="computeroutput"><span class="identifier">that</span></code>.
</p> </p>
<p> <p>
<span class="bold"><b>Postconditions</b></span>: <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span></tt>. <span class="bold"><strong>Postconditions</strong></span>: <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span></code>.
</p> </p>
<a name="boost_regex.regex_token_iterator.op_eq"></a><p> <a name="boost_regex.regex_token_iterator.op_eq"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&amp;)</span><span class="keyword">const</span><span class="special">;</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&amp;)</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns true if <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt> is the same position as <tt class="computeroutput"><span class="identifier">that</span></tt>. <span class="bold"><strong>Effects</strong></span>: returns true if <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> is the same position as <code class="computeroutput"><span class="identifier">that</span></code>.
</p> </p>
<a name="boost_regex.regex_token_iterator.op_ne"></a><p> <a name="boost_regex.regex_token_iterator.op_ne"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&amp;)</span><span class="keyword">const</span><span class="special">;</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&amp;)</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">!(*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span><span class="special">)</span></tt>. <span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">!(*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span><span class="special">)</span></code>.
</p> </p>
<a name="boost_regex.regex_token_iterator.op_deref"></a><p> <a name="boost_regex.regex_token_iterator.op_deref"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">*()</span><span class="keyword">const</span><span class="special">;</span>
<span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">*()</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns the current character sequence <span class="bold"><strong>Effects</strong></span>: returns the current character sequence
being enumerated. being enumerated.
</p> </p>
<a name="boost_regex.regex_token_iterator.op_arrow"></a><p> <a name="boost_regex.regex_token_iterator.op_arrow"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">-&gt;()</span><span class="keyword">const</span><span class="special">;</span>
<span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">-&gt;()</span><span class="keyword">const</span><span class="special">;</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">&amp;(*</span><span class="keyword">this</span><span class="special">)</span></tt>. <span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">&amp;(*</span><span class="keyword">this</span><span class="special">)</span></code>.
</p> </p>
<a name="boost_regex.regex_token_iterator.op_inc1"></a><p> <a name="boost_regex.regex_token_iterator.op_inc1"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">++();</span>
<span class="identifier">regex_token_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">++();</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: Moves on to the next character <span class="bold"><strong>Effects</strong></span>: Moves on to the next character
sequence to be enumerated. sequence to be enumerated.
</p> </p>
<p> <p>
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> <span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
if the complexity of matching the expression against an N character string if the complexity of matching the expression against an N character string
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
the expression (if Boost.Regex is configured in recursive mode), or if the the expression (if Boost.Regex is configured in recursive mode), or if the
@ -320,24 +309,22 @@
in non-recursive mode). in non-recursive mode).
</p> </p>
<p> <p>
<span class="bold"><b>Returns</b></span>: <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt>. <span class="bold"><strong>Returns</strong></span>: <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
</p> </p>
<a name="boost_regex.regex_token_iterator.op_inc2"></a><p> <a name="boost_regex.regex_token_iterator.op_inc2"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
<span class="identifier">regex_token_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: constructs a copy result of <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt>, then <span class="bold"><strong>Effects</strong></span>: constructs a copy result of <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>, then
calls <tt class="computeroutput"><span class="special">++(*</span><span class="keyword">this</span><span class="special">)</span></tt>. calls <code class="computeroutput"><span class="special">++(*</span><span class="keyword">this</span><span class="special">)</span></code>.
</p> </p>
<p> <p>
<span class="bold"><b>Returns</b></span>: result. <span class="bold"><strong>Returns</strong></span>: result.
</p> </p>
<a name="boost_regex.regex_token_iterator.make"></a><p> <a name="boost_regex.regex_token_iterator.make"></a><p>
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="identifier">regex_token_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;</span> <span class="identifier">regex_token_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;</span>
<span class="identifier">make_regex_token_iterator</span><span class="special">(</span> <span class="identifier">make_regex_token_iterator</span><span class="special">(</span>
<span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
@ -388,22 +375,21 @@
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
</pre> </pre>
<p> <p>
<span class="bold"><b>Effects</b></span>: returns a <a href="regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> that enumerates <span class="bold"><strong>Effects</strong></span>: returns a <a href="regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> that enumerates
one <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> one <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
for each value in <span class="emphasis"><em>submatch</em></span> for each occurrence of regular for each value in <span class="emphasis"><em>submatch</em></span> for each occurrence of regular
expression <span class="emphasis"><em>e</em></span> in string <span class="emphasis"><em>p</em></span>, matched expression <span class="emphasis"><em>e</em></span> in string <span class="emphasis"><em>p</em></span>, matched
using <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> using <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>
<span class="emphasis"><em>m</em></span>. <span class="emphasis"><em>m</em></span>.
</p> </p>
<a name="boost_regex.ref.regex_token_iterator.examples"></a><h4> <a name="boost_regex.ref.regex_token_iterator.examples"></a><h5>
<a name="id560313"></a> <a name="id593630"></a>
<a href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.examples">Examples</a> <a href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.examples">Examples</a>
</h4> </h5>
<p> <p>
The following example takes a string and splits it into a series of tokens: The following example takes a string and splits it into a series of tokens:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">std</span><span class="special">;</span> <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">std</span><span class="special">;</span>
@ -441,8 +427,7 @@
The following example takes a html file and outputs a list of all the linked The following example takes a html file and outputs a list of all the linked
files: files:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">fstream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">fstream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@ -511,10 +496,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> regex_traits</title> <title>regex_traits</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="error_type.html" title=" error_type"> <link rel="prev" href="error_type.html" title="error_type">
<link rel="next" href="non_std_strings.html" title=" Interfacing With Non-Standard <link rel="next" href="non_std_strings.html" title="Interfacing With Non-Standard String Types">
String Types">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.regex_traits"></a><a href="regex_traits.html" title=" regex_traits"> regex_traits</a></h3></div></div></div> <a name="boost_regex.ref.regex_traits"></a><a href="regex_traits.html" title="regex_traits"> regex_traits</a>
<pre class="programlisting"> </h3></div></div></div>
<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">implementationT</span> <span class="special">=</span> <span class="identifier">sensible_default_choice</span><span class="special">&gt;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">implementationT</span> <span class="special">=</span> <span class="identifier">sensible_default_choice</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">regex_traits</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">implementationT</span> <span class="keyword">struct</span> <span class="identifier">regex_traits</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">implementationT</span>
@ -39,35 +38,35 @@
<span class="keyword">struct</span> <span class="identifier">c_regex_traits</span><span class="special">;</span> <span class="keyword">struct</span> <span class="identifier">c_regex_traits</span><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">cpp_regex_traits</span><span class="special">;</span> <span class="keyword">class</span> <span class="identifier">cpp_regex_traits</span><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">w32_regex_traits</span><span class="special">;</span> <span class="keyword">class</span> <span class="identifier">w32_regex_traits</span><span class="special">;</span>
<span class="special">}</span> <span class="comment">// namespace boost <span class="special">}</span> <span class="comment">// namespace boost
</span></pre> </span></pre>
<a name="boost_regex.ref.regex_traits.description"></a><h4> <a name="boost_regex.ref.regex_traits.description"></a><h5>
<a name="id570424"></a> <a name="id603542"></a>
<a href="regex_traits.html#boost_regex.ref.regex_traits.description">Description</a> <a href="regex_traits.html#boost_regex.ref.regex_traits.description">Description</a>
</h4> </h5>
<p> <p>
The class <tt class="computeroutput"><span class="identifier">regex_traits</span></tt> is The class <code class="computeroutput"><span class="identifier">regex_traits</span></code> is
just a thin wrapper around an actual implemention class, which may be one just a thin wrapper around an actual implemention class, which may be one
of: of:
</p> </p>
<div class="itemizedlist"><ul type="disc"> <div class="itemizedlist"><ul type="disc">
<li> <li>
<tt class="computeroutput"><span class="identifier">c_regex_traits</span></tt>: this class <code class="computeroutput"><span class="identifier">c_regex_traits</span></code>: this class
is deprecated, it wraps the C locale, and is used as the default implementation is deprecated, it wraps the C locale, and is used as the default implementation
when the platform is not Win32, and the C++ locale is not available. when the platform is not Win32, and the C++ locale is not available.
</li> </li>
<li> <li>
<tt class="computeroutput"><span class="identifier">cpp_regex_traits</span></tt>: the default <code class="computeroutput"><span class="identifier">cpp_regex_traits</span></code>: the default
traits class for non-Win32 platforms, allows the regex class to be imbued traits class for non-Win32 platforms, allows the regex class to be imbued
with a std::locale instance. with a std::locale instance.
</li> </li>
<li> <li>
<tt class="computeroutput"><span class="identifier">w32_regex_traits</span></tt>: the default <code class="computeroutput"><span class="identifier">w32_regex_traits</span></code>: the default
traits class implementation on Win32 platforms, allows the regex class traits class implementation on Win32 platforms, allows the regex class
to be imbued with an LCID. to be imbued with an LCID.
</li> </li>
@ -78,26 +77,26 @@
</p> </p>
<div class="itemizedlist"><ul type="disc"> <div class="itemizedlist"><ul type="disc">
<li> <li>
BOOST_REGEX_USE_C_LOCALE: makes <tt class="computeroutput"><span class="identifier">c_regex_traits</span></tt> BOOST_REGEX_USE_C_LOCALE: makes <code class="computeroutput"><span class="identifier">c_regex_traits</span></code>
the default. the default.
</li> </li>
<li> <li>
BOOST_REGEX_USE_CPP_LOCALE: makes <tt class="computeroutput"><span class="identifier">cpp_regex_traits</span></tt> BOOST_REGEX_USE_CPP_LOCALE: makes <code class="computeroutput"><span class="identifier">cpp_regex_traits</span></code>
the default. the default.
</li> </li>
</ul></div> </ul></div>
<p> <p>
All these traits classes fulfil the <a href="concepts/traits_concept.html" title=" Traits Class All these traits classes fulfil the <a href="concepts/traits_concept.html" title="Traits Class Requirements">traits
Requirements">traits
class requirements</a>. class requirements</a>.
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> syntax_option_type</title> <title>syntax_option_type</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference"> <link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="bad_expression.html" title=" bad_expression"> <link rel="prev" href="bad_expression.html" title="bad_expression">
<link rel="next" href="syntax_option_type/syntax_option_type_synopsis.html" title=" <link rel="next" href="syntax_option_type/syntax_option_type_synopsis.html" title="syntax_option_type Synopsis">
syntax_option_type Synopsis">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.syntax_option_type"></a><a href="syntax_option_type.html" title=" syntax_option_type"> syntax_option_type</a></h3></div></div></div> <a name="boost_regex.ref.syntax_option_type"></a><a href="syntax_option_type.html" title="syntax_option_type"> syntax_option_type</a>
</h3></div></div></div>
<div class="toc"><dl> <div class="toc"><dl>
<dt><span class="section"><a href="syntax_option_type/syntax_option_type_synopsis.html"> <dt><span class="section"><a href="syntax_option_type/syntax_option_type_synopsis.html">
syntax_option_type Synopsis</a></span></dt> syntax_option_type Synopsis</a></span></dt>
@ -43,10 +43,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,24 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Options for POSIX Basic Regular Expressions</title>
Options for POSIX Basic Regular Expressions</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax_option_type.html" title=" syntax_option_type"> <link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
<link rel="prev" href="syntax_option_type_extended.html" title=" <link rel="prev" href="syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions">
Options for POSIX Extended Regular Expressions"> <link rel="next" href="syntax_option_type_literal.html" title="Options for Literal Strings">
<link rel="next" href="syntax_option_type_literal.html" title="
Options for Literal Strings">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -27,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_basic"></a><a href="syntax_option_type_basic.html" title=" <a name="boost_regex.ref.syntax_option_type.syntax_option_type_basic"></a><a href="syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">
Options for POSIX Basic Regular Expressions"> Options for POSIX Basic Regular Expressions</a>
Options for POSIX Basic Regular Expressions</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
Exactly one of the following must always be set for POSIX basic regular Exactly one of the following must always be set for POSIX basic regular
expressions: expressions:
@ -72,8 +69,7 @@
<td> <td>
<p> <p>
Specifies that the grammar recognized by the regular expression Specifies that the grammar recognized by the regular expression
engine is the same as that used by <a href="../../syntax/basic_syntax.html" title=" POSIX Basic Regular engine is the same as that used by <a href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX
Expression Syntax">POSIX
basic regular expressions</a> in IEEE Std 1003.1-2001, Portable basic regular expressions</a> in IEEE Std 1003.1-2001, Portable
Operating System Interface (POSIX ), Base Definitions and Headers, Operating System Interface (POSIX ), Base Definitions and Headers,
Section 9, Regular Expressions (FWD.1). Section 9, Regular Expressions (FWD.1).
@ -111,13 +107,12 @@
<td> <td>
<p> <p>
Specifies that the grammar recognized by the regular expression Specifies that the grammar recognized by the regular expression
engine is the same as that used by POSIX utility <tt class="computeroutput"><span class="identifier">grep</span></tt> in IEEE Std 1003.1-2001, engine is the same as that used by POSIX utility <code class="computeroutput"><span class="identifier">grep</span></code> in IEEE Std 1003.1-2001,
Portable Operating System Interface (POSIX ), Shells and Utilities, Portable Operating System Interface (POSIX ), Shells and Utilities,
Section 4, Utilit\ies, grep (FWD.1). Section 4, Utilit\ies, grep (FWD.1).
</p> </p>
<p> <p>
That is to say, the same as <a href="../../syntax/basic_syntax.html" title=" POSIX Basic Regular That is to say, the same as <a href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX
Expression Syntax">POSIX
basic syntax</a>, but with the newline character acting as an basic syntax</a>, but with the newline character acting as an
alternation character; the expression is treated as a newline separated alternation character; the expression is treated as a newline separated
list of alternatives. list of alternatives.
@ -137,8 +132,7 @@
</td> </td>
<td> <td>
<p> <p>
Specifies that the grammar recognised is the superset of the <a href="../../syntax/basic_syntax.html" title=" POSIX Basic Regular Specifies that the grammar recognised is the superset of the <a href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX-Basic syntax</a>
Expression Syntax">POSIX-Basic syntax</a>
used by the emacs program. used by the emacs program.
</p> </p>
</td> </td>
@ -205,7 +199,7 @@
<p> <p>
Specifies that when a regular expression is matched against a character Specifies that when a regular expression is matched against a character
container sequence, then no sub-expression matches are to be stored container sequence, then no sub-expression matches are to be stored
in the supplied <a href="../match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> structure. in the supplied <a href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> structure.
</p> </p>
</td> </td>
</tr> </tr>
@ -243,9 +237,8 @@
</td> </td>
<td> <td>
<p> <p>
Specifies that character ranges of the form <tt class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></tt> Specifies that character ranges of the form <code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></code>
should be locale sensitive. This bit is on by default for <a href="../../syntax/basic_syntax.html" title=" POSIX Basic Regular should be locale sensitive. This bit is on by default for <a href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX-Basic regular expressions</a>,
Expression Syntax">POSIX-Basic regular expressions</a>,
but can be unset to force ranges to be compared by code point only. but can be unset to force ranges to be compared by code point only.
</p> </p>
</td> </td>
@ -265,7 +258,7 @@
<p> <p>
Specifies that the \n character has the same effect as the alternation Specifies that the \n character has the same effect as the alternation
operator |. Allows newline separated lists to be used as a list operator |. Allows newline separated lists to be used as a list
of alternatives. This bit is already set, if you use the <tt class="computeroutput"><span class="identifier">grep</span></tt> option. of alternatives. This bit is already set, if you use the <code class="computeroutput"><span class="identifier">grep</span></code> option.
</p> </p>
</td> </td>
</tr> </tr>
@ -282,7 +275,7 @@
</td> </td>
<td> <td>
<p> <p>
When set then character classes such as <tt class="computeroutput"><span class="special">[[:</span><span class="identifier">alnum</span><span class="special">:]]</span></tt> When set then character classes such as <code class="computeroutput"><span class="special">[[:</span><span class="identifier">alnum</span><span class="special">:]]</span></code>
are not allowed. are not allowed.
</p> </p>
</td> </td>
@ -301,9 +294,8 @@
<td> <td>
<p> <p>
When set this makes the escape character ordinary inside lists, When set this makes the escape character ordinary inside lists,
so that <tt class="computeroutput"><span class="special">[\</span><span class="identifier">b</span><span class="special">]</span></tt> would match either '\' or 'b'. so that <code class="computeroutput"><span class="special">[\</span><span class="identifier">b</span><span class="special">]</span></code> would match either '\' or 'b'.
This bit is on by default for <a href="../../syntax/basic_syntax.html" title=" POSIX Basic Regular This bit is on by default for <a href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX-basic
Expression Syntax">POSIX-basic
regular expressions</a>, but can be unset to force escapes to regular expressions</a>, but can be unset to force escapes to
be recognised inside lists. be recognised inside lists.
</p> </p>
@ -339,8 +331,8 @@
</td> </td>
<td> <td>
<p> <p>
When set then <tt class="computeroutput"><span class="special">\?</span></tt> acts When set then <code class="computeroutput"><span class="special">\?</span></code> acts
as a zero-or-one repeat operator, and <tt class="computeroutput"><span class="special">\+</span></tt> as a zero-or-one repeat operator, and <code class="computeroutput"><span class="special">\+</span></code>
acts as a one-or-more repeat operator. acts as a one-or-more repeat operator.
</p> </p>
</td> </td>
@ -358,7 +350,7 @@
</td> </td>
<td> <td>
<p> <p>
When set then <tt class="computeroutput"><span class="special">\|</span></tt> acts When set then <code class="computeroutput"><span class="special">\|</span></code> acts
as the alternation operator. as the alternation operator.
</p> </p>
</td> </td>
@ -376,7 +368,7 @@
</td> </td>
<td> <td>
<p> <p>
Prevents <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> from throwing Prevents <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> from throwing
an exception when an invalid expression is encountered. an exception when an invalid expression is encountered.
</p> </p>
</td> </td>
@ -386,10 +378,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,24 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Options for POSIX Extended Regular Expressions</title>
Options for POSIX Extended Regular Expressions</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax_option_type.html" title=" syntax_option_type"> <link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
<link rel="prev" href="syntax_option_type_perl.html" title=" <link rel="prev" href="syntax_option_type_perl.html" title="Options for Perl Regular Expressions">
Options for Perl Regular Expressions"> <link rel="next" href="syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">
<link rel="next" href="syntax_option_type_basic.html" title="
Options for POSIX Basic Regular Expressions">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -27,12 +24,11 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_extended"></a><a href="syntax_option_type_extended.html" title=" <a name="boost_regex.ref.syntax_option_type.syntax_option_type_extended"></a><a href="syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions">
Options for POSIX Extended Regular Expressions"> Options for POSIX Extended Regular Expressions</a>
Options for POSIX Extended Regular Expressions</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
Exactly one of the following must always be set for <a href="../../syntax/basic_extended.html" title=" POSIX Extended Regular Exactly one of the following must always be set for <a href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX
Expression Syntax">POSIX
extended regular expressions</a>: extended regular expressions</a>:
</p> </p>
<div class="informaltable"><table class="table"> <div class="informaltable"><table class="table">
@ -79,8 +75,7 @@
(FWD.1). (FWD.1).
</p> </p>
<p> <p>
Refer to the <a href="../../syntax/basic_extended.html" title=" POSIX Extended Regular Refer to the <a href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX
Expression Syntax">POSIX
extended regular expression guide</a> for more information. extended regular expression guide</a> for more information.
</p> </p>
<p> <p>
@ -111,8 +106,7 @@
grep (FWD.1). grep (FWD.1).
</p> </p>
<p> <p>
That is to say, the same as <a href="../../syntax/basic_extended.html" title=" POSIX Extended Regular That is to say, the same as <a href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX
Expression Syntax">POSIX
extended syntax</a>, but with the newline character acting as extended syntax</a>, but with the newline character acting as
an alternation character in addition to "|". an alternation character in addition to "|".
</p> </p>
@ -137,8 +131,7 @@
and Utilities, Section 4, awk (FWD.1). and Utilities, Section 4, awk (FWD.1).
</p> </p>
<p> <p>
That is to say: the same as <a href="../../syntax/basic_extended.html" title=" POSIX Extended Regular That is to say: the same as <a href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX
Expression Syntax">POSIX
extended syntax</a>, but with escape sequences in character extended syntax</a>, but with escape sequences in character
classes permitted. classes permitted.
</p> </p>
@ -214,7 +207,7 @@
<p> <p>
Specifies that when a regular expression is matched against a character Specifies that when a regular expression is matched against a character
container sequence, then no sub-expression matches are to be stored container sequence, then no sub-expression matches are to be stored
in the supplied <a href="../match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> structure. in the supplied <a href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> structure.
</p> </p>
</td> </td>
</tr> </tr>
@ -252,7 +245,7 @@
</td> </td>
<td> <td>
<p> <p>
Specifies that character ranges of the form <tt class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></tt> Specifies that character ranges of the form <code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></code>
should be locale sensitive. This bit is on by default for POSIX-Extended should be locale sensitive. This bit is on by default for POSIX-Extended
regular expressions, but can be unset to force ranges to be compared regular expressions, but can be unset to force ranges to be compared
by code point only. by code point only.
@ -292,7 +285,7 @@
<td> <td>
<p> <p>
When set this makes the escape character ordinary inside lists, When set this makes the escape character ordinary inside lists,
so that <tt class="computeroutput"><span class="special">[\</span><span class="identifier">b</span><span class="special">]</span></tt> would match either '\' or 'b'. so that <code class="computeroutput"><span class="special">[\</span><span class="identifier">b</span><span class="special">]</span></code> would match either '\' or 'b'.
This bit is on by default for POSIX-Extended regular expressions, This bit is on by default for POSIX-Extended regular expressions,
but can be unset to force escapes to be recognised inside lists. but can be unset to force escapes to be recognised inside lists.
</p> </p>
@ -330,7 +323,7 @@
</td> </td>
<td> <td>
<p> <p>
Prevents <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> from throwing Prevents <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> from throwing
an exception when an invalid expression is encountered. an exception when an invalid expression is encountered.
</p> </p>
</td> </td>
@ -340,10 +333,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,23 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Options for Literal Strings</title>
Options for Literal Strings</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax_option_type.html" title=" syntax_option_type"> <link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
<link rel="prev" href="syntax_option_type_basic.html" title=" <link rel="prev" href="syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">
Options for POSIX Basic Regular Expressions"> <link rel="next" href="../match_flag_type.html" title="match_flag_type">
<link rel="next" href="../match_flag_type.html" title=" match_flag_type">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_literal"></a><a href="syntax_option_type_literal.html" title=" <a name="boost_regex.ref.syntax_option_type.syntax_option_type_literal"></a><a href="syntax_option_type_literal.html" title="Options for Literal Strings">
Options for Literal Strings"> Options for Literal Strings</a>
Options for Literal Strings</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
The following must always be set to interpret the expression as a string The following must always be set to interpret the expression as a string
literal: literal:
@ -145,10 +143,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,24 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Overview of syntax_option_type</title>
Overview of syntax_option_type</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax_option_type.html" title=" syntax_option_type"> <link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
<link rel="prev" href="syntax_option_type_synopsis.html" title=" <link rel="prev" href="syntax_option_type_synopsis.html" title="syntax_option_type Synopsis">
syntax_option_type Synopsis"> <link rel="next" href="syntax_option_type_perl.html" title="Options for Perl Regular Expressions">
<link rel="next" href="syntax_option_type_perl.html" title="
Options for Perl Regular Expressions">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -27,38 +24,35 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_overview"></a><a href="syntax_option_type_overview.html" title=" <a name="boost_regex.ref.syntax_option_type.syntax_option_type_overview"></a><a href="syntax_option_type_overview.html" title="Overview of syntax_option_type">
Overview of syntax_option_type"> Overview of syntax_option_type</a>
Overview of syntax_option_type</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
The type <a href="../syntax_option_type.html" title=" syntax_option_type"><tt class="computeroutput"><span class="identifier">syntax_option_type</span></tt></a> is an implementation The type <a href="../syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> is an implementation
specific bitmask type (see C++ standard 17.3.2.1.2). Setting its elements specific bitmask type (see C++ standard 17.3.2.1.2). Setting its elements
has the effects listed in the table below, a valid value of type <a href="../syntax_option_type.html" title=" syntax_option_type"><tt class="computeroutput"><span class="identifier">syntax_option_type</span></tt></a> has the effects listed in the table below, a valid value of type <a href="../syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a>
will always have exactly one of the elements <tt class="computeroutput"><span class="identifier">normal</span></tt>, will always have exactly one of the elements <code class="computeroutput"><span class="identifier">normal</span></code>,
<tt class="computeroutput"><span class="identifier">basic</span></tt>, <tt class="computeroutput"><span class="identifier">extended</span></tt>, <code class="computeroutput"><span class="identifier">basic</span></code>, <code class="computeroutput"><span class="identifier">extended</span></code>,
<tt class="computeroutput"><span class="identifier">awk</span></tt>, <tt class="computeroutput"><span class="identifier">grep</span></tt>, <code class="computeroutput"><span class="identifier">awk</span></code>, <code class="computeroutput"><span class="identifier">grep</span></code>,
<tt class="computeroutput"><span class="identifier">egrep</span></tt>, <tt class="computeroutput"><span class="identifier">sed</span></tt>, <code class="computeroutput"><span class="identifier">egrep</span></code>, <code class="computeroutput"><span class="identifier">sed</span></code>,
<tt class="computeroutput"><span class="identifier">literal</span></tt> or <tt class="computeroutput"><span class="identifier">perl</span></tt> set. <code class="computeroutput"><span class="identifier">literal</span></code> or <code class="computeroutput"><span class="identifier">perl</span></code> set.
</p> </p>
<p> <p>
Note that for convenience all the constants listed here are duplicated Note that for convenience all the constants listed here are duplicated
within the scope of class template <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>, so you can use any within the scope of class template <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>, so you can use any
of: of:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">constant_name</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">constant_name</span>
</pre> </pre>
<p> <p>
or or
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">constant_name</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">constant_name</span>
</pre> </pre>
<p> <p>
or or
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">wregex</span><span class="special">::</span><span class="identifier">constant_name</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">wregex</span><span class="special">::</span><span class="identifier">constant_name</span>
</pre> </pre>
<p> <p>
in an interchangeable manner. in an interchangeable manner.
@ -66,10 +60,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,24 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Options for Perl Regular Expressions</title>
Options for Perl Regular Expressions</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax_option_type.html" title=" syntax_option_type"> <link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
<link rel="prev" href="syntax_option_type_overview.html" title=" <link rel="prev" href="syntax_option_type_overview.html" title="Overview of syntax_option_type">
Overview of syntax_option_type"> <link rel="next" href="syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions">
<link rel="next" href="syntax_option_type_extended.html" title="
Options for POSIX Extended Regular Expressions">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -27,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_perl"></a><a href="syntax_option_type_perl.html" title=" <a name="boost_regex.ref.syntax_option_type.syntax_option_type_perl"></a><a href="syntax_option_type_perl.html" title="Options for Perl Regular Expressions">
Options for Perl Regular Expressions"> Options for Perl Regular Expressions</a>
Options for Perl Regular Expressions</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
One of the following must always be set for perl regular expressions: One of the following must always be set for perl regular expressions:
</p> </p>
@ -76,12 +73,11 @@
part 10, RegExp (Regular Expression) Objects (FWD.1). part 10, RegExp (Regular Expression) Objects (FWD.1).
</p> </p>
<p> <p>
This is functionally identical to the <a href="../../syntax/perl_syntax.html" title=" Perl Regular Expression This is functionally identical to the <a href="../../syntax/perl_syntax.html" title="Perl Regular Expression Syntax">Perl
Syntax">Perl
regular expression syntax</a>. regular expression syntax</a>.
</p> </p>
<p> <p>
Boost.Regex also recognizes all of the perl-compatible <tt class="computeroutput"><span class="special">(?...)</span></tt> extensions in this mode. Boost.Regex also recognizes all of the perl-compatible <code class="computeroutput"><span class="special">(?...)</span></code> extensions in this mode.
</p> </p>
</td> </td>
</tr> </tr>
@ -215,7 +211,7 @@
<p> <p>
Specifies that when a regular expression is matched against a character Specifies that when a regular expression is matched against a character
container sequence, then no sub-expression matches are to be stored container sequence, then no sub-expression matches are to be stored
in the supplied <a href="../match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> structure. in the supplied <a href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> structure.
</p> </p>
</td> </td>
</tr> </tr>
@ -253,7 +249,7 @@
</td> </td>
<td> <td>
<p> <p>
Specifies that character ranges of the form <tt class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></tt> Specifies that character ranges of the form <code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></code>
should be locale sensitive. should be locale sensitive.
</p> </p>
</td> </td>
@ -290,7 +286,7 @@
</td> </td>
<td> <td>
<p> <p>
Prevents <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> from throwing Prevents <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> from throwing
an exception when an invalid expression is encountered. an exception when an invalid expression is encountered.
</p> </p>
</td> </td>
@ -329,9 +325,9 @@
<td> <td>
<p> <p>
Normally whether Boost.Regex will match "." against a Normally whether Boost.Regex will match "." against a
newline character is determined by the match flag <tt class="computeroutput"><span class="identifier">match_dot_not_newline</span></tt>. Specifying newline character is determined by the match flag <code class="computeroutput"><span class="identifier">match_dot_not_newline</span></code>. Specifying
this flag is equivalent to prefixing the expression with <tt class="computeroutput"><span class="special">(?-</span><span class="identifier">s</span><span class="special">)</span></tt> and therefore causes "." this flag is equivalent to prefixing the expression with <code class="computeroutput"><span class="special">(?-</span><span class="identifier">s</span><span class="special">)</span></code> and therefore causes "."
not to match a newline character regardless of whether <tt class="computeroutput"><span class="identifier">match_not_dot_newline</span></tt> is set not to match a newline character regardless of whether <code class="computeroutput"><span class="identifier">match_not_dot_newline</span></code> is set
in the match flags. in the match flags.
</p> </p>
</td> </td>
@ -350,9 +346,9 @@
<td> <td>
<p> <p>
Normally whether Boost.Regex will match "." against a Normally whether Boost.Regex will match "." against a
newline character is determined by the match flag <tt class="computeroutput"><span class="identifier">match_dot_not_newline</span></tt>. Specifying newline character is determined by the match flag <code class="computeroutput"><span class="identifier">match_dot_not_newline</span></code>. Specifying
this flag is equivalent to prefixing the expression with <tt class="computeroutput"><span class="special">(?</span><span class="identifier">s</span><span class="special">)</span></tt> and therefore causes "." this flag is equivalent to prefixing the expression with <code class="computeroutput"><span class="special">(?</span><span class="identifier">s</span><span class="special">)</span></code> and therefore causes "."
to match a newline character regardless of whether <tt class="computeroutput"><span class="identifier">match_not_dot_newline</span></tt> is set to match a newline character regardless of whether <code class="computeroutput"><span class="identifier">match_not_dot_newline</span></code> is set
in the match flags. in the match flags.
</p> </p>
</td> </td>
@ -380,10 +376,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,23 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>syntax_option_type Synopsis</title>
syntax_option_type Synopsis</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax_option_type.html" title=" syntax_option_type"> <link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
<link rel="prev" href="../syntax_option_type.html" title=" syntax_option_type"> <link rel="prev" href="../syntax_option_type.html" title="syntax_option_type">
<link rel="next" href="syntax_option_type_overview.html" title=" <link rel="next" href="syntax_option_type_overview.html" title="Overview of syntax_option_type">
Overview of syntax_option_type">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,18 +24,17 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_synopsis"></a><a href="syntax_option_type_synopsis.html" title=" <a name="boost_regex.ref.syntax_option_type.syntax_option_type_synopsis"></a><a href="syntax_option_type_synopsis.html" title="syntax_option_type Synopsis">
syntax_option_type Synopsis"> syntax_option_type Synopsis</a>
syntax_option_type Synopsis</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
Type <a href="../syntax_option_type.html" title=" syntax_option_type"><tt class="computeroutput"><span class="identifier">syntax_option_type</span></tt></a> Type <a href="../syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a>
is an implementation specific bitmask type that controls how a regular is an implementation specific bitmask type that controls how a regular
expression string is to be interpreted. For convenience note that all the expression string is to be interpreted. For convenience note that all the
constants listed here, are also duplicated within the scope of class template constants listed here, are also duplicated within the scope of class template
<a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>. <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>.
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">std</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">regex_constants</span><span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">std</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">regex_constants</span><span class="special">{</span>
<span class="keyword">typedef</span> <span class="identifier">implementation</span><span class="special">-</span><span class="identifier">specific</span><span class="special">-</span><span class="identifier">bitmask</span><span class="special">-</span><span class="identifier">type</span> <span class="identifier">syntax_option_type</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">implementation</span><span class="special">-</span><span class="identifier">specific</span><span class="special">-</span><span class="identifier">bitmask</span><span class="special">-</span><span class="identifier">type</span> <span class="identifier">syntax_option_type</span><span class="special">;</span>
@ -65,10 +62,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Regular Expression Syntax</title> <title>Regular Expression Syntax</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../index.html" title="Boost.Regex"> <link rel="start" href="../index.html" title="Boost.Regex">
<link rel="up" href="../index.html" title="Boost.Regex"> <link rel="up" href="../index.html" title="Boost.Regex">
<link rel="prev" href="partial_matches.html" title=" Partial Matches"> <link rel="prev" href="partial_matches.html" title="Partial Matches">
<link rel="next" href="syntax/perl_syntax.html" title=" Perl Regular Expression <link rel="next" href="syntax/perl_syntax.html" title="Perl Regular Expression Syntax">
Syntax">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_regex.syntax"></a><a href="syntax.html" title=" Regular Expression Syntax"> Regular Expression Syntax</a></h2></div></div></div> <a name="boost_regex.syntax"></a><a href="syntax.html" title="Regular Expression Syntax"> Regular Expression Syntax</a>
</h2></div></div></div>
<div class="toc"><dl> <div class="toc"><dl>
<dt><span class="section"><a href="syntax/perl_syntax.html"> Perl Regular Expression <dt><span class="section"><a href="syntax/perl_syntax.html"> Perl Regular Expression
Syntax</a></span></dt> Syntax</a></span></dt>
@ -63,18 +63,15 @@
</p> </p>
<div class="itemizedlist"><ul type="disc"> <div class="itemizedlist"><ul type="disc">
<li> <li>
<a href="syntax/perl_syntax.html" title=" Perl Regular Expression <a href="syntax/perl_syntax.html" title="Perl Regular Expression Syntax">Perl (this is the default
Syntax">Perl (this is the default
behavior)</a>. behavior)</a>.
</li> </li>
<li> <li>
<a href="syntax/basic_extended.html" title=" POSIX Extended Regular <a href="syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX extended (including
Expression Syntax">POSIX extended (including
the egrep and awk variations)</a>. the egrep and awk variations)</a>.
</li> </li>
<li> <li>
<a href="syntax/basic_syntax.html" title=" POSIX Basic Regular <a href="syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX Basic (including the
Expression Syntax">POSIX Basic (including the
grep and emacs variations)</a>. grep and emacs variations)</a>.
</li> </li>
</ul></div> </ul></div>
@ -82,25 +79,14 @@
You can also construct a regular expression that treats every character as You can also construct a regular expression that treats every character as
a literal, but that's not really a "syntax"! a literal, but that's not really a "syntax"!
</p> </p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> POSIX Basic Regular <title>POSIX Basic Regular Expression Syntax</title>
Expression Syntax</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax.html" title=" Regular Expression Syntax"> <link rel="up" href="../syntax.html" title="Regular Expression Syntax">
<link rel="prev" href="basic_extended.html" title=" POSIX Extended Regular <link rel="prev" href="basic_extended.html" title="POSIX Extended Regular Expression Syntax">
Expression Syntax"> <link rel="next" href="character_classes.html" title="Character Class Names">
<link rel="next" href="character_classes.html" title=" Character Class
Names">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -27,59 +24,58 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.syntax.basic_syntax"></a><a href="basic_syntax.html" title=" POSIX Basic Regular <a name="boost_regex.syntax.basic_syntax"></a><a href="basic_syntax.html" title="POSIX Basic Regular Expression Syntax"> POSIX Basic Regular
Expression Syntax"> POSIX Basic Regular Expression Syntax</a>
Expression Syntax</a></h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.syntax.basic_syntax.synopsis"></a><h3> <a name="boost_regex.syntax.basic_syntax.synopsis"></a><h4>
<a name="id475172"></a> <a name="id509034"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.synopsis">Synopsis</a> <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.synopsis">Synopsis</a>
</h3> </h4>
<p> <p>
The POSIX-Basic regular expression syntax is used by the Unix utility <tt class="computeroutput"><span class="identifier">sed</span></tt>, and variations are used by <tt class="computeroutput"><span class="identifier">grep</span></tt> and <tt class="computeroutput"><span class="identifier">emacs</span></tt>. The POSIX-Basic regular expression syntax is used by the Unix utility <code class="computeroutput"><span class="identifier">sed</span></code>, and variations are used by <code class="computeroutput"><span class="identifier">grep</span></code> and <code class="computeroutput"><span class="identifier">emacs</span></code>.
You can construct POSIX basic regular expressions in Boost.Regex by passing You can construct POSIX basic regular expressions in Boost.Regex by passing
the flag <tt class="computeroutput"><span class="identifier">basic</span></tt> to the regex the flag <code class="computeroutput"><span class="identifier">basic</span></code> to the regex
constructor (see <a href="../ref/syntax_option_type.html" title=" syntax_option_type"><tt class="computeroutput"><span class="identifier">syntax_option_type</span></tt></a>), for example: constructor (see <a href="../ref/syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a>), for example:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="comment">// e1 is a case sensitive POSIX-Basic expression:
<span class="comment">// e1 is a case sensitive POSIX-Basic expression:
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e1</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">basic</span><span class="special">);</span> </span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e1</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">basic</span><span class="special">);</span>
<span class="comment">// e2 a case insensitive POSIX-Basic expression: <span class="comment">// e2 a case insensitive POSIX-Basic expression:
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">basic</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span> </span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">basic</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span>
</pre> </pre>
<a name="boost_regex.posix_basic"></a><p> <a name="boost_regex.posix_basic"></a><p>
</p> </p>
<a name="boost_regex.syntax.basic_syntax.posix_basic_syntax"></a><h3> <a name="boost_regex.syntax.basic_syntax.posix_basic_syntax"></a><h4>
<a name="id475467"></a> <a name="id509325"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.posix_basic_syntax">POSIX <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.posix_basic_syntax">POSIX
Basic Syntax</a> Basic Syntax</a>
</h3> </h4>
<p> <p>
In POSIX-Basic regular expressions, all characters are match themselves except In POSIX-Basic regular expressions, all characters are match themselves except
for the following special characters: for the following special characters:
</p> </p>
<pre class="programlisting">.[\*^$</pre> <pre class="programlisting">.[\*^$</pre>
<a name="boost_regex.syntax.basic_syntax.wildcard_"></a><h4> <a name="boost_regex.syntax.basic_syntax.wildcard_"></a><h5>
<a name="id475508"></a> <a name="id509364"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.wildcard_">Wildcard:</a> <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.wildcard_">Wildcard:</a>
</h4> </h5>
<p> <p>
The single character '.' when used outside of a character set will match The single character '.' when used outside of a character set will match
any single character except: any single character except:
</p> </p>
<div class="itemizedlist"><ul type="disc"> <div class="itemizedlist"><ul type="disc">
<li> <li>
The NULL character when the flag <tt class="computeroutput"><span class="identifier">match_no_dot_null</span></tt> The NULL character when the flag <code class="computeroutput"><span class="identifier">match_no_dot_null</span></code>
is passed to the matching algorithms. is passed to the matching algorithms.
</li> </li>
<li> <li>
The newline character when the flag <tt class="computeroutput"><span class="identifier">match_not_dot_newline</span></tt> The newline character when the flag <code class="computeroutput"><span class="identifier">match_not_dot_newline</span></code>
is passed to the matching algorithms. is passed to the matching algorithms.
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.syntax.basic_syntax.anchors_"></a><h4> <a name="boost_regex.syntax.basic_syntax.anchors_"></a><h5>
<a name="id475578"></a> <a name="id509433"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.anchors_">Anchors:</a> <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.anchors_">Anchors:</a>
</h4> </h5>
<p> <p>
A '^' character shall match the start of a line when used as the first character A '^' character shall match the start of a line when used as the first character
of an expression, or the first character of a sub-expression. of an expression, or the first character of a sub-expression.
@ -88,30 +84,30 @@
A '$' character shall match the end of a line when used as the last character A '$' character shall match the end of a line when used as the last character
of an expression, or the last character of a sub-expression. of an expression, or the last character of a sub-expression.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.marked_sub_expressions_"></a><h4> <a name="boost_regex.syntax.basic_syntax.marked_sub_expressions_"></a><h5>
<a name="id475615"></a> <a name="id509469"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.marked_sub_expressions_">Marked <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.marked_sub_expressions_">Marked
sub-expressions:</a> sub-expressions:</a>
</h4> </h5>
<p> <p>
A section beginning <tt class="computeroutput"><span class="special">\(</span></tt> and ending A section beginning <code class="computeroutput"><span class="special">\(</span></code> and ending
<tt class="computeroutput"><span class="special">\)</span></tt> acts as a marked sub-expression. <code class="computeroutput"><span class="special">\)</span></code> acts as a marked sub-expression.
Whatever matched the sub-expression is split out in a separate field by the Whatever matched the sub-expression is split out in a separate field by the
matching algorithms. Marked sub-expressions can also repeated, or referred-to matching algorithms. Marked sub-expressions can also repeated, or referred-to
by a back-reference. by a back-reference.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.repeats_"></a><h4> <a name="boost_regex.syntax.basic_syntax.repeats_"></a><h5>
<a name="id475674"></a> <a name="id509526"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.repeats_">Repeats:</a> <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.repeats_">Repeats:</a>
</h4> </h5>
<p> <p>
Any atom (a single character, a marked sub-expression, or a character class) Any atom (a single character, a marked sub-expression, or a character class)
can be repeated with the * operator. can be repeated with the * operator.
</p> </p>
<p> <p>
For example <tt class="computeroutput"><span class="identifier">a</span><span class="special">*</span></tt> For example <code class="computeroutput"><span class="identifier">a</span><span class="special">*</span></code>
will match any number of letter a's repeated zero or more times (an atom will match any number of letter a's repeated zero or more times (an atom
repeated zero times matches an empty string), so the expression <tt class="computeroutput"><span class="identifier">a</span><span class="special">*</span><span class="identifier">b</span></tt> repeated zero times matches an empty string), so the expression <code class="computeroutput"><span class="identifier">a</span><span class="special">*</span><span class="identifier">b</span></code>
will match any of the following: will match any of the following:
</p> </p>
<pre class="programlisting">b <pre class="programlisting">b
@ -122,15 +118,15 @@ aaaaaaaab
An atom can also be repeated with a bounded repeat: An atom can also be repeated with a bounded repeat:
</p> </p>
<p> <p>
<tt class="computeroutput"><span class="identifier">a</span><span class="special">\{</span><span class="identifier">n</span><span class="special">\}</span></tt> Matches <code class="computeroutput"><span class="identifier">a</span><span class="special">\{</span><span class="identifier">n</span><span class="special">\}</span></code> Matches
'a' repeated exactly n times. 'a' repeated exactly n times.
</p> </p>
<p> <p>
<tt class="computeroutput"><span class="identifier">a</span><span class="special">\{</span><span class="identifier">n</span><span class="special">,\}</span></tt> Matches <code class="computeroutput"><span class="identifier">a</span><span class="special">\{</span><span class="identifier">n</span><span class="special">,\}</span></code> Matches
'a' repeated n or more times. 'a' repeated n or more times.
</p> </p>
<p> <p>
<tt class="computeroutput"><span class="identifier">a</span><span class="special">\{</span><span class="identifier">n</span><span class="special">,</span> <span class="identifier">m</span><span class="special">\}</span></tt> Matches 'a' repeated between n and m times <code class="computeroutput"><span class="identifier">a</span><span class="special">\{</span><span class="identifier">n</span><span class="special">,</span> <span class="identifier">m</span><span class="special">\}</span></code> Matches 'a' repeated between n and m times
inclusive. inclusive.
</p> </p>
<p> <p>
@ -158,10 +154,10 @@ aaaa
Will raise an error, as there is nothing for the * operator to be applied Will raise an error, as there is nothing for the * operator to be applied
to. to.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.back_references_"></a><h4> <a name="boost_regex.syntax.basic_syntax.back_references_"></a><h5>
<a name="id475920"></a> <a name="id509770"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.back_references_">Back references:</a> <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.back_references_">Back references:</a>
</h4> </h5>
<p> <p>
An escape character followed by a digit <span class="emphasis"><em>n</em></span>, where <span class="emphasis"><em>n</em></span> An escape character followed by a digit <span class="emphasis"><em>n</em></span>, where <span class="emphasis"><em>n</em></span>
is in the range 1-9, matches the same string that was matched by sub-expression is in the range 1-9, matches the same string that was matched by sub-expression
@ -176,11 +172,11 @@ aaaa
But not the string: But not the string:
</p> </p>
<pre class="programlisting">aaabba</pre> <pre class="programlisting">aaabba</pre>
<a name="boost_regex.syntax.basic_syntax.character_sets_"></a><h4> <a name="boost_regex.syntax.basic_syntax.character_sets_"></a><h5>
<a name="id475996"></a> <a name="id509844"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_sets_">Character <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_sets_">Character
sets:</a> sets:</a>
</h4> </h5>
<p> <p>
A character set is a bracket-expression starting with [ and ending with ], A character set is a bracket-expression starting with [ and ending with ],
it defines a set of characters, and matches any single character that is it defines a set of characters, and matches any single character that is
@ -189,69 +185,68 @@ aaaa
<p> <p>
A bracket expression may contain any combination of the following: A bracket expression may contain any combination of the following:
</p> </p>
<a name="boost_regex.syntax.basic_syntax.single_characters_"></a><h5> <a name="boost_regex.syntax.basic_syntax.single_characters_"></a><h6>
<a name="id476034"></a> <a name="id509880"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.single_characters_">Single <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.single_characters_">Single
characters:</a> characters:</a>
</h5> </h6>
<p> <p>
For example <tt class="computeroutput"><span class="special">[</span><span class="identifier">abc</span><span class="special">]</span></tt>, will match any of the characters 'a', 'b', For example <code class="computeroutput"><span class="special">[</span><span class="identifier">abc</span><span class="special">]</span></code>, will match any of the characters 'a', 'b',
or 'c'. or 'c'.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.character_ranges_"></a><h5> <a name="boost_regex.syntax.basic_syntax.character_ranges_"></a><h6>
<a name="id476086"></a> <a name="id509930"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_ranges_">Character <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_ranges_">Character
ranges:</a> ranges:</a>
</h5> </h6>
<p> <p>
For example <tt class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">]</span></tt> For example <code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">]</span></code>
will match any single character in the range 'a' to 'c'. By default, for will match any single character in the range 'a' to 'c'. By default, for
POSIX-Basic regular expressions, a character <span class="emphasis"><em>x</em></span> is within POSIX-Basic regular expressions, a character <span class="emphasis"><em>x</em></span> is within
the range <span class="emphasis"><em>y</em></span> to <span class="emphasis"><em>z</em></span>, if it collates the range <span class="emphasis"><em>y</em></span> to <span class="emphasis"><em>z</em></span>, if it collates
within that range; this results in locale specific behavior. This behavior within that range; this results in locale specific behavior. This behavior
can be turned off by unsetting the <tt class="computeroutput"><span class="identifier">collate</span></tt> can be turned off by unsetting the <code class="computeroutput"><span class="identifier">collate</span></code>
option flag when constructing the regular expression - in which case whether option flag when constructing the regular expression - in which case whether
a character appears within a range is determined by comparing the code points a character appears within a range is determined by comparing the code points
of the characters only. of the characters only.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.negation_"></a><h5> <a name="boost_regex.syntax.basic_syntax.negation_"></a><h6>
<a name="id476179"></a> <a name="id510022"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.negation_">Negation:</a> <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.negation_">Negation:</a>
</h5> </h6>
<p> <p>
If the bracket-expression begins with the ^ character, then it matches the If the bracket-expression begins with the ^ character, then it matches the
complement of the characters it contains, for example <tt class="computeroutput"><span class="special">[^</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">]</span></tt> matches any character that is not in the complement of the characters it contains, for example <code class="computeroutput"><span class="special">[^</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">]</span></code> matches any character that is not in the
range a-c. range a-c.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.character_classes_"></a><h5> <a name="boost_regex.syntax.basic_syntax.character_classes_"></a><h6>
<a name="id476241"></a> <a name="id510083"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_classes_">Character <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_classes_">Character
classes:</a> classes:</a>
</h5> </h6>
<p> <p>
An expression of the form <tt class="computeroutput"><span class="special">[[:</span><span class="identifier">name</span><span class="special">:]]</span></tt> An expression of the form <code class="computeroutput"><span class="special">[[:</span><span class="identifier">name</span><span class="special">:]]</span></code>
matches the named character class "name", for example <tt class="computeroutput"><span class="special">[[:</span><span class="identifier">lower</span><span class="special">:]]</span></tt> matches any lower case character. See matches the named character class "name", for example <code class="computeroutput"><span class="special">[[:</span><span class="identifier">lower</span><span class="special">:]]</span></code> matches any lower case character. See
<a href="character_classes.html" title=" Character Class <a href="character_classes.html" title="Character Class Names">character class names</a>.
Names">character class names</a>.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.collating_elements_"></a><h5> <a name="boost_regex.syntax.basic_syntax.collating_elements_"></a><h6>
<a name="id476326"></a> <a name="id510166"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.collating_elements_">Collating <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.collating_elements_">Collating
Elements:</a> Elements:</a>
</h5> </h6>
<p> <p>
An expression of the form <tt class="computeroutput"><span class="special">[[.</span><span class="identifier">col</span><span class="special">.]</span></tt> matches An expression of the form <code class="computeroutput"><span class="special">[[.</span><span class="identifier">col</span><span class="special">.]</span></code> matches
the collating element <span class="emphasis"><em>col</em></span>. A collating element is any the collating element <span class="emphasis"><em>col</em></span>. A collating element is any
single character, or any sequence of characters that collates as a single single character, or any sequence of characters that collates as a single
unit. Collating elements may also be used as the end point of a range, for unit. Collating elements may also be used as the end point of a range, for
example: <tt class="computeroutput"><span class="special">[[.</span><span class="identifier">ae</span><span class="special">.]-</span><span class="identifier">c</span><span class="special">]</span></tt> example: <code class="computeroutput"><span class="special">[[.</span><span class="identifier">ae</span><span class="special">.]-</span><span class="identifier">c</span><span class="special">]</span></code>
matches the character sequence "ae", plus any single character matches the character sequence "ae", plus any single character
in the rangle "ae"-c, assuming that "ae" is treated as in the rangle "ae"-c, assuming that "ae" is treated as
a single collating element in the current locale. a single collating element in the current locale.
</p> </p>
<p> <p>
Collating elements may be used in place of escapes (which are not normally Collating elements may be used in place of escapes (which are not normally
allowed inside character sets), for example <tt class="computeroutput"><span class="special">[[.^.]</span><span class="identifier">abc</span><span class="special">]</span></tt> would allowed inside character sets), for example <code class="computeroutput"><span class="special">[[.^.]</span><span class="identifier">abc</span><span class="special">]</span></code> would
match either one of the characters 'abc^'. match either one of the characters 'abc^'.
</p> </p>
<p> <p>
@ -260,38 +255,38 @@ aaaa
</p> </p>
<pre class="programlisting">[[.NUL.]]</pre> <pre class="programlisting">[[.NUL.]]</pre>
<p> <p>
matches a 'NUL' character. See <a href="collating_names.html" title=" Collating Names">collating matches a 'NUL' character. See <a href="collating_names.html" title="Collating Names">collating
element names</a>. element names</a>.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.equivalence_classes_"></a><h5> <a name="boost_regex.syntax.basic_syntax.equivalence_classes_"></a><h6>
<a name="id476472"></a> <a name="id510315"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.equivalence_classes_">Equivalence <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.equivalence_classes_">Equivalence
classes:</a> classes:</a>
</h5> </h6>
<p> <p>
An expression of theform <tt class="computeroutput"><span class="special">[[=</span><span class="identifier">col</span><span class="special">=]]</span></tt>, An expression of theform <code class="computeroutput"><span class="special">[[=</span><span class="identifier">col</span><span class="special">=]]</span></code>,
matches any character or collating element whose primary sort key is the matches any character or collating element whose primary sort key is the
same as that for collating element <span class="emphasis"><em>col</em></span>, as with collating same as that for collating element <span class="emphasis"><em>col</em></span>, as with collating
elements the name <span class="emphasis"><em>col</em></span> may be a <a href="collating_names.html" title=" Collating Names">collating elements the name <span class="emphasis"><em>col</em></span> may be a <a href="collating_names.html" title="Collating Names">collating
symbolic name</a>. A primary sort key is one that ignores case, accentation, symbolic name</a>. A primary sort key is one that ignores case, accentation,
or locale-specific tailorings; so for example <tt class="computeroutput"><span class="special">[[=</span><span class="identifier">a</span><span class="special">=]]</span></tt> matches or locale-specific tailorings; so for example <code class="computeroutput"><span class="special">[[=</span><span class="identifier">a</span><span class="special">=]]</span></code> matches
any of the characters: a, <20>, <20>, <20>, <20>, <20>, <20>, A, <20>, <20>, <20>, <20>, <20> and <20>. Unfortunately implementation any of the characters: a, <20>, <20>, <20>, <20>, <20>, <20>, A, <20>, <20>, <20>, <20>, <20> and <20>. Unfortunately implementation
of this is reliant on the platform's collation and localisation support; of this is reliant on the platform's collation and localisation support;
this feature can not be relied upon to work portably across all platforms, this feature can not be relied upon to work portably across all platforms,
or even all locales on one platform. or even all locales on one platform.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.combinations_"></a><h5> <a name="boost_regex.syntax.basic_syntax.combinations_"></a><h6>
<a name="id476585"></a> <a name="id510419"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.combinations_">Combinations:</a> <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.combinations_">Combinations:</a>
</h5> </h6>
<p> <p>
All of the above can be combined in one character set declaration, for example: All of the above can be combined in one character set declaration, for example:
<tt class="computeroutput"><span class="special">[[:</span><span class="identifier">digit</span><span class="special">:]</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">[.</span><span class="identifier">NUL</span><span class="special">.]].</span></tt> <code class="computeroutput"><span class="special">[[:</span><span class="identifier">digit</span><span class="special">:]</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">[.</span><span class="identifier">NUL</span><span class="special">.]].</span></code>
</p> </p>
<a name="boost_regex.syntax.basic_syntax.escapes"></a><h4> <a name="boost_regex.syntax.basic_syntax.escapes"></a><h5>
<a name="id476664"></a> <a name="id510497"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.escapes">Escapes</a> <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.escapes">Escapes</a>
</h4> </h5>
<p> <p>
With the exception of the escape sequences \{, \}, \(, and \), which are With the exception of the escape sequences \{, \}, \(, and \), which are
documented above, an escape followed by any character matches that character. documented above, an escape followed by any character matches that character.
@ -300,37 +295,35 @@ aaaa
<pre class="programlisting">.[\*^$</pre> <pre class="programlisting">.[\*^$</pre>
<p> <p>
"ordinary". Note that the escape character loses its special meaning "ordinary". Note that the escape character loses its special meaning
inside a character set, so <tt class="computeroutput"><span class="special">[\^]</span></tt> inside a character set, so <code class="computeroutput"><span class="special">[\^]</span></code>
will match either a literal '\' or a '^'. will match either a literal '\' or a '^'.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.what_gets_matched"></a><h3> <a name="boost_regex.syntax.basic_syntax.what_gets_matched"></a><h4>
<a name="id476723"></a> <a name="id510554"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.what_gets_matched">What Gets <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.what_gets_matched">What Gets
Matched</a> Matched</a>
</h3>
<p>
When there is more that one way to match a regular expression, the "best"
possible match is obtained using the <a href="leftmost_longest_rule.html" title=" The Leftmost
Longest Rule">leftmost-longest
rule</a>.
</p>
<a name="boost_regex.syntax.basic_syntax.variations"></a><h3>
<a name="id476764"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.variations">Variations</a>
</h3>
<a name="boost_regex.grep_syntax"></a><p>
</p>
<a name="boost_regex.syntax.basic_syntax.grep"></a><h4>
<a name="id476798"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.grep">Grep</a>
</h4> </h4>
<p> <p>
When an expression is compiled with the flag <tt class="computeroutput"><span class="identifier">grep</span></tt> When there is more that one way to match a regular expression, the "best"
possible match is obtained using the <a href="leftmost_longest_rule.html" title="The Leftmost Longest Rule">leftmost-longest
rule</a>.
</p>
<a name="boost_regex.syntax.basic_syntax.variations"></a><h4>
<a name="id510594"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.variations">Variations</a>
</h4>
<a name="boost_regex.grep_syntax"></a><p>
</p>
<a name="boost_regex.syntax.basic_syntax.grep"></a><h5>
<a name="id510626"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.grep">Grep</a>
</h5>
<p>
When an expression is compiled with the flag <code class="computeroutput"><span class="identifier">grep</span></code>
set, then the expression is treated as a newline separated list of <a href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic expressions</a>, a match set, then the expression is treated as a newline separated list of <a href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic expressions</a>, a match
is found if any of the expressions in the list match, for example: is found if any of the expressions in the list match, for example:
</p> </p>
<pre class="programlisting"> <pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"abc\ndef"</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">grep</span><span class="special">);</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"abc\ndef"</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">grep</span><span class="special">);</span>
</pre> </pre>
<p> <p>
will match either of the <a href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic will match either of the <a href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic
@ -339,10 +332,10 @@ aaaa
<p> <p>
As its name suggests, this behavior is consistent with the Unix utility grep. As its name suggests, this behavior is consistent with the Unix utility grep.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.emacs"></a><h4> <a name="boost_regex.syntax.basic_syntax.emacs"></a><h5>
<a name="id476945"></a> <a name="id510770"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.emacs">emacs</a> <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.emacs">emacs</a>
</h4> </h5>
<p> <p>
In addition to the <a href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic features</a> In addition to the <a href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic features</a>
the following characters are also special: the following characters are also special:
@ -616,31 +609,27 @@ aaaa
according to the <a href="perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">Perl according to the <a href="perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">Perl
"depth first search" rules</a>. Emacs expressions are matched "depth first search" rules</a>. Emacs expressions are matched
this way because they contain Perl-like extensions, that do not interact this way because they contain Perl-like extensions, that do not interact
well with the <a href="leftmost_longest_rule.html" title=" The Leftmost well with the <a href="leftmost_longest_rule.html" title="The Leftmost Longest Rule">POSIX-style
Longest Rule">POSIX-style
leftmost-longest rule</a>. leftmost-longest rule</a>.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.options"></a><h3> <a name="boost_regex.syntax.basic_syntax.options"></a><h4>
<a name="id477441"></a> <a name="id511266"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.options">Options</a> <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.options">Options</a>
</h3> </h4>
<p> <p>
There are a <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title=" There are a <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">variety
Options for POSIX Basic Regular Expressions">variety of flags</a> that may be combined with the <code class="computeroutput"><span class="identifier">basic</span></code>
of flags</a> that may be combined with the <tt class="computeroutput"><span class="identifier">basic</span></tt> and <code class="computeroutput"><span class="identifier">grep</span></code> options when constructing
and <tt class="computeroutput"><span class="identifier">grep</span></tt> options when constructing the regular expression, in particular note that the <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions"><code class="computeroutput"><span class="identifier">newline_alt</span></code>, <code class="computeroutput"><span class="identifier">no_char_classes</span></code>,
the regular expression, in particular note that the <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title=" <code class="computeroutput"><span class="identifier">no</span><span class="special">-</span><span class="identifier">intervals</span></code>, <code class="computeroutput"><span class="identifier">bk_plus_qm</span></code>
Options for POSIX Basic Regular Expressions"><tt class="computeroutput"><span class="identifier">newline_alt</span></tt>, <tt class="computeroutput"><span class="identifier">no_char_classes</span></tt>, and <code class="computeroutput"><span class="identifier">bk_plus_vbar</span></code></a> options
<tt class="computeroutput"><span class="identifier">no</span><span class="special">-</span><span class="identifier">intervals</span></tt>, <tt class="computeroutput"><span class="identifier">bk_plus_qm</span></tt> all alter the syntax, while the <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions"><code class="computeroutput"><span class="identifier">collate</span></code> and <code class="computeroutput"><span class="identifier">icase</span></code>
and <tt class="computeroutput"><span class="identifier">bk_plus_vbar</span></tt></a> options
all alter the syntax, while the <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title="
Options for POSIX Basic Regular Expressions"><tt class="computeroutput"><span class="identifier">collate</span></tt> and <tt class="computeroutput"><span class="identifier">icase</span></tt>
options</a> modify how the case and locale sensitivity are to be applied. options</a> modify how the case and locale sensitivity are to be applied.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.references"></a><h3> <a name="boost_regex.syntax.basic_syntax.references"></a><h4>
<a name="id477617"></a> <a name="id511438"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.references">References</a> <a href="basic_syntax.html#boost_regex.syntax.basic_syntax.references">References</a>
</h3> </h4>
<p> <p>
<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap09.html" target="_top">IEEE <a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap09.html" target="_top">IEEE
Std 1003.1-2001, Portable Operating System Interface (POSIX ), Base Definitions Std 1003.1-2001, Portable Operating System Interface (POSIX ), Base Definitions
@ -657,10 +646,11 @@ aaaa
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,24 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Character Class <title>Character Class Names</title>
Names</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax.html" title=" Regular Expression Syntax"> <link rel="up" href="../syntax.html" title="Regular Expression Syntax">
<link rel="prev" href="basic_syntax.html" title=" POSIX Basic Regular <link rel="prev" href="basic_syntax.html" title="POSIX Basic Regular Expression Syntax">
Expression Syntax"> <link rel="next" href="character_classes/std_char_clases.html" title="Character Classes that are Always Supported">
<link rel="next" href="character_classes/std_char_clases.html" title="
Character Classes that are Always Supported">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -27,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.syntax.character_classes"></a><a href="character_classes.html" title=" Character Class <a name="boost_regex.syntax.character_classes"></a><a href="character_classes.html" title="Character Class Names"> Character Class
Names"> Character Class Names</a>
Names</a></h3></div></div></div> </h3></div></div></div>
<div class="toc"><dl> <div class="toc"><dl>
<dt><span class="section"><a href="character_classes/std_char_clases.html"> <dt><span class="section"><a href="character_classes/std_char_clases.html">
Character Classes that are Always Supported</a></span></dt> Character Classes that are Always Supported</a></span></dt>
@ -39,10 +36,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,24 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Character classes that are supported by Unicode Regular Expressions</title>
Character classes that are supported by Unicode Regular Expressions</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../character_classes.html" title=" Character Class <link rel="up" href="../character_classes.html" title="Character Class Names">
Names"> <link rel="prev" href="std_char_clases.html" title="Character Classes that are Always Supported">
<link rel="prev" href="std_char_clases.html" title=" <link rel="next" href="../collating_names.html" title="Collating Names">
Character Classes that are Always Supported">
<link rel="next" href="../collating_names.html" title=" Collating Names">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -27,12 +24,12 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.syntax.character_classes.optional_char_class_names"></a><a href="optional_char_class_names.html" title=" <a name="boost_regex.syntax.character_classes.optional_char_class_names"></a><a href="optional_char_class_names.html" title="Character classes that are supported by Unicode Regular Expressions">
Character classes that are supported by Unicode Regular Expressions"> Character classes that are supported by Unicode Regular Expressions</a>
Character classes that are supported by Unicode Regular Expressions</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
The following character classes are only supported by Unicode Regular Expressions: The following character classes are only supported by Unicode Regular Expressions:
that is those that use the <tt class="computeroutput"><span class="identifier">u32regex</span></tt> that is those that use the <code class="computeroutput"><span class="identifier">u32regex</span></code>
type. The names used are the same as those from Chapter 4 of the Unicode type. The names used are the same as those from Chapter 4 of the Unicode
standard. standard.
</p> </p>
@ -536,10 +533,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,25 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Character Classes that are Always Supported</title>
Character Classes that are Always Supported</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../character_classes.html" title=" Character Class <link rel="up" href="../character_classes.html" title="Character Class Names">
Names"> <link rel="prev" href="../character_classes.html" title="Character Class Names">
<link rel="prev" href="../character_classes.html" title=" Character Class <link rel="next" href="optional_char_class_names.html" title="Character classes that are supported by Unicode Regular Expressions">
Names">
<link rel="next" href="optional_char_class_names.html" title="
Character classes that are supported by Unicode Regular Expressions">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -28,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.syntax.character_classes.std_char_clases"></a><a href="std_char_clases.html" title=" <a name="boost_regex.syntax.character_classes.std_char_clases"></a><a href="std_char_clases.html" title="Character Classes that are Always Supported">
Character Classes that are Always Supported"> Character Classes that are Always Supported</a>
Character Classes that are Always Supported</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
The following character class names are always supported by Boost.Regex: The following character class names are always supported by Boost.Regex:
</p> </p>
@ -386,10 +382,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Collating Names</title> <title>Collating Names</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax.html" title=" Regular Expression Syntax"> <link rel="up" href="../syntax.html" title="Regular Expression Syntax">
<link rel="prev" href="character_classes/optional_char_class_names.html" title=" <link rel="prev" href="character_classes/optional_char_class_names.html" title="Character classes that are supported by Unicode Regular Expressions">
Character classes that are supported by Unicode Regular Expressions"> <link rel="next" href="collating_names/digraphs.html" title="Digraphs">
<link rel="next" href="collating_names/digraphs.html" title=" Digraphs">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.syntax.collating_names"></a><a href="collating_names.html" title=" Collating Names"> Collating Names</a></h3></div></div></div> <a name="boost_regex.syntax.collating_names"></a><a href="collating_names.html" title="Collating Names"> Collating Names</a>
</h3></div></div></div>
<div class="toc"><dl> <div class="toc"><dl>
<dt><span class="section"><a href="collating_names/digraphs.html"> Digraphs</a></span></dt> <dt><span class="section"><a href="collating_names/digraphs.html"> Digraphs</a></span></dt>
<dt><span class="section"><a href="collating_names/posix_symbolic_names.html"> <dt><span class="section"><a href="collating_names/posix_symbolic_names.html">
@ -36,10 +36,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,22 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Digraphs</title> <title>Digraphs</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../collating_names.html" title=" Collating Names"> <link rel="up" href="../collating_names.html" title="Collating Names">
<link rel="prev" href="../collating_names.html" title=" Collating Names"> <link rel="prev" href="../collating_names.html" title="Collating Names">
<link rel="next" href="posix_symbolic_names.html" title=" <link rel="next" href="posix_symbolic_names.html" title="POSIX Symbolic Names">
POSIX Symbolic Names">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -25,7 +24,8 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.syntax.collating_names.digraphs"></a><a href="digraphs.html" title=" Digraphs"> Digraphs</a></h4></div></div></div> <a name="boost_regex.syntax.collating_names.digraphs"></a><a href="digraphs.html" title="Digraphs"> Digraphs</a>
</h4></div></div></div>
<p> <p>
The following are treated as valid digraphs when used as a collating name: The following are treated as valid digraphs when used as a collating name:
</p> </p>
@ -47,10 +47,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,24 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>Named Unicode Characters</title>
Named Unicode Characters</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../collating_names.html" title=" Collating Names"> <link rel="up" href="../collating_names.html" title="Collating Names">
<link rel="prev" href="posix_symbolic_names.html" title=" <link rel="prev" href="posix_symbolic_names.html" title="POSIX Symbolic Names">
POSIX Symbolic Names"> <link rel="next" href="../leftmost_longest_rule.html" title="The Leftmost Longest Rule">
<link rel="next" href="../leftmost_longest_rule.html" title=" The Leftmost
Longest Rule">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -27,12 +24,12 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.syntax.collating_names.named_unicode"></a><a href="named_unicode.html" title=" <a name="boost_regex.syntax.collating_names.named_unicode"></a><a href="named_unicode.html" title="Named Unicode Characters">
Named Unicode Characters"> Named Unicode Characters</a>
Named Unicode Characters</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
When using <a href="../../unicode.html" title=" Unicode and Boost.Regex">Unicode aware regular expressions</a> When using <a href="../../unicode.html" title="Unicode and Boost.Regex">Unicode aware regular expressions</a>
(with the <tt class="computeroutput"><span class="identifier">u32regex</span></tt> type), (with the <code class="computeroutput"><span class="identifier">u32regex</span></code> type),
all the normal symbolic names for Unicode characters (those given in Unidata.txt) all the normal symbolic names for Unicode characters (those given in Unidata.txt)
are recognised. So for example: are recognised. So for example:
</p> </p>
@ -43,10 +40,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,23 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> <title>POSIX Symbolic Names</title>
POSIX Symbolic Names</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../../index.html" title="Boost.Regex"> <link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../collating_names.html" title=" Collating Names"> <link rel="up" href="../collating_names.html" title="Collating Names">
<link rel="prev" href="digraphs.html" title=" Digraphs"> <link rel="prev" href="digraphs.html" title="Digraphs">
<link rel="next" href="named_unicode.html" title=" <link rel="next" href="named_unicode.html" title="Named Unicode Characters">
Named Unicode Characters">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.syntax.collating_names.posix_symbolic_names"></a><a href="posix_symbolic_names.html" title=" <a name="boost_regex.syntax.collating_names.posix_symbolic_names"></a><a href="posix_symbolic_names.html" title="POSIX Symbolic Names">
POSIX Symbolic Names"> POSIX Symbolic Names</a>
POSIX Symbolic Names</a></h4></div></div></div> </h4></div></div></div>
<p> <p>
The following symbolic names are recognised as valid collating element The following symbolic names are recognised as valid collating element
names, in addition to any single character, this allows you to write for names, in addition to any single character, this allows you to write for
@ -973,10 +971,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -1,23 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> The Leftmost <title>The Leftmost Longest Rule</title>
Longest Rule</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex"> <link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax.html" title=" Regular Expression Syntax"> <link rel="up" href="../syntax.html" title="Regular Expression Syntax">
<link rel="prev" href="collating_names/named_unicode.html" title=" <link rel="prev" href="collating_names/named_unicode.html" title="Named Unicode Characters">
Named Unicode Characters"> <link rel="next" href="../format.html" title="Search and Replace Format String Syntax">
<link rel="next" href="../format.html" title=" Search and Replace Format String Syntax">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,9 +24,9 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.syntax.leftmost_longest_rule"></a><a href="leftmost_longest_rule.html" title=" The Leftmost <a name="boost_regex.syntax.leftmost_longest_rule"></a><a href="leftmost_longest_rule.html" title="The Leftmost Longest Rule"> The Leftmost
Longest Rule"> The Leftmost Longest Rule</a>
Longest Rule</a></h3></div></div></div> </h3></div></div></div>
<p> <p>
Often there is more than one way of matching a regular expression at a particular Often there is more than one way of matching a regular expression at a particular
location, for POSIX basic and extended regular expressions, the "best" location, for POSIX basic and extended regular expressions, the "best"
@ -67,10 +65,11 @@
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Unicode and Boost.Regex</title> <title>Unicode and Boost.Regex</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../index.html" title="Boost.Regex"> <link rel="start" href="../index.html" title="Boost.Regex">
<link rel="up" href="../index.html" title="Boost.Regex"> <link rel="up" href="../index.html" title="Boost.Regex">
<link rel="prev" href="introduction_and_overview.html" title="Introduction and <link rel="prev" href="introduction_and_overview.html" title="Introduction and Overview">
Overview"> <link rel="next" href="captures.html" title="Understanding Marked Sub-Expressions and Captures">
<link rel="next" href="captures.html" title=" Understanding Marked Sub-Expressions
and Captures">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,57 +24,58 @@
</div> </div>
<div class="section" lang="en"> <div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_regex.unicode"></a><a href="unicode.html" title=" Unicode and Boost.Regex"> Unicode and Boost.Regex</a></h2></div></div></div> <a name="boost_regex.unicode"></a><a href="unicode.html" title="Unicode and Boost.Regex"> Unicode and Boost.Regex</a>
</h2></div></div></div>
<p> <p>
There are two ways to use Boost.Regex with Unicode strings: There are two ways to use Boost.Regex with Unicode strings:
</p> </p>
<a name="boost_regex.unicode.rely_on_wchar_t"></a><h4> <a name="boost_regex.unicode.rely_on_wchar_t"></a><h5>
<a name="id458749"></a> <a name="id492782"></a>
<a href="unicode.html#boost_regex.unicode.rely_on_wchar_t">Rely on wchar_t</a> <a href="unicode.html#boost_regex.unicode.rely_on_wchar_t">Rely on wchar_t</a>
</h4> </h5>
<p> <p>
If your platform's <tt class="computeroutput"><span class="keyword">wchar_t</span></tt> type If your platform's <code class="computeroutput"><span class="keyword">wchar_t</span></code> type
can hold Unicode strings, and your platform's C/C++ runtime correctly handles can hold Unicode strings, and your platform's C/C++ runtime correctly handles
wide character constants (when passed to <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iswspace</span></tt> wide character constants (when passed to <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iswspace</span></code>
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iswlower</span></tt> etc), then you can use <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">wregex</span></tt> <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iswlower</span></code> etc), then you can use <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">wregex</span></code>
to process Unicode. However, there are several disadvantages to this approach: to process Unicode. However, there are several disadvantages to this approach:
</p> </p>
<div class="itemizedlist"><ul type="disc"> <div class="itemizedlist"><ul type="disc">
<li> <li>
It's not portable: there's no guarantee on the width of <tt class="computeroutput"><span class="keyword">wchar_t</span></tt>, It's not portable: there's no guarantee on the width of <code class="computeroutput"><span class="keyword">wchar_t</span></code>,
or even whether the runtime treats wide characters as Unicode at all, most or even whether the runtime treats wide characters as Unicode at all, most
Windows compilers do so, but many Unix systems do not. Windows compilers do so, but many Unix systems do not.
</li> </li>
<li> <li>
There's no support for Unicode-specific character classes: <tt class="computeroutput"><span class="special">[[:</span><span class="identifier">Nd</span><span class="special">:]]</span></tt>, There's no support for Unicode-specific character classes: <code class="computeroutput"><span class="special">[[:</span><span class="identifier">Nd</span><span class="special">:]]</span></code>,
<tt class="computeroutput"><span class="special">[[:</span><span class="identifier">Po</span><span class="special">:]]</span></tt> etc. <code class="computeroutput"><span class="special">[[:</span><span class="identifier">Po</span><span class="special">:]]</span></code> etc.
</li> </li>
<li> <li>
You can only search strings that are encoded as sequences of wide characters, You can only search strings that are encoded as sequences of wide characters,
it is not possible to search UTF-8, or even UTF-16 on many platforms. it is not possible to search UTF-8, or even UTF-16 on many platforms.
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.unicode.use_a_unicode_aware_regular_expression_type_"></a><h4> <a name="boost_regex.unicode.use_a_unicode_aware_regular_expression_type_"></a><h5>
<a name="id458932"></a> <a name="id492966"></a>
<a href="unicode.html#boost_regex.unicode.use_a_unicode_aware_regular_expression_type_">Use <a href="unicode.html#boost_regex.unicode.use_a_unicode_aware_regular_expression_type_">Use
a Unicode Aware Regular Expression Type.</a> a Unicode Aware Regular Expression Type.</a>
</h4> </h5>
<p> <p>
If you have the <a href="http://www.ibm.com/software/globalization/icu/" target="_top">ICU If you have the <a href="http://www.ibm.com/software/globalization/icu/" target="_top">ICU
library</a>, then Boost.Regex can be <a href="install.html#boost_regex.install.building_with_unicode_and_icu_support">configured library</a>, then Boost.Regex can be <a href="install.html#boost_regex.install.building_with_unicode_and_icu_support">configured
to make use of it</a>, and provide a distinct regular expression type (boost::u32regex), to make use of it</a>, and provide a distinct regular expression type (boost::u32regex),
that supports both Unicode specific character properties, and the searching that supports both Unicode specific character properties, and the searching
of text that is encoded in either UTF-8, UTF-16, or UTF-32. See: <a href="ref/non_std_strings/icu.html" title=" Working With of text that is encoded in either UTF-8, UTF-16, or UTF-32. See: <a href="ref/non_std_strings/icu.html" title="Working With Unicode and ICU String Types">ICU
Unicode and ICU String Types">ICU
string class support</a>. string class support</a>.
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td> <td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p> <td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td> </p>
</div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">

View File

@ -3,17 +3,17 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Boost.Regex</title> <title>Boost.Regex</title>
<link rel="stylesheet" href="../../../../doc/html/boostbook.css" type="text/css"> <link rel="stylesheet" href="../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1"> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="index.html" title="Boost.Regex"> <link rel="start" href="index.html" title="Boost.Regex">
<link rel="next" href="boost_regex/configuration.html" title=" Configuration"> <link rel="next" href="boost_regex/configuration.html" title="Configuration">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr> <table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.htm">Home</a></td> <td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../people/people.htm">People</a></td> <td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td> <td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td> <td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table> </tr></table>
<hr> <hr>
@ -26,9 +26,9 @@
<div><div class="authorgroup"><div class="author"><h3 class="author"> <div><div class="authorgroup"><div class="author"><h3 class="author">
<span class="firstname">John</span> <span class="surname">Maddock</span> <span class="firstname">John</span> <span class="surname">Maddock</span>
</h3></div></div></div> </h3></div></div></div>
<div><p class="copyright">Copyright <20> 2007 John Maddock</p></div> <div><p class="copyright">Copyright <20> 1998 -2007 John Maddock</p></div>
<div><div class="legalnotice"> <div><div class="legalnotice">
<a name="id385571"></a><p> <a name="id435844"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p> </p>
@ -155,7 +155,7 @@
<dt><span class="section"><a href="boost_regex/ref/concepts/traits_concept.html"> Traits Class <dt><span class="section"><a href="boost_regex/ref/concepts/traits_concept.html"> Traits Class
Requirements</a></span></dt> Requirements</a></span></dt>
<dt><span class="section"><a href="boost_regex/ref/concepts/iterator_concepts.html"> Iterator <dt><span class="section"><a href="boost_regex/ref/concepts/iterator_concepts.html"> Iterator
Rrequirements</a></span></dt> Requirements</a></span></dt>
</dl></dd> </dl></dd>
<dt><span class="section"><a href="boost_regex/ref/deprecated_interfaces.html">Deprecated Interfaces</a></span></dt> <dt><span class="section"><a href="boost_regex/ref/deprecated_interfaces.html">Deprecated Interfaces</a></span></dt>
<dd><dl> <dd><dl>
@ -191,19 +191,13 @@
</dl> </dl>
</div> </div>
<p> <p>
</p> A printer-friendly <a href="http://svn.boost.org/svn/boost/sandbox/pdf/regex/release/regex.pdf" target="_top">PDF
<p> version of this manual is also available</a>.
</p>
<p>
</p>
<p>
</p>
<p>
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: November 07, 2007 at 02:57:53 GMT</small></p></td> <td align="left"><p><small>Last revised: April 11, 2008 at 08:50:33 GMT</small></p></td>
<td align="right"><div class="copyright-footer"><small></small></div></td> <td align="right"><div class="copyright-footer"></div></td>
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"><a accesskey="n" href="boost_regex/configuration.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div> <div class="spirit-nav"><a accesskey="n" href="boost_regex/configuration.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>

View File

@ -74,7 +74,7 @@ This flag is used when matching incomplete or very long texts, see the partial m
[[match_single_line][Equivalent to the inverse of Perl's m/ modifier; prevents ^ from matching after an embedded newline character (so that it only matches at the start of the text being matched), and $ from matching before an embedded newline (so that it only matches at the end of the text being matched).]] [[match_single_line][Equivalent to the inverse of Perl's m/ modifier; prevents ^ from matching after an embedded newline character (so that it only matches at the start of the text being matched), and $ from matching before an embedded newline (so that it only matches at the end of the text being matched).]]
[[match_prev_avail][Specifies that --first is a valid iterator position, when this flag is set then the flags match_not_bol and match_not_bow are ignored by the regular expression algorithms (RE.7) and iterators (RE.8).]] [[match_prev_avail][Specifies that --first is a valid iterator position, when this flag is set then the flags match_not_bol and match_not_bow are ignored by the regular expression algorithms (RE.7) and iterators (RE.8).]]
[[match_not_dot_newline][Specifies that the expression "." does not match a newline character. This is the inverse of Perl's s/ modifier.]] [[match_not_dot_newline][Specifies that the expression "." does not match a newline character. This is the inverse of Perl's s/ modifier.]]
[[match_not_dot_null][Specified that the expression "." does not match a character null '\\0'.]] [[match_not_dot_null][Specifies that the expression "." does not match a character null '\\0'.]]
[[match_posix][Specifies that the expression should be matched according to the POSIX [[match_posix][Specifies that the expression should be matched according to the POSIX
[link boost_regex.syntax.leftmost_longest_rule leftmost-longest rule], [link boost_regex.syntax.leftmost_longest_rule leftmost-longest rule],
regardless of what kind of expression was compiled. regardless of what kind of expression was compiled.
@ -108,7 +108,7 @@ This flag is used when matching incomplete or very long texts, see the partial m
[[format_perl][Specifies that when a regular expression match is to be replaced by [[format_perl][Specifies that when a regular expression match is to be replaced by
a new string, that the new string is constructed using a new string, that the new string is constructed using
[link boost_regex.format.perl_format the same rules as Perl 5].]] [link boost_regex.format.perl_format the same rules as Perl 5].]]
[[format_literal][Specified that when a regular expression match is to be [[format_literal][Specifies that when a regular expression match is to be
replaced by a new string, that the new string is a literal copy of replaced by a new string, that the new string is a literal copy of
the replacement text.]] the replacement text.]]
[[format_all][Specifies that all syntax extensions are enabled, including [[format_all][Specifies that all syntax extensions are enabled, including

View File

@ -1,7 +1,7 @@
[article Boost.Regex [article Boost.Regex
[quickbook 1.3] [quickbook 1.3]
[copyright 2007 John Maddock] [copyright 1998-2007 John Maddock]
[purpose Regular Expressions] [purpose Regular Expressions]
[license [license
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
@ -45,6 +45,10 @@
[template regerror[] [link boost_regex.ref.posix.regerror `regerror`]] [template regerror[] [link boost_regex.ref.posix.regerror `regerror`]]
[template regfree[] [link boost_regex.ref.posix.regfree `regfree`]] [template regfree[] [link boost_regex.ref.posix.regfree `regfree`]]
A printer-friendly
[@http://svn.boost.org/svn/boost/sandbox/pdf/regex/release/regex.pdf
PDF version of this manual is also available].
[include configuration.qbk] [include configuration.qbk]
[include install.qbk] [include install.qbk]
[include introduction.qbk] [include introduction.qbk]

View File

@ -20,10 +20,10 @@
struct c_regex_traits; struct c_regex_traits;
template <class charT> template <class charT>
struct cpp_regex_traits; class cpp_regex_traits;
template <class charT> template <class charT>
struct w32_regex_traits; class w32_regex_traits;
} // namespace boost } // namespace boost

View File

@ -34,7 +34,7 @@ The single character '.' when used outside of a character set will match
any single character except: any single character except:
* The NULL character when the [link boost_regex.ref.match_flag_type flag * The NULL character when the [link boost_regex.ref.match_flag_type flag
`match_no_dot_null`] is passed to the matching algorithms. `match_not_dot_null`] is passed to the matching algorithms.
* The newline character when the [link boost_regex.ref.match_flag_type * The newline character when the [link boost_regex.ref.match_flag_type
flag `match_not_dot_newline`] is passed to flag `match_not_dot_newline`] is passed to
the matching algorithms. the matching algorithms.

703
doc/vc71-performance.html Normal file
View File

@ -0,0 +1,703 @@
<html>
<head>
<title>Regular Expression Performance Comparison</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<meta name="Template" content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
</head>
<body bgcolor="#ffffff" link="#0000ff" vlink="#800080">
<h2>Regular Expression Performance Comparison</h2>
<p>
The following tables provide comparisons between the following regular
expression libraries:</p>
<p><a href="http://research.microsoft.com/projects/greta">GRETA</a>.</p>
<p><a href="http://www.boost.org/">The Boost regex library</a>.</p>
<p><a href="http://arglist.com/regex/">Henry Spencer's regular expression library</a>
- this is provided for comparison as a typical non-backtracking implementation.</p>
<P>Philip Hazel's <A href="http://www.pcre.org">PCRE</A> library.</P>
<H3>Details</H3>
<P>Machine: Intel Pentium 4 2.8GHz PC.</P>
<P>Compiler: Microsoft Visual C++ version 7.1.</P>
<P>C++ Standard Library: Dinkumware standard library version 313.</P>
<P>OS: Win32.</P>
<P>Boost version: 1.31.0.</P>
<P>PCRE version: 3.9.</P>
<P>
As ever care should be taken in interpreting the results, only sensible regular
expressions (rather than pathological cases) are given, most are taken from the
Boost regex examples, or from the <a href="http://www.regxlib.com/">Library of
Regular Expressions</a>. In addition, some variation in the relative
performance of these libraries can be expected on other machines - as memory
access and processor caching effects can be quite large for most finite state
machine algorithms.</P>
<H3>Averages</H3>
<P>The following are the average relative scores for all the tests: the perfect
regular expression library&nbsp;would score 1, in practice any small number
(say less that 4 or 5) is pretty good.</P>
<P><table border="1" cellspacing="1">
<tr>
<td><strong>GRETA</strong></td>
<td><strong>GRETA<BR>
(non-recursive mode)</strong></td>
<td><strong>Boost</strong></td>
<td><strong>Boost + C++ locale</strong></td>
<td><strong>POSIX</strong></td>
<td><strong>PCRE</strong></td>
</tr>
<tr>
<td>2.31619</td>
<td>6.14203</td>
<td>2.30668</td>
<td>1.94363</td>
<td>124.752</td>
<td>2.09365</td>
</tr>
</table>
</P>
<h3>Comparison 1: Long Search</h3>
<p>For each of the following regular expressions the time taken to find all
occurrences of the expression within a long English language text was measured
(<a href="http://www.gutenberg.org/files/3200/old/mtent12.zip">mtent12.txt</a>
from <a href="http://promo.net/pg/">Project Gutenberg</a>, 19Mb).&nbsp;</p>
<P><table border="1" cellspacing="1">
<tr>
<td><strong>Expression</strong></td>
<td><strong>GRETA</strong></td>
<td><strong>GRETA<BR>
(non-recursive mode)</strong></td>
<td><strong>Boost</strong></td>
<td><strong>Boost + C++ locale</strong></td>
<td><strong>POSIX</strong></td>
<td><strong>PCRE</strong></td>
</tr>
<tr>
<td><code>Twain</code></td>
<td><font color="#008000">1<BR>
(0.0407s)</font></td>
<td><font color="#008000">1<BR>
(0.0407s)</font></td>
<td>4.18<BR>
(0.17s)</td>
<td>4.18<BR>
(0.17s)</td>
<td>135<BR>
(5.48s)</td>
<td>1.37<BR>
(0.0557s)</td>
</tr>
<tr>
<td><code>Huck[[:alpha:]]+</code></td>
<td><font color="#008000">1.02<BR>
(0.0381s)</font></td>
<td><font color="#008000">1<BR>
(0.0375s)</font></td>
<td>4.53<BR>
(0.17s)</td>
<td>4.54<BR>
(0.17s)</td>
<td>166<BR>
(6.23s)</td>
<td>1.34<BR>
(0.0501s)</td>
</tr>
<tr>
<td><code>[[:alpha:]]+ing</code></td>
<td>4.3<BR>
(4.18s)</td>
<td>9.93<BR>
(9.65s)</td>
<td>1.15<BR>
(1.12s)</td>
<td><font color="#008000">1<BR>
(0.972s)</font></td>
<td>8.15<BR>
(7.92s)</td>
<td>5.85<BR>
(5.69s)</td>
</tr>
<tr>
<td><code>^[^ ]*?Twain</code></td>
<td>6.25<BR>
(1.84s)</td>
<td>20.9<BR>
(6.16s)</td>
<td>1.56<BR>
(0.461s)</td>
<td><font color="#008000">1<BR>
(0.295s)</font></td>
<td>NA</td>
<td>2.58<BR>
(0.761s)</td>
</tr>
<tr>
<td><code>Tom|Sawyer|Huckleberry|Finn</code></td>
<td>6.53<BR>
(0.711s)</td>
<td>11.5<BR>
(1.25s)</td>
<td>2.3<BR>
(0.251s)</td>
<td><font color="#008000">1<BR>
(0.109s)</font></td>
<td>196<BR>
(21.4s)</td>
<td>1.77<BR>
(0.193s)</td>
</tr>
<tr>
<td><code>(Tom|Sawyer|Huckleberry|Finn).{0,30}river|river.{0,30}(Tom|Sawyer|Huckleberry|Finn)</code></td>
<td>3.88<BR>
(0.972s)</td>
<td>6.48<BR>
(1.62s)</td>
<td>1.66<BR>
(0.416s)</td>
<td><font color="#008000">1<BR>
(0.251s)</font></td>
<td>NA</td>
<td>2.48<BR>
(0.62s)</td>
</tr>
</table>
</P>
<h3>Comparison 2: Medium Sized Search</h3>
<p>For each of the following regular expressions the time taken to find all
occurrences of the expression within a medium sized English language text was
measured (the first 50K from mtent12.txt).&nbsp;</p>
<P><table border="1" cellspacing="1">
<tr>
<td><strong>Expression</strong></td>
<td><strong>GRETA</strong></td>
<td><strong>GRETA<BR>
(non-recursive mode)</strong></td>
<td><strong>Boost</strong></td>
<td><strong>Boost + C++ locale</strong></td>
<td><strong>POSIX</strong></td>
<td><strong>PCRE</strong></td>
</tr>
<tr>
<td><code>Twain</code></td>
<td><font color="#008000">1<BR>
(9.05e-005s)</font></td>
<td><font color="#008000">1.03<BR>
(9.29e-005s)</font></td>
<td>4.92<BR>
(0.000445s)</td>
<td>4.92<BR>
(0.000445s)</td>
<td>43.2<BR>
(0.00391s)</td>
<td>3.18<BR>
(0.000288s)</td>
</tr>
<tr>
<td><code>Huck[[:alpha:]]+</code></td>
<td><font color="#008000">1<BR>
(8.56e-005s)</font></td>
<td><font color="#008000">1<BR>
(8.56e-005s)</font></td>
<td>4.97<BR>
(0.000425s)</td>
<td>4.98<BR>
(0.000426s)</td>
<td>2.8<BR>
(0.000239s)</td>
<td>2.2<BR>
(0.000188s)</td>
</tr>
<tr>
<td><code>[[:alpha:]]+ing</code></td>
<td>5.29<BR>
(0.011s)</td>
<td>11.8<BR>
(0.0244s)</td>
<td>1.19<BR>
(0.00246s)</td>
<td><font color="#008000">1<BR>
(0.00207s)</font></td>
<td>8.77<BR>
(0.0182s)</td>
<td>6.88<BR>
(0.0142s)</td>
</tr>
<tr>
<td><code>^[^ ]*?Twain</code></td>
<td>5.98<BR>
(0.00462s)</td>
<td>20.2<BR>
(0.0156s)</td>
<td>1.54<BR>
(0.00119s)</td>
<td><font color="#008000">1<BR>
(0.000772s)</font></td>
<td>NA</td>
<td>2.53<BR>
(0.00195s)</td>
</tr>
<tr>
<td><code>Tom|Sawyer|Huckleberry|Finn</code></td>
<td>3.42<BR>
(0.00207s)</td>
<td>6.31<BR>
(0.00383s)</td>
<td>1.71<BR>
(0.00104s)</td>
<td><font color="#008000">1<BR>
(0.000606s)</font></td>
<td>81.5<BR>
(0.0494s)</td>
<td>1.96<BR>
(0.00119s)</td>
</tr>
<tr>
<td><code>(Tom|Sawyer|Huckleberry|Finn).{0,30}river|river.{0,30}(Tom|Sawyer|Huckleberry|Finn)</code></td>
<td>1.97<BR>
(0.00266s)</td>
<td>3.77<BR>
(0.00509s)</td>
<td>1.38<BR>
(0.00186s)</td>
<td><font color="#008000">1<BR>
(0.00135s)</font></td>
<td>297<BR>
(0.401s)</td>
<td>1.77<BR>
(0.00238s)</td>
</tr>
</table>
</P>
<H3>Comparison 3:&nbsp;C++ Code&nbsp;Search</H3>
<P>For each of the following regular expressions the time taken to find all
occurrences of the expression within the C++ source file <A href="../../../boost/crc.hpp">
boost/crc.hpp</A>&nbsp;was measured.&nbsp;</P>
<P><table border="1" cellspacing="1">
<tr>
<td><strong>Expression</strong></td>
<td><strong>GRETA</strong></td>
<td><strong>GRETA<BR>
(non-recursive mode)</strong></td>
<td><strong>Boost</strong></td>
<td><strong>Boost + C++ locale</strong></td>
<td><strong>POSIX</strong></td>
<td><strong>PCRE</strong></td>
</tr>
<tr>
<td><code>^(template[[:space:]]*&lt;[^;:{]+&gt;[[:space:]]*)?(class|struct)[[:space:]]*(\&lt;\w+\&gt;([
]*\([^)]*\))?[[:space:]]*)*(\&lt;\w*\&gt;)[[:space:]]*(&lt;[^;:{]+&gt;[[:space:]]*)?(\{|:[^;\{()]*\{)</code></td>
<td>6.67<BR>
(0.00147s)</td>
<td>36.9<BR>
(0.00813s)</td>
<td><font color="#008000">1.03<BR>
(0.000227s)</font></td>
<td><font color="#008000">1<BR>
(0.00022s)</font></td>
<td>557<BR>
(0.123s)</td>
<td>2.57<BR>
(0.000566s)</td>
</tr>
<tr>
<td><code>(^[
]*#(?:[^\\\n]|\\[^\n_[:punct:][:alnum:]]*[\n[:punct:][:word:]])*)|(//[^\n]*|/\*.*?\*/)|\&lt;([+-]?(?:(?:0x[[:xdigit:]]+)|(?:(?:[[:digit:]]*\.)?[[:digit:]]+(?:[eE][+-]?[[:digit:]]+)?))u?(?:(?:int(?:8|16|32|64))|L)?)\&gt;|('(?:[^\\']|\\.)*'|"(?:[^\\"]|\\.)*")|\&lt;(__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|bool|break|case|catch|cdecl|char|class|const|const_cast|continue|default|delete|do|double|dynamic_cast|else|enum|explicit|extern|false|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|operator|pascal|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_cast|struct|switch|template|this|throw|true|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\&gt;</code></td>
<td><font color="#008000">1<BR>
(0.00555s)</font></td>
<td>3.32<BR>
(0.0185s)</td>
<td>2.53<BR>
(0.0141s)</td>
<td>1.94<BR>
(0.0108s)</td>
<td>NA</td>
<td>3.38<BR>
(0.0188s)</td>
</tr>
<tr>
<td><code>^[ ]*#[ ]*include[ ]+("[^"]+"|&lt;[^&gt;]+&gt;)</code></td>
<td>4.77<BR>
(0.00156s)</td>
<td>24.8<BR>
(0.00814s)</td>
<td>1.13<BR>
(0.000372s)</td>
<td><font color="#008000">1<BR>
(0.000328s)</font></td>
<td>120<BR>
(0.0394s)</td>
<td>1.58<BR>
(0.000518s)</td>
</tr>
<tr>
<td><code>^[ ]*#[ ]*include[ ]+("boost/[^"]+"|&lt;boost/[^&gt;]+&gt;)</code></td>
<td>4.72<BR>
(0.00154s)</td>
<td>24.8<BR>
(0.00813s)</td>
<td>1.12<BR>
(0.000367s)</td>
<td><font color="#008000">1<BR>
(0.000328s)</font></td>
<td>143<BR>
(0.0469s)</td>
<td>1.58<BR>
(0.000518s)</td>
</tr>
</table>
</P>
<H3>
<H3>Comparison 4: HTML Document Search</H3>
</H3>
<P>For each of the following regular expressions the time taken to find all
occurrences of the expression within the html file <A href="../../libraries.htm">libs/libraries.htm</A>
was measured.&nbsp;</P>
<P><table border="1" cellspacing="1">
<tr>
<td><strong>Expression</strong></td>
<td><strong>GRETA</strong></td>
<td><strong>GRETA<BR>
(non-recursive mode)</strong></td>
<td><strong>Boost</strong></td>
<td><strong>Boost + C++ locale</strong></td>
<td><strong>POSIX</strong></td>
<td><strong>PCRE</strong></td>
</tr>
<tr>
<td><code>beman|john|dave</code></td>
<td>4.07<BR>
(0.00111s)</td>
<td>7.14<BR>
(0.00195s)</td>
<td>1.75<BR>
(0.000479s)</td>
<td><font color="#008000">1<BR>
(0.000273s)</font></td>
<td>54.3<BR>
(0.0149s)</td>
<td>1.83<BR>
(0.000499s)</td>
</tr>
<tr>
<td><code>&lt;p&gt;.*?&lt;/p&gt;</code></td>
<td><font color="#008000">1<BR>
(6.59e-005s)</font></td>
<td><font color="#008000">1.04<BR>
(6.84e-005s)</font></td>
<td>4.15<BR>
(0.000273s)</td>
<td>4.23<BR>
(0.000279s)</td>
<td>NA</td>
<td>4.23<BR>
(0.000279s)</td>
</tr>
<tr>
<td><code>&lt;a[^&gt;]+href=("[^"]*"|[^[:space:]]+)[^&gt;]*&gt;</code></td>
<td>1.39<BR>
(0.000626s)</td>
<td>1.83<BR>
(0.000821s)</td>
<td>1.41<BR>
(0.000636s)</td>
<td><font color="#008000">1<BR>
(0.00045s)</font></td>
<td>351<BR>
(0.158s)</td>
<td>1.13<BR>
(0.000509s)</td>
</tr>
<tr>
<td><code>&lt;h[12345678][^&gt;]*&gt;.*?&lt;/h[12345678]&gt;</code></td>
<td><font color="#008000">1<BR>
(0.000142s)</font></td>
<td>1.21<BR>
(0.000171s)</td>
<td>2.62<BR>
(0.000372s)</td>
<td>1.48<BR>
(0.00021s)</td>
<td>NA</td>
<td>1.73<BR>
(0.000245s)</td>
</tr>
<tr>
<td><code>&lt;img[^&gt;]+src=("[^"]*"|[^[:space:]]+)[^&gt;]*&gt;</code></td>
<td><font color="#008000">1<BR>
(5.38e-005s)</font></td>
<td><font color="#008000">1.05<BR>
(5.63e-005s)</font></td>
<td>5<BR>
(0.000269s)</td>
<td>5.18<BR>
(0.000278s)</td>
<td>604<BR>
(0.0325s)</td>
<td>4.05<BR>
(0.000218s)</td>
</tr>
<tr>
<td><code>&lt;font[^&gt;]+face=("[^"]*"|[^[:space:]]+)[^&gt;]*&gt;.*?&lt;/font&gt;</code></td>
<td><font color="#008000">1<BR>
(6.05e-005s)</font></td>
<td><font color="#008000">1.09<BR>
(6.59e-005s)</font></td>
<td>4.45<BR>
(0.000269s)</td>
<td>4.69<BR>
(0.000284s)</td>
<td>NA</td>
<td>3.64<BR>
(0.00022s)</td>
</tr>
</table>
</P>
<H3>Comparison 3: Simple Matches</H3>
<p>
For each of the following regular expressions the time taken to match against
the text indicated was measured.&nbsp;</p>
<P><table border="1" cellspacing="1">
<tr>
<td><strong>Expression</strong></td>
<td><strong>Text</strong></td>
<td><strong>GRETA</strong></td>
<td><strong>GRETA<BR>
(non-recursive mode)</strong></td>
<td><strong>Boost</strong></td>
<td><strong>Boost + C++ locale</strong></td>
<td><strong>POSIX</strong></td>
<td><strong>PCRE</strong></td>
</tr>
<tr>
<td><code>abc</code></td>
<td>abc</td>
<td>1.32<BR>
(2.24e-007s)</td>
<td>1.86<BR>
(3.15e-007s)</td>
<td>1.25<BR>
(2.12e-007s)</td>
<td>1.24<BR>
(2.1e-007s)</td>
<td>2.98<BR>
(5.05e-007s)</td>
<td><font color="#008000">1<BR>
(1.7e-007s)</font></td>
</tr>
<tr>
<td><code>^([0-9]+)(\-| |$)(.*)$</code></td>
<td>100- this is a line of ftp response which contains a message string</td>
<td>1.32<BR>
(5.91e-007s)</td>
<td>1.96<BR>
(8.78e-007s)</td>
<td>2.68<BR>
(1.2e-006s)</td>
<td>1.53<BR>
(6.88e-007s)</td>
<td>332<BR>
(0.000149s)</td>
<td><font color="#008000">1<BR>
(4.49e-007s)</font></td>
</tr>
<tr>
<td><code>([[:digit:]]{4}[- ]){3}[[:digit:]]{3,4}</code></td>
<td>1234-5678-1234-456</td>
<td>1.44<BR>
(7.16e-007s)</td>
<td>2.04<BR>
(1.01e-006s)</td>
<td>3.35<BR>
(1.66e-006s)</td>
<td>2.15<BR>
(1.07e-006s)</td>
<td>31.4<BR>
(1.56e-005s)</td>
<td><font color="#008000">1<BR>
(4.96e-007s)</font></td>
</tr>
<tr>
<td><code>^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
<td>john@johnmaddock.co.uk</td>
<td><font color="#008000">1<BR>
(1.18e-006s)</font></td>
<td>1.42<BR>
(1.68e-006s)</td>
<td>2.06<BR>
(2.44e-006s)</td>
<td>1.35<BR>
(1.6e-006s)</td>
<td>165<BR>
(0.000196s)</td>
<td><font color="#008000">1.06<BR>
(1.26e-006s)</font></td>
</tr>
<tr>
<td><code>^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
<td>foo12@foo.edu</td>
<td><font color="#008000">1<BR>
(1.09e-006s)</font></td>
<td>1.44<BR>
(1.57e-006s)</td>
<td>2.21<BR>
(2.4e-006s)</td>
<td>1.41<BR>
(1.53e-006s)</td>
<td>108<BR>
(0.000117s)</td>
<td><font color="#008000">1.04<BR>
(1.13e-006s)</font></td>
</tr>
<tr>
<td><code>^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
<td>bob.smith@foo.tv</td>
<td><font color="#008000">1<BR>
(1.07e-006s)</font></td>
<td>1.43<BR>
(1.53e-006s)</td>
<td>2.21<BR>
(2.37e-006s)</td>
<td>1.45<BR>
(1.55e-006s)</td>
<td>123<BR>
(0.000132s)</td>
<td><font color="#008000">1.05<BR>
(1.13e-006s)</font></td>
</tr>
<tr>
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
<td>EH10 2QQ</td>
<td><font color="#008000">1<BR>
(3.19e-007s)</font></td>
<td>1.67<BR>
(5.34e-007s)</td>
<td>1.58<BR>
(5.05e-007s)</td>
<td>1.4<BR>
(4.49e-007s)</td>
<td>10.4<BR>
(3.32e-006s)</td>
<td>1.15<BR>
(3.68e-007s)</td>
</tr>
<tr>
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
<td>G1 1AA</td>
<td><font color="#008000">1<BR>
(3.29e-007s)</font></td>
<td>1.65<BR>
(5.44e-007s)</td>
<td>1.51<BR>
(4.96e-007s)</td>
<td>1.36<BR>
(4.49e-007s)</td>
<td>8.46<BR>
(2.79e-006s)</td>
<td>1.1<BR>
(3.63e-007s)</td>
</tr>
<tr>
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
<td>SW1 1ZZ</td>
<td><font color="#008000">1<BR>
(3.25e-007s)</font></td>
<td>1.64<BR>
(5.34e-007s)</td>
<td>1.56<BR>
(5.05e-007s)</td>
<td>1.38<BR>
(4.49e-007s)</td>
<td>9.29<BR>
(3.02e-006s)</td>
<td>1.13<BR>
(3.68e-007s)</td>
</tr>
<tr>
<td><code>^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$</code></td>
<td>4/1/2001</td>
<td><font color="#008000">1<BR>
(3.44e-007s)</font></td>
<td>1.55<BR>
(5.34e-007s)</td>
<td>2.36<BR>
(8.12e-007s)</td>
<td>2.2<BR>
(7.55e-007s)</td>
<td>19.6<BR>
(6.72e-006s)</td>
<td>1.81<BR>
(6.21e-007s)</td>
</tr>
<tr>
<td><code>^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$</code></td>
<td>12/12/2001</td>
<td><font color="#008000">1.05<BR>
(6.59e-007s)</font></td>
<td>1.66<BR>
(1.05e-006s)</td>
<td>1.44<BR>
(9.07e-007s)</td>
<td>1.23<BR>
(7.73e-007s)</td>
<td>11.6<BR>
(7.34e-006s)</td>
<td><font color="#008000">1<BR>
(6.3e-007s)</font></td>
</tr>
<tr>
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
<td>123</td>
<td><font color="#008000">1<BR>
(5.72e-007s)</font></td>
<td>1.59<BR>
(9.07e-007s)</td>
<td>1.6<BR>
(9.16e-007s)</td>
<td>1.49<BR>
(8.5e-007s)</td>
<td>6.14<BR>
(3.51e-006s)</td>
<td>1.22<BR>
(6.97e-007s)</td>
</tr>
<tr>
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
<td>+3.14159</td>
<td><font color="#008000">1<BR>
(6.78e-007s)</font></td>
<td>1.52<BR>
(1.03e-006s)</td>
<td>1.47<BR>
(9.94e-007s)</td>
<td>1.31<BR>
(8.88e-007s)</td>
<td>10.8<BR>
(7.34e-006s)</td>
<td><font color="#008000">1.08<BR>
(7.35e-007s)</font></td>
</tr>
<tr>
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
<td>-3.14159</td>
<td><font color="#008000">1<BR>
(6.78e-007s)</font></td>
<td>1.52<BR>
(1.03e-006s)</td>
<td>1.46<BR>
(9.92e-007s)</td>
<td>1.32<BR>
(8.98e-007s)</td>
<td>10.5<BR>
(7.11e-006s)</td>
<td>1.11<BR>
(7.54e-007s)</td>
</tr>
</table>
</P>
<hr>
<p><i><EFBFBD> Copyright John Maddock&nbsp;2003</i></p>
<P><I>Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>
</body>
</html>

View File

@ -65,7 +65,7 @@ istream& getline(istream& is, std::string& s)
} }
#endif #endif
int main(int argc) int main(int argc, const char*[])
{ {
std::string in, out; std::string in, out;
do do

View File

@ -47,7 +47,7 @@ istream& getline(istream& is, std::string& s)
#endif #endif
int main(int argc) int main(int argc, const char*[])
{ {
string s; string s;
list<string> l; list<string> l;

View File

@ -40,7 +40,7 @@ istream& getline(istream& is, std::string& s)
#endif #endif
int main(int argc) int main(int argc, const char*[])
{ {
string s; string s;
do{ do{

View File

@ -324,17 +324,17 @@ int main(int argc, char**argv)
iters = 10; iters = 10;
tim = 1.1; tim = 1.1;
// cache load: // cache load:
regex_tA(&r, s2.c_str(), nsubs, matches.get(), 0); regexecA(&r, s2.c_str(), nsubs, matches.get(), 0);
do{ do{
iters *= (tim > 0.001) ? (1.1/tim) : 100; iters *= (tim > 0.001) ? (1.1/tim) : 100;
t.restart(); t.restart();
for(i = 0; i < iters; ++i) for(i = 0; i < iters; ++i)
{ {
result = regex_tA(&r, s2.c_str(), nsubs, matches.get(), 0); result = regexecA(&r, s2.c_str(), nsubs, matches.get(), 0);
} }
tim = t.elapsed(); tim = t.elapsed();
}while(tim < wait_time); }while(tim < wait_time);
cout << "POSIX regex_tA time: " << (tim * 1000000 / iters) << "us" << endl; cout << "POSIX regexecA time: " << (tim * 1000000 / iters) << "us" << endl;
if(result == 0) if(result == 0)
{ {

View File

@ -235,7 +235,7 @@ template <class Regex>
struct BaseRegexConcept struct BaseRegexConcept
{ {
typedef typename Regex::value_type value_type; typedef typename Regex::value_type value_type;
typedef typename Regex::size_type size_type; //typedef typename Regex::size_type size_type;
typedef typename Regex::flag_type flag_type; typedef typename Regex::flag_type flag_type;
typedef typename Regex::locale_type locale_type; typedef typename Regex::locale_type locale_type;
typedef input_iterator_archetype<value_type> input_iterator_type; typedef input_iterator_archetype<value_type> input_iterator_type;
@ -368,9 +368,7 @@ struct BaseRegexConcept
// access: // access:
const Regex ce; const Regex ce;
bool b = ce.empty(); unsigned i = ce.mark_count();
ignore_unused_variable_warning(b);
size_type i = ce.mark_count();
ignore_unused_variable_warning(i); ignore_unused_variable_warning(i);
m_flags = ce.flags(); m_flags = ce.flags();
e.imbue(ce.getloc()); e.imbue(ce.getloc());
@ -385,7 +383,7 @@ struct BaseRegexConcept
typedef typename sub_match_type::iterator sub_iter_type; typedef typename sub_match_type::iterator sub_iter_type;
BOOST_STATIC_ASSERT((::boost::is_same<sub_value_type, value_type>::value)); BOOST_STATIC_ASSERT((::boost::is_same<sub_value_type, value_type>::value));
BOOST_STATIC_ASSERT((::boost::is_same<sub_iter_type, BidiIterator>::value)); BOOST_STATIC_ASSERT((::boost::is_same<sub_iter_type, BidiIterator>::value));
b = m_sub.matched; bool b = m_sub.matched;
ignore_unused_variable_warning(b); ignore_unused_variable_warning(b);
BidiIterator bi = m_sub.first; BidiIterator bi = m_sub.first;
ignore_unused_variable_warning(bi); ignore_unused_variable_warning(bi);
@ -533,7 +531,7 @@ struct BaseRegexConcept
pointer_type m_pointer; pointer_type m_pointer;
flag_type m_flags; flag_type m_flags;
size_type m_size; std::size_t m_size;
input_iterator_type in1, in2; input_iterator_type in1, in2;
const sub_match_type m_sub; const sub_match_type m_sub;
const value_type m_char; const value_type m_char;
@ -557,7 +555,7 @@ template <class Regex>
struct RegexConcept struct RegexConcept
{ {
typedef typename Regex::value_type value_type; typedef typename Regex::value_type value_type;
typedef typename Regex::size_type size_type; //typedef typename Regex::size_type size_type;
typedef typename Regex::flag_type flag_type; typedef typename Regex::flag_type flag_type;
typedef typename Regex::locale_type locale_type; typedef typename Regex::locale_type locale_type;
@ -806,6 +804,8 @@ struct BoostRegexConcept
ignore_unused_variable_warning(i2); ignore_unused_variable_warning(i2);
bool b = ce == ce2; bool b = ce == ce2;
ignore_unused_variable_warning(b); ignore_unused_variable_warning(b);
b = ce.empty();
ignore_unused_variable_warning(b);
b = ce != ce2; b = ce != ce2;
ignore_unused_variable_warning(b); ignore_unused_variable_warning(b);
b = ce < ce2; b = ce < ce2;

View File

@ -119,7 +119,7 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k,
// //
// Add it to the list, and index it: // Add it to the list, and index it:
// //
s_data.cont.push_back(value_type(result, 0)); s_data.cont.push_back(value_type(result, static_cast<Key const*>(0)));
s_data.index.insert(std::make_pair(k, --(s_data.cont.end()))); s_data.index.insert(std::make_pair(k, --(s_data.cont.end())));
s_data.cont.back().second = &(s_data.index.find(k)->first); s_data.cont.back().second = &(s_data.index.find(k)->first);
map_size_type s = s_data.index.size(); map_size_type s = s_data.index.size();

View File

@ -68,6 +68,7 @@ Accepts UTF-32 code points and forwards them on as UTF-16 code points.
#include <stdexcept> #include <stdexcept>
#ifndef BOOST_NO_STD_LOCALE #ifndef BOOST_NO_STD_LOCALE
#include <sstream> #include <sstream>
#include <ios>
#endif #endif
#include <limits.h> // CHAR_BIT #include <limits.h> // CHAR_BIT

View File

@ -1270,6 +1270,19 @@ void basic_regex_creator<charT, traits>::probe_leading_repeat(re_syntax_base* st
state = state->next.p; state = state->next.p;
continue; continue;
} }
if((static_cast<re_brace*>(state)->index == -1)
|| (static_cast<re_brace*>(state)->index == -2))
{
// skip past the zero width assertion:
state = static_cast<const re_jump*>(state->next.p)->alt.p->next.p;
continue;
}
if(static_cast<re_brace*>(state)->index == -3)
{
// Have to skip the leading jump state:
state = state->next.p->next.p;
continue;
}
return; return;
case syntax_element_endmark: case syntax_element_endmark:
case syntax_element_start_line: case syntax_element_start_line:

View File

@ -784,6 +784,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
case syntax_element_restart_continue: case syntax_element_restart_continue:
case syntax_element_jump: case syntax_element_jump:
case syntax_element_startmark: case syntax_element_startmark:
case syntax_element_backstep:
// can't legally repeat any of the above: // can't legally repeat any of the above:
fail(regex_constants::error_badrepeat, m_position - m_base); fail(regex_constants::error_badrepeat, m_position - m_base);
return false; return false;
@ -1869,6 +1870,7 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
if(markid == -4) if(markid == -4)
{ {
re_syntax_base* b = this->getaddress(expected_alt_point); re_syntax_base* b = this->getaddress(expected_alt_point);
// Make sure we have exactly one alternative following this state:
if(b->type != syntax_element_alt) if(b->type != syntax_element_alt)
{ {
re_alt* alt = static_cast<re_alt*>(this->insert_state(expected_alt_point, syntax_element_alt, sizeof(re_alt))); re_alt* alt = static_cast<re_alt*>(this->insert_state(expected_alt_point, syntax_element_alt, sizeof(re_alt)));
@ -1879,6 +1881,15 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
fail(regex_constants::error_bad_pattern, m_position - m_base); fail(regex_constants::error_bad_pattern, m_position - m_base);
return false; return false;
} }
// check for invalid repetition of next state:
b = this->getaddress(expected_alt_point);
b = this->getaddress(static_cast<re_alt*>(b)->next.i, b);
if((b->type != syntax_element_assert_backref)
&& (b->type != syntax_element_startmark))
{
fail(regex_constants::error_badrepeat, m_position - m_base);
return false;
}
} }
// //
// append closing parenthesis state: // append closing parenthesis state:

View File

@ -128,7 +128,7 @@ parser_buf<charT, traits>::seekoff(off_type off, ::std::ios_base::seekdir way, :
break; break;
case ::std::ios_base::cur: case ::std::ios_base::cur:
{ {
std::ptrdiff_t newpos = pos + off; std::ptrdiff_t newpos = static_cast<std::ptrdiff_t>(pos + off);
if((newpos < 0) || (newpos > size)) if((newpos < 0) || (newpos > size))
return pos_type(off_type(-1)); return pos_type(off_type(-1));
else else

Some files were not shown because too many files have changed in this diff Show More