Added support for function objects as well as strings when formatting.

Updated and regenerated docs.

[SVN r57250]
This commit is contained in:
John Maddock
2009-10-30 17:25:12 +00:00
parent 9188464e39
commit 308c336700
39 changed files with 951 additions and 407 deletions

View File

@ -8,6 +8,10 @@
[section:history History] [section:history History]
[h4 Boost 1.42]
* Added support for Functors rather than strings as format expressions.
[h4 Boost 1.40] [h4 Boost 1.40]
* Added support for many Perl 5.10 syntax elements including named * Added support for many Perl 5.10 syntax elements including named

View File

@ -28,7 +28,7 @@
Example Programs</a> Example Programs</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.background_information.examples.test_programs"></a><h5> <a name="boost_regex.background_information.examples.test_programs"></a><h5>
<a name="id805166"></a> <a name="id939556"></a>
<a class="link" href="examples.html#boost_regex.background_information.examples.test_programs">Test <a class="link" href="examples.html#boost_regex.background_information.examples.test_programs">Test
Programs</a> Programs</a>
</h5> </h5>
@ -107,7 +107,7 @@
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><h5> <a name="boost_regex.background_information.examples.example_programs"></a><h5>
<a name="id805469"></a> <a name="id939860"></a>
<a class="link" href="examples.html#boost_regex.background_information.examples.example_programs">Example <a class="link" href="examples.html#boost_regex.background_information.examples.example_programs">Example
programs</a> programs</a>
</h5> </h5>
@ -133,7 +133,7 @@
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><h5> <a name="boost_regex.background_information.examples.code_snippets"></a><h5>
<a name="id805528"></a> <a name="id939919"></a>
<a class="link" href="examples.html#boost_regex.background_information.examples.code_snippets">Code <a class="link" href="examples.html#boost_regex.background_information.examples.code_snippets">Code
snippets</a> snippets</a>
</h5> </h5>

View File

@ -25,8 +25,16 @@
<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 class="link" href="history.html" title="History"> History</a> <a name="boost_regex.background_information.history"></a><a class="link" href="history.html" title="History"> History</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.background_information.history.boost_1_42"></a><h5>
<a name="id941407"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_42">Boost
1.42</a>
</h5>
<div class="itemizedlist"><ul type="disc"><li>
Added support for Functors rather than strings as format expressions.
</li></ul></div>
<a name="boost_regex.background_information.history.boost_1_40"></a><h5> <a name="boost_regex.background_information.history.boost_1_40"></a><h5>
<a name="id807313"></a> <a name="id941427"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_40">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_40">Boost
1.40</a> 1.40</a>
</h5> </h5>
@ -35,7 +43,7 @@
branch resets and recursive regular expressions. branch resets and recursive regular expressions.
</li></ul></div> </li></ul></div>
<a name="boost_regex.background_information.history.boost_1_38"></a><h5> <a name="boost_regex.background_information.history.boost_1_38"></a><h5>
<a name="id807333"></a> <a name="id941448"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_38">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_38">Boost
1.38</a> 1.38</a>
</h5> </h5>
@ -62,7 +70,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.background_information.history.boost_1_34"></a><h5> <a name="boost_regex.background_information.history.boost_1_34"></a><h5>
<a name="id807411"></a> <a name="id941526"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_34">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_34">Boost
1.34</a> 1.34</a>
</h5> </h5>
@ -85,7 +93,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.background_information.history.boost_1_33_1"></a><h5> <a name="boost_regex.background_information.history.boost_1_33_1"></a><h5>
<a name="id807442"></a> <a name="id941557"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_1">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_1">Boost
1.33.1</a> 1.33.1</a>
</h5> </h5>
@ -155,7 +163,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.background_information.history.boost_1_33_0"></a><h5> <a name="boost_regex.background_information.history.boost_1_33_0"></a><h5>
<a name="id807522"></a> <a name="id942851"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_0">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_0">Boost
1.33.0</a> 1.33.0</a>
</h5> </h5>
@ -210,7 +218,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.background_information.history.boost_1_32_1"></a><h5> <a name="boost_regex.background_information.history.boost_1_32_1"></a><h5>
<a name="id807580"></a> <a name="id942910"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_32_1">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_32_1">Boost
1.32.1</a> 1.32.1</a>
</h5> </h5>
@ -218,7 +226,7 @@
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><h5> <a name="boost_regex.background_information.history.boost_1_31_0"></a><h5>
<a name="id807601"></a> <a name="id942930"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_31_0">Boost <a class="link" href="history.html#boost_regex.background_information.history.boost_1_31_0">Boost
1.31.0</a> 1.31.0</a>
</h5> </h5>

View File

@ -58,7 +58,7 @@
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><h5> <a name="boost_regex.background_information.locale.win32_localization_model_"></a><h5>
<a name="id802331"></a> <a name="id936399"></a>
<a class="link" href="locale.html#boost_regex.background_information.locale.win32_localization_model_">Win32 <a class="link" href="locale.html#boost_regex.background_information.locale.win32_localization_model_">Win32
localization model.</a> localization model.</a>
</h5> </h5>
@ -90,7 +90,7 @@
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><h5> <a name="boost_regex.background_information.locale.c_localization_model_"></a><h5>
<a name="id802486"></a> <a name="id936553"></a>
<a class="link" href="locale.html#boost_regex.background_information.locale.c_localization_model_">C <a class="link" href="locale.html#boost_regex.background_information.locale.c_localization_model_">C
localization model.</a> localization model.</a>
</h5> </h5>
@ -114,7 +114,7 @@
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><h5> <a name="boost_regex.background_information.locale.c___localization_model_"></a><h5>
<a name="id802554"></a> <a name="id936622"></a>
<a class="link" href="locale.html#boost_regex.background_information.locale.c___localization_model_">C++ <a class="link" href="locale.html#boost_regex.background_information.locale.c___localization_model_">C++
localization model.</a> localization model.</a>
</h5> </h5>
@ -151,7 +151,7 @@
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>. 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><h5> <a name="boost_regex.background_information.locale.providing_a_message_catalogue"></a><h5>
<a name="id802855"></a> <a name="id937034"></a>
<a class="link" href="locale.html#boost_regex.background_information.locale.providing_a_message_catalogue">Providing <a class="link" href="locale.html#boost_regex.background_information.locale.providing_a_message_catalogue">Providing
a message catalogue</a> a message catalogue</a>
</h5> </h5>

View File

@ -28,7 +28,7 @@
Conformance</a> Conformance</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.background_information.standards.c__"></a><h5> <a name="boost_regex.background_information.standards.c__"></a><h5>
<a name="id806454"></a> <a name="id940548"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.c__">C++</a> <a class="link" href="standards.html#boost_regex.background_information.standards.c__">C++</a>
</h5> </h5>
<p> <p>
@ -36,7 +36,7 @@
Report on C++ Library Extensions</a>. Report on C++ Library Extensions</a>.
</p> </p>
<a name="boost_regex.background_information.standards.ecmascript___javascript"></a><h5> <a name="boost_regex.background_information.standards.ecmascript___javascript"></a><h5>
<a name="id806475"></a> <a name="id940569"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.ecmascript___javascript">ECMAScript <a class="link" href="standards.html#boost_regex.background_information.standards.ecmascript___javascript">ECMAScript
/ JavaScript</a> / JavaScript</a>
</h5> </h5>
@ -49,7 +49,7 @@
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><h5> <a name="boost_regex.background_information.standards.perl"></a><h5>
<a name="id806496"></a> <a name="id940590"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.perl">Perl</a> <a class="link" href="standards.html#boost_regex.background_information.standards.perl">Perl</a>
</h5> </h5>
<p> <p>
@ -62,7 +62,7 @@
(??{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><h5> <a name="boost_regex.background_information.standards.posix"></a><h5>
<a name="id806520"></a> <a name="id940614"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.posix">POSIX</a> <a class="link" href="standards.html#boost_regex.background_information.standards.posix">POSIX</a>
</h5> </h5>
<p> <p>
@ -82,7 +82,7 @@
a custom traits class. a custom traits class.
</p> </p>
<a name="boost_regex.background_information.standards.unicode"></a><h5> <a name="boost_regex.background_information.standards.unicode"></a><h5>
<a name="id806544"></a> <a name="id940638"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.unicode">Unicode</a> <a class="link" href="standards.html#boost_regex.background_information.standards.unicode">Unicode</a>
</h5> </h5>
<p> <p>

View File

@ -35,7 +35,7 @@
accessed. accessed.
</p> </p>
<a name="boost_regex.captures.marked_sub_expressions"></a><h5> <a name="boost_regex.captures.marked_sub_expressions"></a><h5>
<a name="id648883"></a> <a name="id781455"></a>
<a class="link" href="captures.html#boost_regex.captures.marked_sub_expressions">Marked sub-expressions</a> <a class="link" href="captures.html#boost_regex.captures.marked_sub_expressions">Marked sub-expressions</a>
</h5> </h5>
<p> <p>
@ -218,7 +218,7 @@
output stream. output stream.
</p> </p>
<a name="boost_regex.captures.unmatched_sub_expressions"></a><h5> <a name="boost_regex.captures.unmatched_sub_expressions"></a><h5>
<a name="id649339"></a> <a name="id781911"></a>
<a class="link" href="captures.html#boost_regex.captures.unmatched_sub_expressions">Unmatched Sub-Expressions</a> <a class="link" href="captures.html#boost_regex.captures.unmatched_sub_expressions">Unmatched Sub-Expressions</a>
</h5> </h5>
<p> <p>
@ -231,7 +231,7 @@
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. 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><h5> <a name="boost_regex.captures.repeated_captures"></a><h5>
<a name="id649379"></a> <a name="id781951"></a>
<a class="link" href="captures.html#boost_regex.captures.repeated_captures">Repeated Captures</a> <a class="link" href="captures.html#boost_regex.captures.repeated_captures">Repeated Captures</a>
</h5> </h5>
<p> <p>

View File

@ -32,7 +32,7 @@
'$', '\', '(', ')', '?', and ':'. '$', '\', '(', ')', '?', and ':'.
</p> </p>
<a name="boost_regex.format.boost_format_syntax.grouping"></a><h5> <a name="boost_regex.format.boost_format_syntax.grouping"></a><h5>
<a name="id670774"></a> <a name="id803467"></a>
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.grouping">Grouping</a> <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.grouping">Grouping</a>
</h5> </h5>
<p> <p>
@ -40,7 +40,7 @@
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><h5> <a name="boost_regex.format.boost_format_syntax.conditionals"></a><h5>
<a name="id670790"></a> <a name="id803484"></a>
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.conditionals">Conditionals</a> <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.conditionals">Conditionals</a>
</h5> </h5>
<p> <p>
@ -79,7 +79,7 @@
?{NAME}true-expression:false-expression ?{NAME}true-expression:false-expression
</p> </p>
<a name="boost_regex.format.boost_format_syntax.placeholder_sequences"></a><h5> <a name="boost_regex.format.boost_format_syntax.placeholder_sequences"></a><h5>
<a name="id670843"></a> <a name="id803536"></a>
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.placeholder_sequences">Placeholder <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.placeholder_sequences">Placeholder
Sequences</a> Sequences</a>
</h5> </h5>
@ -319,7 +319,7 @@
as a literal. as a literal.
</p> </p>
<a name="boost_regex.format.boost_format_syntax.escape_sequences"></a><h5> <a name="boost_regex.format.boost_format_syntax.escape_sequences"></a><h5>
<a name="id671186"></a> <a name="id803880"></a>
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.escape_sequences">Escape <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.escape_sequences">Escape
Sequences</a> Sequences</a>
</h5> </h5>

View File

@ -49,7 +49,7 @@
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><h5> <a name="boost_regex.install.building_with_bjam"></a><h5>
<a name="id646143"></a> <a name="id770942"></a>
<a class="link" href="install.html#boost_regex.install.building_with_bjam">Building with bjam</a> <a class="link" href="install.html#boost_regex.install.building_with_bjam">Building with bjam</a>
</h5> </h5>
<p> <p>
@ -58,7 +58,7 @@
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><h5> <a name="boost_regex.install.building_with_unicode_and_icu_support"></a><h5>
<a name="id646167"></a> <a name="id778734"></a>
<a class="link" href="install.html#boost_regex.install.building_with_unicode_and_icu_support">Building <a class="link" 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>
</h5> </h5>
@ -96,11 +96,11 @@
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><h5> <a name="boost_regex.install.building_via_makefiles"></a><h5>
<a name="id646286"></a> <a name="id778853"></a>
<a class="link" href="install.html#boost_regex.install.building_via_makefiles">Building via makefiles</a> <a class="link" href="install.html#boost_regex.install.building_via_makefiles">Building via makefiles</a>
</h5> </h5>
<a name="boost_regex.install.borland_c___builder_"></a><h6> <a name="boost_regex.install.borland_c___builder_"></a><h6>
<a name="id646299"></a> <a name="id778866"></a>
<a class="link" href="install.html#boost_regex.install.borland_c___builder_">Borland C++ Builder:</a> <a class="link" href="install.html#boost_regex.install.borland_c___builder_">Borland C++ Builder:</a>
</h6> </h6>
<div class="itemizedlist"><ul type="disc"> <div class="itemizedlist"><ul type="disc">
@ -166,7 +166,7 @@
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><h5> <a name="boost_regex.install.microsoft_visual_c___6__7__7_1_and_8"></a><h5>
<a name="id646538"></a> <a name="id779105"></a>
<a class="link" href="install.html#boost_regex.install.microsoft_visual_c___6__7__7_1_and_8">Microsoft <a class="link" 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>
</h5> </h5>
@ -253,7 +253,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.install.gcc_2_95_and_later_"></a><h6> <a name="boost_regex.install.gcc_2_95_and_later_"></a><h6>
<a name="id646737"></a> <a name="id779304"></a>
<a class="link" href="install.html#boost_regex.install.gcc_2_95_and_later_">GCC(2.95 and later)</a> <a class="link" href="install.html#boost_regex.install.gcc_2_95_and_later_">GCC(2.95 and later)</a>
</h6> </h6>
<p> <p>
@ -302,7 +302,7 @@
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><h6> <a name="boost_regex.install.sun_workshop_6_1"></a><h6>
<a name="id646863"></a> <a name="id779430"></a>
<a class="link" href="install.html#boost_regex.install.sun_workshop_6_1">Sun Workshop 6.1</a> <a class="link" href="install.html#boost_regex.install.sun_workshop_6_1">Sun Workshop 6.1</a>
</h6> </h6>
<p> <p>
@ -347,7 +347,7 @@
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><h6> <a name="boost_regex.install.makefiles_for_other_compilers"></a><h6>
<a name="id647007"></a> <a name="id779574"></a>
<a class="link" href="install.html#boost_regex.install.makefiles_for_other_compilers">Makefiles <a class="link" href="install.html#boost_regex.install.makefiles_for_other_compilers">Makefiles
for Other compilers</a> for Other compilers</a>
</h6> </h6>

View File

@ -27,7 +27,7 @@
<a name="boost_regex.ref.bad_expression"></a><a class="link" href="bad_expression.html" title="bad_expression"> bad_expression</a> <a name="boost_regex.ref.bad_expression"></a><a class="link" href="bad_expression.html" title="bad_expression"> bad_expression</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.ref.bad_expression.synopsis"></a><h5> <a name="boost_regex.ref.bad_expression.synopsis"></a><h5>
<a name="id754064"></a> <a name="id887724"></a>
<a class="link" href="bad_expression.html#boost_regex.ref.bad_expression.synopsis">Synopsis</a> <a class="link" href="bad_expression.html#boost_regex.ref.bad_expression.synopsis">Synopsis</a>
</h5> </h5>
<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> <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>
@ -54,7 +54,7 @@
<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><h5> <a name="boost_regex.ref.bad_expression.description"></a><h5>
<a name="id754425"></a> <a name="id889182"></a>
<a class="link" href="bad_expression.html#boost_regex.ref.bad_expression.description">Description</a> <a class="link" href="bad_expression.html#boost_regex.ref.bad_expression.description">Description</a>
</h5> </h5>
<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> <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>

View File

@ -27,7 +27,7 @@
<a name="boost_regex.ref.basic_regex"></a><a class="link" href="basic_regex.html" title="basic_regex"> basic_regex</a> <a name="boost_regex.ref.basic_regex"></a><a class="link" href="basic_regex.html" title="basic_regex"> basic_regex</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.ref.basic_regex.synopsis"></a><h5> <a name="boost_regex.ref.basic_regex.synopsis"></a><h5>
<a name="id671530"></a> <a name="id804223"></a>
<a class="link" href="basic_regex.html#boost_regex.ref.basic_regex.synopsis">Synopsis</a> <a class="link" href="basic_regex.html#boost_regex.ref.basic_regex.synopsis">Synopsis</a>
</h5> </h5>
<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 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>
@ -244,7 +244,7 @@
<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.basic_regex.description"></a><h5> <a name="boost_regex.ref.basic_regex.description"></a><h5>
<a name="id676186"></a> <a name="id809698"></a>
<a class="link" href="basic_regex.html#boost_regex.ref.basic_regex.description">Description</a> <a class="link" href="basic_regex.html#boost_regex.ref.basic_regex.description">Description</a>
</h5> </h5>
<p> <p>
@ -327,7 +327,7 @@
<code class="computeroutput"><span class="identifier">basic_regex</span></code>. <code class="computeroutput"><span class="identifier">basic_regex</span></code>.
</p> </p>
<div class="table"> <div class="table">
<a name="id679189"></a><p class="title"><b>Table<EFBFBD>1.<2E>basic_regex default construction postconditions</b></p> <a name="id812702"></a><p class="title"><b>Table<EFBFBD>1.<2E>basic_regex default construction postconditions</b></p>
<div class="table-contents"><table class="table" summary="basic_regex default construction postconditions"> <div class="table-contents"><table class="table" summary="basic_regex default construction postconditions">
<colgroup> <colgroup>
<col> <col>
@ -407,7 +407,7 @@
flags</a> specified in <span class="emphasis"><em>f</em></span>. flags</a> specified in <span class="emphasis"><em>f</em></span>.
</p> </p>
<div class="table"> <div class="table">
<a name="id679487"></a><p class="title"><b>Table<EFBFBD>2.<2E>Postconditions for basic_regex construction</b></p> <a name="id812999"></a><p class="title"><b>Table<EFBFBD>2.<2E>Postconditions for basic_regex construction</b></p>
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction"> <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
<colgroup> <colgroup>
<col> <col>
@ -512,7 +512,7 @@
specified in <span class="emphasis"><em>f</em></span>. specified in <span class="emphasis"><em>f</em></span>.
</p> </p>
<div class="table"> <div class="table">
<a name="id679900"></a><p class="title"><b>Table<EFBFBD>3.<2E>Postconditions for basic_regex construction</b></p> <a name="id813412"></a><p class="title"><b>Table<EFBFBD>3.<2E>Postconditions for basic_regex construction</b></p>
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction"> <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
<colgroup> <colgroup>
<col> <col>
@ -616,7 +616,7 @@
according the option flags specified in <span class="emphasis"><em>f</em></span>. according the option flags specified in <span class="emphasis"><em>f</em></span>.
</p> </p>
<div class="table"> <div class="table">
<a name="id680304"></a><p class="title"><b>Table<EFBFBD>4.<2E>Postconditions for basic_regex construction</b></p> <a name="id813816"></a><p class="title"><b>Table<EFBFBD>4.<2E>Postconditions for basic_regex construction</b></p>
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction"> <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
<colgroup> <colgroup>
<col> <col>
@ -727,7 +727,7 @@
flags</a> specified in <span class="emphasis"><em>f</em></span>. flags</a> specified in <span class="emphasis"><em>f</em></span>.
</p> </p>
<div class="table"> <div class="table">
<a name="id680784"></a><p class="title"><b>Table<EFBFBD>5.<2E>Postconditions for basic_regex construction</b></p> <a name="id814297"></a><p class="title"><b>Table<EFBFBD>5.<2E>Postconditions for basic_regex construction</b></p>
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction"> <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
<colgroup> <colgroup>
<col> <col>
@ -829,7 +829,7 @@
flags</a> specified in <span class="emphasis"><em>f</em></span>. flags</a> specified in <span class="emphasis"><em>f</em></span>.
</p> </p>
<div class="table"> <div class="table">
<a name="id681143"></a><p class="title"><b>Table<EFBFBD>6.<2E>Postconditions for basic_regex construction</b></p> <a name="id814656"></a><p class="title"><b>Table<EFBFBD>6.<2E>Postconditions for basic_regex construction</b></p>
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction"> <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
<colgroup> <colgroup>
<col> <col>
@ -1043,7 +1043,7 @@
in <span class="emphasis"><em>f</em></span>. in <span class="emphasis"><em>f</em></span>.
</p> </p>
<div class="table"> <div class="table">
<a name="id682659"></a><p class="title"><b>Table<EFBFBD>7.<2E>Postconditions for basic_regex::assign</b></p> <a name="id816171"></a><p class="title"><b>Table<EFBFBD>7.<2E>Postconditions for basic_regex::assign</b></p>
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex::assign"> <div class="table-contents"><table class="table" summary="Postconditions for basic_regex::assign">
<colgroup> <colgroup>
<col> <col>

View File

@ -34,7 +34,7 @@
Boost-specific enhanced interface. Boost-specific enhanced interface.
</p> </p>
<a name="boost_regex.ref.concepts.traits_concept.minimal_requirements_"></a><h5> <a name="boost_regex.ref.concepts.traits_concept.minimal_requirements_"></a><h5>
<a name="id782143"></a> <a name="id915267"></a>
<a class="link" href="traits_concept.html#boost_regex.ref.concepts.traits_concept.minimal_requirements_">Minimal <a class="link" href="traits_concept.html#boost_regex.ref.concepts.traits_concept.minimal_requirements_">Minimal
requirements.</a> requirements.</a>
</h5> </h5>
@ -381,7 +381,7 @@
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.ref.concepts.traits_concept.additional_optional_requirements"></a><h5> <a name="boost_regex.ref.concepts.traits_concept.additional_optional_requirements"></a><h5>
<a name="id782758"></a> <a name="id915912"></a>
<a class="link" href="traits_concept.html#boost_regex.ref.concepts.traits_concept.additional_optional_requirements">Additional <a class="link" href="traits_concept.html#boost_regex.ref.concepts.traits_concept.additional_optional_requirements">Additional
Optional Requirements</a> Optional Requirements</a>
</h5> </h5>

View File

@ -34,7 +34,7 @@
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><h5> <a name="boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format"></a><h5>
<a name="id783339"></a> <a name="id916434"></a>
<a class="link" href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm <a class="link" href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm
regex_format</a> regex_format</a>
</h5> </h5>
@ -46,15 +46,10 @@
string, <code class="computeroutput"><span class="identifier">regex_format</span></code> 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"><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> <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">Formatter</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="identifier">Formatter</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="number">0</span><span class="special">);</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="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">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;&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="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>
@ -71,16 +66,10 @@
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"><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> <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">Formatter</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="identifier">Formatter</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="number">0</span><span class="special">);</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="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">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;&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="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>
@ -133,13 +122,14 @@
<tr> <tr>
<td> <td>
<p> <p>
<code class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span></code> <code class="computeroutput"><span class="identifier">Formatter</span> <span class="identifier">fmt</span></code>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
A format string that determines how the match is transformed into Either a format string that determines how the match is transformed
the new string. into the new string, or a functor that computes the new string
from <span class="emphasis"><em>m</em></span> - see <a class="link" 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>.
</p> </p>
</td> </td>
</tr> </tr>

View File

@ -27,7 +27,7 @@
<a name="boost_regex.ref.error_type"></a><a class="link" href="error_type.html" title="error_type"> error_type</a> <a name="boost_regex.ref.error_type"></a><a class="link" href="error_type.html" title="error_type"> error_type</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.ref.error_type.synopsis"></a><h5> <a name="boost_regex.ref.error_type.synopsis"></a><h5>
<a name="id760997"></a> <a name="id895135"></a>
<a class="link" href="error_type.html#boost_regex.ref.error_type.synopsis">Synopsis</a> <a class="link" href="error_type.html#boost_regex.ref.error_type.synopsis">Synopsis</a>
</h5> </h5>
<p> <p>
@ -57,7 +57,7 @@
</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><h5> <a name="boost_regex.ref.error_type.description"></a><h5>
<a name="id761412"></a> <a name="id895550"></a>
<a class="link" href="error_type.html#boost_regex.ref.error_type.description">Description</a> <a class="link" href="error_type.html#boost_regex.ref.error_type.description">Description</a>
</h5> </h5>
<p> <p>

View File

@ -69,7 +69,7 @@
</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><h5> <a name="boost_regex.ref.match_flag_type.description"></a><h5>
<a name="id760446"></a> <a name="id893809"></a>
<a class="link" href="match_flag_type.html#boost_regex.ref.match_flag_type.description">Description</a> <a class="link" href="match_flag_type.html#boost_regex.ref.match_flag_type.description">Description</a>
</h5> </h5>
<p> <p>

View File

@ -27,7 +27,7 @@
<a name="boost_regex.ref.match_results"></a><a class="link" href="match_results.html" title="match_results"> match_results</a> <a name="boost_regex.ref.match_results"></a><a class="link" href="match_results.html" title="match_results"> match_results</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.ref.match_results.synopsis"></a><h5> <a name="boost_regex.ref.match_results.synopsis"></a><h5>
<a name="id687993"></a> <a name="id820550"></a>
<a class="link" href="match_results.html#boost_regex.ref.match_results.synopsis">Synopsis</a> <a class="link" href="match_results.html#boost_regex.ref.match_results.synopsis">Synopsis</a>
</h5> </h5>
<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 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>
@ -132,11 +132,12 @@
<span class="identifier">const_iterator</span> <a class="link" href="match_results.html#boost_regex.match_results.begin">begin</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span> <span class="identifier">const_iterator</span> <a class="link" href="match_results.html#boost_regex.match_results.begin">begin</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
<span class="identifier">const_iterator</span> <a class="link" href="match_results.html#boost_regex.match_results.end">end</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span> <span class="identifier">const_iterator</span> <a class="link" href="match_results.html#boost_regex.match_results.end">end</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
<span class="comment">// format: <span class="comment">// format:
</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> <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">Formatter</span><span class="special">&gt;</span>
<span class="identifier">OutputIterator</span> <a class="link" href="match_results.html#boost_regex.match_results.format">format</a><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">OutputIterator</span> <a class="link" href="match_results.html#boost_regex.match_results.format">format</a><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="identifier">Formatter</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="keyword">const</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="keyword">const</span><span class="special">;</span>
<span class="identifier">string_type</span> <a class="link" href="match_results.html#boost_regex.match_results.format2">format</a><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">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">&gt;</span>
<span class="identifier">string_type</span> <a class="link" href="match_results.html#boost_regex.match_results.format2">format</a><span class="special">(</span><span class="identifier">Formatter</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="keyword">const</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="keyword">const</span><span class="special">;</span>
<span class="identifier">allocator_type</span> <a class="link" href="match_results.html#boost_regex.match_results.get_allocator">get_allocator</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span> <span class="identifier">allocator_type</span> <a class="link" href="match_results.html#boost_regex.match_results.get_allocator">get_allocator</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
@ -166,7 +167,7 @@
<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><h5> <a name="boost_regex.ref.match_results.description"></a><h5>
<a name="id691227"></a> <a name="id824075"></a>
<a class="link" href="match_results.html#boost_regex.ref.match_results.description">Description</a> <a class="link" href="match_results.html#boost_regex.ref.match_results.description">Description</a>
</h5> </h5>
<p> <p>
@ -558,18 +559,32 @@
</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"><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> <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">Formatter</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="identifier">Formatter</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"><strong>Requires</strong></span>: The type <code class="computeroutput"><span class="identifier">OutputIterator</span></code> <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"><strong>Effects</strong></span>: Copies the character sequence The type <code class="computeroutput"><span class="identifier">Formatter</span></code> must be
<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> either a pointer to a null-terminated string of type <code class="computeroutput"><span class="identifier">char_type</span><span class="special">[]</span></code>, or be a container of <code class="computeroutput"><span class="identifier">char_type</span></code>'s
(for example <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">char_type</span><span class="special">&gt;</span></code>)
or be a unary, binary or ternary functor that computes the replacement string
from a function call: either <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">)</span></code>
which must return a container of <code class="computeroutput"><span class="identifier">char_type</span></code>'s
to be used as the replacement text, or either <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">,</span>
<span class="identifier">out</span><span class="special">)</span></code>
or <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">,</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>, both of which write the replacement text
to <code class="computeroutput"><span class="special">*</span><span class="identifier">out</span></code>,
and then return the new OutputIterator position.
</p>
<p>
<span class="bold"><strong>Effects</strong></span>: If <code class="computeroutput"><span class="identifier">fmt</span></code>
is either a null-terminated string, or a container of <code class="computeroutput"><span class="identifier">char_type</span></code>'s,
then copies the character sequence <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 <code class="computeroutput"><span class="identifier">OutputIterator</span></code> <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
@ -578,6 +593,27 @@
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>
If <code class="computeroutput"><span class="identifier">fmt</span></code> is a function object,
then depending on the number of arguments the function object accepts, it
will either:
</p>
<div class="itemizedlist"><ul type="disc">
<li>
Call <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">)</span></code> and
copy the result to <code class="computeroutput"><span class="identifier">OutputIterator</span></code><span class="emphasis"><em>out</em></span>.
</li>
<li>
Call <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">,</span> <span class="identifier">out</span><span class="special">)</span></code>.
</li>
<li>
Call <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">,</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
</li>
</ul></div>
<p>
In all cases the new position of the <code class="computeroutput"><span class="identifier">OutputIterator</span></code>
is returned.
</p>
<p> <p>
See the <a class="link" href="../format.html" title="Search and Replace Format String Syntax">format syntax guide for more information</a>. See the <a class="link" href="../format.html" title="Search and Replace Format String Syntax">format syntax guide for more information</a>.
</p> </p>
@ -586,18 +622,57 @@
</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"><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> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">&gt;</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">string_type</span> <span class="identifier">format</span><span class="special">(</span><span class="identifier">Formatter</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>
</pre> </pre>
<p> <p>
<span class="bold"><strong>Effects</strong></span>: Returns a copy of the string <span class="emphasis"><em>fmt</em></span>. <span class="bold"><strong>Requires</strong></span> The type <code class="computeroutput"><span class="identifier">Formatter</span></code>
For each format specifier or escape sequence in <span class="emphasis"><em>fmt</em></span>, must be either a pointer to a null-terminated string of type <code class="computeroutput"><span class="identifier">char_type</span><span class="special">[]</span></code>,
replace that sequence with either the character(s) it represents, or the or be a container of <code class="computeroutput"><span class="identifier">char_type</span></code>'s
sequence of characters within <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> to which it refers. The bitmasks specified (for example <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">char_type</span><span class="special">&gt;</span></code>)
in flags determines what format specifiers or escape sequences are recognized, or be a unary, binary or ternary functor that computes the replacement string
by default this is the format used by ECMA-262, ECMAScript Language Specification, from a function call: either <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">)</span></code>
Chapter 15 part 5.4.11 String.prototype.replace. which must return a container of <code class="computeroutput"><span class="identifier">char_type</span></code>'s
to be used as the replacement text, or either <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">,</span>
<span class="identifier">out</span><span class="special">)</span></code>
or <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">,</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>, both of which write the replacement text
to <code class="computeroutput"><span class="special">*</span><span class="identifier">out</span></code>,
and then return the new OutputIterator position.
</p> </p>
<p>
<span class="bold"><strong>Effects</strong></span>: If <code class="computeroutput"><span class="identifier">fmt</span></code>
is either a null-terminated string, or a container of <code class="computeroutput"><span class="identifier">char_type</span></code>'s,
then copies the string <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 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, by default this is the format
used by ECMA-262, ECMAScript Language Specification, Chapter 15 part 5.4.11
String.prototype.replace.
</p>
<p>
If <code class="computeroutput"><span class="identifier">fmt</span></code> is a function object,
then depending on the number of arguments the function object accepts, it
will either:
</p>
<div class="itemizedlist"><ul type="disc">
<li>
Call <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">)</span></code> and
return the result.
</li>
<li>
Call <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">,</span> <span class="identifier">unspecified</span><span class="special">-</span><span class="identifier">output</span><span class="special">-</span><span class="identifier">iterator</span><span class="special">)</span></code>, where <code class="computeroutput"><span class="identifier">unspecified</span><span class="special">-</span><span class="identifier">output</span><span class="special">-</span><span class="identifier">iterator</span></code>
is an unspecified OutputIterator type used to copy the output to the string
result.
</li>
<li>
Call <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">,</span> <span class="identifier">unspecified</span><span class="special">-</span><span class="identifier">output</span><span class="special">-</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>, where <code class="computeroutput"><span class="identifier">unspecified</span><span class="special">-</span><span class="identifier">output</span><span class="special">-</span><span class="identifier">iterator</span></code>
is an unspecified OutputIterator type used to copy the output to the string
result.
</li>
</ul></div>
<p> <p>
See the <a class="link" href="../format.html" title="Search and Replace Format String Syntax">format syntax guide for more information</a>. See the <a class="link" href="../format.html" title="Search and Replace Format String Syntax">format syntax guide for more information</a>.
</p> </p>

View File

@ -43,7 +43,7 @@
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><h5> <a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match"></a><h5>
<a name="id763376"></a> <a name="id898429"></a>
<a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match">u32regex_match</a> <a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match">u32regex_match</a>
</h5> </h5>
<p> <p>
@ -89,7 +89,7 @@
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search"></a><h5> <a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search"></a><h5>
<a name="id763891"></a> <a name="id898943"></a>
<a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search">u32regex_search</a> <a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search">u32regex_search</a>
</h5> </h5>
<p> <p>
@ -128,7 +128,7 @@
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace"></a><h5> <a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace"></a><h5>
<a name="id765992"></a> <a name="id899362"></a>
<a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace">u32regex_replace</a> <a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace">u32regex_replace</a>
</h5> </h5>
<p> <p>

View File

@ -28,7 +28,7 @@
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><h5> <a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator"></a><h5>
<a name="id766310"></a> <a name="id899680"></a>
<a class="link" href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator">u32regex_iterator</a> <a class="link" href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator">u32regex_iterator</a>
</h5> </h5>
<p> <p>
@ -126,7 +126,7 @@
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><h5> <a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator"></a><h5>
<a name="id767579"></a> <a name="id901041"></a>
<a class="link" href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator">u32regex_token_iterator</a> <a class="link" href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator">u32regex_token_iterator</a>
</h5> </h5>
<p> <p>

View File

@ -34,7 +34,7 @@
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><h5> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match"></a><h5>
<a name="id772430"></a> <a name="id907624"></a>
<a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match">regex_match</a> <a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match">regex_match</a>
</h5> </h5>
<p> <p>
@ -82,7 +82,7 @@
<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><h5> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_"></a><h5>
<a name="id773088"></a> <a name="id908282"></a>
<a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_">regex_match <a class="link" 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>
</h5> </h5>
@ -110,7 +110,7 @@
<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><h5> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search"></a><h5>
<a name="id775582"></a> <a name="id908713"></a>
<a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search">regex_search</a> <a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search">regex_search</a>
</h5> </h5>
<p> <p>
@ -149,7 +149,7 @@
<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><h5> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_"></a><h5>
<a name="id776118"></a> <a name="id909248"></a>
<a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_">regex_search <a class="link" 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>
</h5> </h5>
@ -164,7 +164,7 @@
<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> <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><h5> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace"></a><h5>
<a name="id776408"></a> <a name="id909538"></a>
<a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace">regex_replace</a> <a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace">regex_replace</a>
</h5> </h5>
<p> <p>

View File

@ -32,7 +32,7 @@
an MFC/ATL string to a <a class="link" href="../../regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> or <a class="link" href="../../regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a>: an MFC/ATL string to a <a class="link" href="../../regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> or <a class="link" 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><h5> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper"></a><h5>
<a name="id777178"></a> <a name="id911402"></a>
<a class="link" href="mfc_iter.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper">regex_iterator <a class="link" 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>
</h5> </h5>
@ -68,7 +68,7 @@
<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><h5> <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers"></a><h5>
<a name="id778820"></a> <a name="id911950"></a>
<a class="link" href="mfc_iter.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers">regex_token_iterator <a class="link" 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>
</h5> </h5>

View File

@ -165,7 +165,7 @@
<a name="regcomp"></a><p> <a name="regcomp"></a><p>
</p> </p>
<a name="boost_regex.ref.posix.regcomp"></a><h5> <a name="boost_regex.ref.posix.regcomp"></a><h5>
<a name="id780958"></a> <a name="id914089"></a>
<a class="link" href="posix.html#boost_regex.ref.posix.regcomp">regcomp</a> <a class="link" href="posix.html#boost_regex.ref.posix.regcomp">regcomp</a>
</h5> </h5>
<p> <p>
@ -379,7 +379,7 @@
<a name="regerror"></a><p> <a name="regerror"></a><p>
</p> </p>
<a name="boost_regex.ref.posix.regerror"></a><h5> <a name="boost_regex.ref.posix.regerror"></a><h5>
<a name="id781469"></a> <a name="id914594"></a>
<a class="link" href="posix.html#boost_regex.ref.posix.regerror">regerror</a> <a class="link" href="posix.html#boost_regex.ref.posix.regerror">regerror</a>
</h5> </h5>
<p> <p>
@ -467,7 +467,7 @@
<a name="regexec"></a><p> <a name="regexec"></a><p>
</p> </p>
<a name="boost_regex.ref.posix.regexec"></a><h5> <a name="boost_regex.ref.posix.regexec"></a><h5>
<a name="id781598"></a> <a name="id914722"></a>
<a class="link" href="posix.html#boost_regex.ref.posix.regexec">regexec</a> <a class="link" href="posix.html#boost_regex.ref.posix.regexec">regexec</a>
</h5> </h5>
<p> <p>
@ -537,7 +537,7 @@
<a name="regfree"></a><p> <a name="regfree"></a><p>
</p> </p>
<a name="boost_regex.ref.posix.regfree"></a><h5> <a name="boost_regex.ref.posix.regfree"></a><h5>
<a name="id781709"></a> <a name="id914834"></a>
<a class="link" href="posix.html#boost_regex.ref.posix.regfree">regfree</a> <a class="link" href="posix.html#boost_regex.ref.posix.regfree">regfree</a>
</h5> </h5>
<p> <p>

View File

@ -78,7 +78,7 @@
<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><h5> <a name="boost_regex.ref.regex_iterator.description"></a><h5>
<a name="id739152"></a> <a name="id872539"></a>
<a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.description">Description</a> <a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.description">Description</a>
</h5> </h5>
<p> <p>
@ -436,7 +436,7 @@
<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><h5> <a name="boost_regex.ref.regex_iterator.examples"></a><h5>
<a name="id742537"></a> <a name="id876193"></a>
<a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.examples">Examples</a> <a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.examples">Examples</a>
</h5> </h5>
<p> <p>

View File

@ -80,7 +80,7 @@
<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><h5> <a name="boost_regex.ref.regex_match.description"></a><h5>
<a name="id722544"></a> <a name="id856799"></a>
<a class="link" href="regex_match.html#boost_regex.ref.regex_match.description">Description</a> <a class="link" href="regex_match.html#boost_regex.ref.regex_match.description">Description</a>
</h5> </h5>
<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> <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>
@ -360,7 +360,7 @@
<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>. <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><h5> <a name="boost_regex.ref.regex_match.examples"></a><h5>
<a name="id724914"></a> <a name="id859238"></a>
<a class="link" href="regex_match.html#boost_regex.ref.regex_match.examples">Examples</a> <a class="link" href="regex_match.html#boost_regex.ref.regex_match.examples">Examples</a>
</h5> </h5>
<p> <p>

View File

@ -38,37 +38,40 @@
set. If the flag <code class="computeroutput"><span class="identifier">format_first_only</span></code> 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"><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> <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">Formatter</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>
<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="identifier">Formatter</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>
<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">Formatter</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="identifier">Formatter</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><h5> <a name="boost_regex.ref.regex_replace.description"></a><h5>
<a name="id733770"></a> <a name="id866765"></a>
<a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.description">Description</a> <a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.description">Description</a>
</h5> </h5>
<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> <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">Formatter</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>
<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="identifier">Formatter</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>
Enumerates all the occurences of expression <span class="emphasis"><em>e</em></span> in the Enumerates all the occurences of expression <span class="emphasis"><em>e</em></span> in the
sequence [first, last), replacing each occurence with the string that results sequence [first, last), replacing each occurence with the string that results
by merging the match found with the format string <span class="emphasis"><em>fmt</em></span>, by merging the match found with the format string <span class="emphasis"><em>fmt</em></span>,
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>. In the case
that <span class="emphasis"><em>fmt</em></span> is a unary, binary or ternary function object,
then the character sequence generated by that object is copied unchanged
to the output when performing a substitution.
</p> </p>
<p> <p>
If the flag <code class="computeroutput"><span class="identifier">format_no_copy</span></code> If the flag <code class="computeroutput"><span class="identifier">format_no_copy</span></code>
@ -85,6 +88,21 @@
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 class="link" href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>. set in <span class="emphasis"><em>flags</em></span>: see <a class="link" href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
</p> </p>
<p>
<span class="bold"><strong>Requires</strong></span> The type <code class="computeroutput"><span class="identifier">Formatter</span></code>
must be either a pointer to a null-terminated string of type <code class="computeroutput"><span class="identifier">char_type</span><span class="special">[]</span></code>,
or be a container of <code class="computeroutput"><span class="identifier">char_type</span></code>'s
(for example <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">char_type</span><span class="special">&gt;</span></code>)
or be a unary, binary or ternary functor that computes the replacement string
from a function call: either <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(</span><span class="identifier">what</span><span class="special">)</span></code>
which must return a container of <code class="computeroutput"><span class="identifier">char_type</span></code>'s
to be used as the replacement text, or either <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(</span><span class="identifier">what</span><span class="special">,</span>
<span class="identifier">out</span><span class="special">)</span></code>
or <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(</span><span class="identifier">what</span><span class="special">,</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>, both of which write the replacement text
to <code class="computeroutput"><span class="special">*</span><span class="identifier">out</span></code>,
and then return the new OutputIterator position. In each case <code class="computeroutput"><span class="identifier">what</span></code> is the <a class="link" href="match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> object that represents
the match found.
</p>
<p> <p>
<span class="bold"><strong>Effects</strong></span>: Constructs an <a class="link" href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> object: <span class="bold"><strong>Effects</strong></span>: Constructs an <a class="link" href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> object:
</p> </p>
@ -150,12 +168,27 @@
<p> <p>
<span class="bold"><strong>Returns</strong></span>: out. <span class="bold"><strong>Returns</strong></span>: out.
</p> </p>
<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> <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">Formatter</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="identifier">Formatter</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>
<span class="bold"><strong>Requires</strong></span> The type <code class="computeroutput"><span class="identifier">Formatter</span></code>
must be either a pointer to a null-terminated string of type <code class="computeroutput"><span class="identifier">char_type</span><span class="special">[]</span></code>,
or be a container of <code class="computeroutput"><span class="identifier">char_type</span></code>'s
(for example <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">char_type</span><span class="special">&gt;</span></code>)
or be a unary, binary or ternary functor that computes the replacement string
from a function call: either <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(</span><span class="identifier">what</span><span class="special">)</span></code>
which must return a container of <code class="computeroutput"><span class="identifier">char_type</span></code>'s
to be used as the replacement text, or either <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(</span><span class="identifier">what</span><span class="special">,</span>
<span class="identifier">out</span><span class="special">)</span></code>
or <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(</span><span class="identifier">what</span><span class="special">,</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>, both of which write the replacement text
to <code class="computeroutput"><span class="special">*</span><span class="identifier">out</span></code>,
and then return the new OutputIterator position. In each case <code class="computeroutput"><span class="identifier">what</span></code> is the <a class="link" href="match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> object that represents
the match found.
</p>
<p> <p>
<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="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>
@ -163,7 +196,7 @@
and then returns <code class="computeroutput"><span class="identifier">result</span></code>. and then returns <code class="computeroutput"><span class="identifier">result</span></code>.
</p> </p>
<a name="boost_regex.ref.regex_replace.examples"></a><h5> <a name="boost_regex.ref.regex_replace.examples"></a><h5>
<a name="id734884"></a> <a name="id869301"></a>
<a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.examples">Examples</a> <a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.examples">Examples</a>
</h5> </h5>
<p> <p>

View File

@ -73,7 +73,7 @@
<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><h5> <a name="boost_regex.ref.regex_search.description"></a><h5>
<a name="id726538"></a> <a name="id860862"></a>
<a class="link" href="regex_search.html#boost_regex.ref.regex_search.description">Description</a> <a class="link" href="regex_search.html#boost_regex.ref.regex_search.description">Description</a>
</h5> </h5>
<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> <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>
@ -355,7 +355,7 @@
<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>. <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><h5> <a name="boost_regex.ref.regex_search.examples"></a><h5>
<a name="id731156"></a> <a name="id864387"></a>
<a class="link" href="regex_search.html#boost_regex.ref.regex_search.examples">Examples</a> <a class="link" href="regex_search.html#boost_regex.ref.regex_search.examples">Examples</a>
</h5> </h5>
<p> <p>

View File

@ -136,7 +136,7 @@
<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><h5> <a name="boost_regex.ref.regex_token_iterator.description"></a><h5>
<a name="id748992"></a> <a name="id882652"></a>
<a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.description">Description</a> <a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.description">Description</a>
</h5> </h5>
<a name="boost_regex.regex_token_iterator.construct1"></a><p> <a name="boost_regex.regex_token_iterator.construct1"></a><p>
@ -383,7 +383,7 @@
<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><h5> <a name="boost_regex.ref.regex_token_iterator.examples"></a><h5>
<a name="id752056"></a> <a name="id885711"></a>
<a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.examples">Examples</a> <a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.examples">Examples</a>
</h5> </h5>
<p> <p>

View File

@ -46,7 +46,7 @@
<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><h5> <a name="boost_regex.ref.regex_traits.description"></a><h5>
<a name="id762181"></a> <a name="id896090"></a>
<a class="link" href="regex_traits.html#boost_regex.ref.regex_traits.description">Description</a> <a class="link" href="regex_traits.html#boost_regex.ref.regex_traits.description">Description</a>
</h5> </h5>
<p> <p>

View File

@ -329,11 +329,11 @@
<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.sub_match.description"></a><h5> <a name="boost_regex.ref.sub_match.description"></a><h5>
<a name="id706400"></a> <a name="id839563"></a>
<a class="link" href="sub_match.html#boost_regex.ref.sub_match.description">Description</a> <a class="link" href="sub_match.html#boost_regex.ref.sub_match.description">Description</a>
</h5> </h5>
<a name="boost_regex.ref.sub_match.members"></a><h6> <a name="boost_regex.ref.sub_match.members"></a><h6>
<a name="id706413"></a> <a name="id839576"></a>
<a class="link" href="sub_match.html#boost_regex.ref.sub_match.members">Members</a> <a class="link" href="sub_match.html#boost_regex.ref.sub_match.members">Members</a>
</h6> </h6>
<a name="boost_regex.sub_match.value_type"></a><p> <a name="boost_regex.sub_match.value_type"></a><p>
@ -473,7 +473,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.ref.sub_match.sub_match_non_member_operators"></a><h6> <a name="boost_regex.ref.sub_match.sub_match_non_member_operators"></a><h6>
<a name="id707514"></a> <a name="id842315"></a>
<a class="link" href="sub_match.html#boost_regex.ref.sub_match.sub_match_non_member_operators">sub_match <a class="link" href="sub_match.html#boost_regex.ref.sub_match.sub_match_non_member_operators">sub_match
non-member operators</a> non-member operators</a>
</h6> </h6>
@ -1008,7 +1008,7 @@
<span class="special">+</span> <span class="identifier">m2</span><span class="special">.</span><span class="identifier">str</span><span class="special">()</span></code>. <span class="special">+</span> <span class="identifier">m2</span><span class="special">.</span><span class="identifier">str</span><span class="special">()</span></code>.
</p> </p>
<a name="boost_regex.ref.sub_match.stream_inserter"></a><h6> <a name="boost_regex.ref.sub_match.stream_inserter"></a><h6>
<a name="id719507"></a> <a name="id855401"></a>
<a class="link" href="sub_match.html#boost_regex.ref.sub_match.stream_inserter">Stream inserter</a> <a class="link" href="sub_match.html#boost_regex.ref.sub_match.stream_inserter">Stream inserter</a>
</h6> </h6>
<a name="boost_regex.sub_match.op_stream"></a><p> <a name="boost_regex.sub_match.op_stream"></a><p>

View File

@ -28,7 +28,7 @@
Expression Syntax</a> Expression Syntax</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.syntax.basic_extended.synopsis"></a><h4> <a name="boost_regex.syntax.basic_extended.synopsis"></a><h4>
<a name="id659360"></a> <a name="id792204"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.synopsis">Synopsis</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.synopsis">Synopsis</a>
</h4> </h4>
<p> <p>
@ -46,7 +46,7 @@
<a name="boost_regex.posix_extended_syntax"></a><p> <a name="boost_regex.posix_extended_syntax"></a><p>
</p> </p>
<a name="boost_regex.syntax.basic_extended.posix_extended_syntax"></a><h4> <a name="boost_regex.syntax.basic_extended.posix_extended_syntax"></a><h4>
<a name="id659539"></a> <a name="id792383"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.posix_extended_syntax">POSIX <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.posix_extended_syntax">POSIX
Extended Syntax</a> Extended Syntax</a>
</h4> </h4>
@ -56,7 +56,7 @@
</p> </p>
<pre class="programlisting">.[{()\*+?|^$</pre> <pre class="programlisting">.[{()\*+?|^$</pre>
<a name="boost_regex.syntax.basic_extended.wildcard_"></a><h5> <a name="boost_regex.syntax.basic_extended.wildcard_"></a><h5>
<a name="id659560"></a> <a name="id792405"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.wildcard_">Wildcard:</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.wildcard_">Wildcard:</a>
</h5> </h5>
<p> <p>
@ -74,7 +74,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.syntax.basic_extended.anchors_"></a><h5> <a name="boost_regex.syntax.basic_extended.anchors_"></a><h5>
<a name="id659605"></a> <a name="id792449"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.anchors_">Anchors:</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.anchors_">Anchors:</a>
</h5> </h5>
<p> <p>
@ -86,7 +86,7 @@
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_extended.marked_sub_expressions_"></a><h5> <a name="boost_regex.syntax.basic_extended.marked_sub_expressions_"></a><h5>
<a name="id659627"></a> <a name="id792472"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.marked_sub_expressions_">Marked <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.marked_sub_expressions_">Marked
sub-expressions:</a> sub-expressions:</a>
</h5> </h5>
@ -98,7 +98,7 @@
to by a back-reference. to by a back-reference.
</p> </p>
<a name="boost_regex.syntax.basic_extended.repeats_"></a><h5> <a name="boost_regex.syntax.basic_extended.repeats_"></a><h5>
<a name="id659661"></a> <a name="id792506"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.repeats_">Repeats:</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.repeats_">Repeats:</a>
</h5> </h5>
<p> <p>
@ -184,7 +184,7 @@ cab
operator to be applied to. operator to be applied to.
</p> </p>
<a name="boost_regex.syntax.basic_extended.back_references_"></a><h5> <a name="boost_regex.syntax.basic_extended.back_references_"></a><h5>
<a name="id659967"></a> <a name="id792812"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.back_references_">Back references:</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.back_references_">Back references:</a>
</h5> </h5>
<p> <p>
@ -214,7 +214,7 @@ cab
</p></td></tr> </p></td></tr>
</table></div> </table></div>
<a name="boost_regex.syntax.basic_extended.alternation"></a><h5> <a name="boost_regex.syntax.basic_extended.alternation"></a><h5>
<a name="id660031"></a> <a name="id792875"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.alternation">Alternation</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.alternation">Alternation</a>
</h5> </h5>
<p> <p>
@ -227,7 +227,7 @@ cab
will match either of "abd" or "abef". will match either of "abd" or "abef".
</p> </p>
<a name="boost_regex.syntax.basic_extended.character_sets_"></a><h5> <a name="boost_regex.syntax.basic_extended.character_sets_"></a><h5>
<a name="id660098"></a> <a name="id792942"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_sets_">Character <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_sets_">Character
sets:</a> sets:</a>
</h5> </h5>
@ -240,7 +240,7 @@ cab
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_extended.single_characters_"></a><h6> <a name="boost_regex.syntax.basic_extended.single_characters_"></a><h6>
<a name="id660118"></a> <a name="id792963"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.single_characters_">Single <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.single_characters_">Single
characters:</a> characters:</a>
</h6> </h6>
@ -249,7 +249,7 @@ cab
or 'c'. or 'c'.
</p> </p>
<a name="boost_regex.syntax.basic_extended.character_ranges_"></a><h6> <a name="boost_regex.syntax.basic_extended.character_ranges_"></a><h6>
<a name="id660149"></a> <a name="id792994"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_ranges_">Character <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_ranges_">Character
ranges:</a> ranges:</a>
</h6> </h6>
@ -265,7 +265,7 @@ cab
the code points of the characters only. the code points of the characters only.
</p> </p>
<a name="boost_regex.syntax.basic_extended.negation_"></a><h6> <a name="boost_regex.syntax.basic_extended.negation_"></a><h6>
<a name="id660211"></a> <a name="id793055"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.negation_">Negation:</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.negation_">Negation:</a>
</h6> </h6>
<p> <p>
@ -274,7 +274,7 @@ cab
range <code class="computeroutput"><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span></code>. range <code class="computeroutput"><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span></code>.
</p> </p>
<a name="boost_regex.syntax.basic_extended.character_classes_"></a><h6> <a name="boost_regex.syntax.basic_extended.character_classes_"></a><h6>
<a name="id660265"></a> <a name="id793109"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_classes_">Character <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_classes_">Character
classes:</a> classes:</a>
</h6> </h6>
@ -284,7 +284,7 @@ cab
<a class="link" href="character_classes.html" title="Character Class Names">character class names</a>. <a class="link" href="character_classes.html" title="Character Class Names">character class names</a>.
</p> </p>
<a name="boost_regex.syntax.basic_extended.collating_elements_"></a><h6> <a name="boost_regex.syntax.basic_extended.collating_elements_"></a><h6>
<a name="id660316"></a> <a name="id793161"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.collating_elements_">Collating <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.collating_elements_">Collating
Elements:</a> Elements:</a>
</h6> </h6>
@ -312,7 +312,7 @@ cab
matches a NUL character. matches a NUL character.
</p> </p>
<a name="boost_regex.syntax.basic_extended.equivalence_classes_"></a><h6> <a name="boost_regex.syntax.basic_extended.equivalence_classes_"></a><h6>
<a name="id660418"></a> <a name="id793263"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.equivalence_classes_">Equivalence <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.equivalence_classes_">Equivalence
classes:</a> classes:</a>
</h6> </h6>
@ -329,7 +329,7 @@ cab
or even all locales on one platform. or even all locales on one platform.
</p> </p>
<a name="boost_regex.syntax.basic_extended.combinations_"></a><h6> <a name="boost_regex.syntax.basic_extended.combinations_"></a><h6>
<a name="id660476"></a> <a name="id793320"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.combinations_">Combinations:</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.combinations_">Combinations:</a>
</h6> </h6>
<p> <p>
@ -337,7 +337,7 @@ cab
<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>. <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_extended.escapes"></a><h5> <a name="boost_regex.syntax.basic_extended.escapes"></a><h5>
<a name="id660529"></a> <a name="id793373"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes">Escapes</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes">Escapes</a>
</h5> </h5>
<p> <p>
@ -363,7 +363,7 @@ cab
extensions are also supported by Boost.Regex: extensions are also supported by Boost.Regex:
</p> </p>
<a name="boost_regex.syntax.basic_extended.escapes_matching_a_specific_character"></a><h6> <a name="boost_regex.syntax.basic_extended.escapes_matching_a_specific_character"></a><h6>
<a name="id660572"></a> <a name="id793416"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes_matching_a_specific_character">Escapes <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes_matching_a_specific_character">Escapes
matching a specific character</a> matching a specific character</a>
</h6> </h6>
@ -552,7 +552,7 @@ cab
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_"></a><h6> <a name="boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_"></a><h6>
<a name="id661216"></a> <a name="id793776"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_">"Single <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_">"Single
character" character classes:</a> character" character classes:</a>
</h6> </h6>
@ -706,7 +706,7 @@ cab
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.basic_extended.character_properties"></a><h6> <a name="boost_regex.syntax.basic_extended.character_properties"></a><h6>
<a name="id661704"></a> <a name="id794264"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_properties">Character <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_properties">Character
Properties</a> Properties</a>
</h6> </h6>
@ -813,7 +813,7 @@ cab
matches any "digit" character, as does <code class="computeroutput"><span class="special">\</span><span class="identifier">p</span><span class="special">{</span><span class="identifier">digit</span><span class="special">}</span></code>. matches any "digit" character, as does <code class="computeroutput"><span class="special">\</span><span class="identifier">p</span><span class="special">{</span><span class="identifier">digit</span><span class="special">}</span></code>.
</p> </p>
<a name="boost_regex.syntax.basic_extended.word_boundaries"></a><h6> <a name="boost_regex.syntax.basic_extended.word_boundaries"></a><h6>
<a name="id662011"></a> <a name="id794571"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.word_boundaries">Word Boundaries</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.word_boundaries">Word Boundaries</a>
</h6> </h6>
<p> <p>
@ -888,7 +888,7 @@ cab
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.basic_extended.buffer_boundaries"></a><h6> <a name="boost_regex.syntax.basic_extended.buffer_boundaries"></a><h6>
<a name="id662167"></a> <a name="id794727"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.buffer_boundaries">Buffer <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.buffer_boundaries">Buffer
boundaries</a> boundaries</a>
</h6> </h6>
@ -979,7 +979,7 @@ cab
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.basic_extended.continuation_escape"></a><h6> <a name="boost_regex.syntax.basic_extended.continuation_escape"></a><h6>
<a name="id662352"></a> <a name="id794912"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.continuation_escape">Continuation <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.continuation_escape">Continuation
Escape</a> Escape</a>
</h6> </h6>
@ -991,7 +991,7 @@ cab
match to start where the last one ended. match to start where the last one ended.
</p> </p>
<a name="boost_regex.syntax.basic_extended.quoting_escape"></a><h6> <a name="boost_regex.syntax.basic_extended.quoting_escape"></a><h6>
<a name="id662380"></a> <a name="id794940"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.quoting_escape">Quoting <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.quoting_escape">Quoting
escape</a> escape</a>
</h6> </h6>
@ -1005,7 +1005,7 @@ cab
<span class="special">\*+</span><span class="identifier">aaa</span> <span class="special">\*+</span><span class="identifier">aaa</span>
</pre> </pre>
<a name="boost_regex.syntax.basic_extended.unicode_escapes"></a><h6> <a name="boost_regex.syntax.basic_extended.unicode_escapes"></a><h6>
<a name="id662460"></a> <a name="id795020"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.unicode_escapes">Unicode <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.unicode_escapes">Unicode
escapes</a> escapes</a>
</h6> </h6>
@ -1056,7 +1056,7 @@ cab
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.basic_extended.any_other_escape"></a><h6> <a name="boost_regex.syntax.basic_extended.any_other_escape"></a><h6>
<a name="id662562"></a> <a name="id795122"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.any_other_escape">Any other <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.any_other_escape">Any other
escape</a> escape</a>
</h6> </h6>
@ -1065,7 +1065,7 @@ cab
\@ matches a literal '@'. \@ matches a literal '@'.
</p> </p>
<a name="boost_regex.syntax.basic_extended.operator_precedence"></a><h5> <a name="boost_regex.syntax.basic_extended.operator_precedence"></a><h5>
<a name="id662579"></a> <a name="id795139"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.operator_precedence">Operator <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.operator_precedence">Operator
precedence</a> precedence</a>
</h5> </h5>
@ -1101,7 +1101,7 @@ cab
</li> </li>
</ol></div> </ol></div>
<a name="boost_regex.syntax.basic_extended.what_gets_matched"></a><h5> <a name="boost_regex.syntax.basic_extended.what_gets_matched"></a><h5>
<a name="id662712"></a> <a name="id795272"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.what_gets_matched">What <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.what_gets_matched">What
Gets Matched</a> Gets Matched</a>
</h5> </h5>
@ -1111,11 +1111,11 @@ cab
rule</a>. rule</a>.
</p> </p>
<a name="boost_regex.syntax.basic_extended.variations"></a><h4> <a name="boost_regex.syntax.basic_extended.variations"></a><h4>
<a name="id662734"></a> <a name="id795294"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.variations">Variations</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.variations">Variations</a>
</h4> </h4>
<a name="boost_regex.syntax.basic_extended.egrep"></a><h5> <a name="boost_regex.syntax.basic_extended.egrep"></a><h5>
<a name="id662747"></a> <a name="id795307"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.egrep">Egrep</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.egrep">Egrep</a>
</h5> </h5>
<p> <p>
@ -1136,7 +1136,7 @@ cab
used with the -E option. used with the -E option.
</p> </p>
<a name="boost_regex.syntax.basic_extended.awk"></a><h5> <a name="boost_regex.syntax.basic_extended.awk"></a><h5>
<a name="id662849"></a> <a name="id795409"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.awk">awk</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.awk">awk</a>
</h5> </h5>
<p> <p>
@ -1150,7 +1150,7 @@ cab
these by default anyway. these by default anyway.
</p> </p>
<a name="boost_regex.syntax.basic_extended.options"></a><h4> <a name="boost_regex.syntax.basic_extended.options"></a><h4>
<a name="id662874"></a> <a name="id795434"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.options">Options</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.options">Options</a>
</h4> </h4>
<p> <p>
@ -1163,7 +1163,7 @@ cab
modify how the case and locale sensitivity are to be applied. modify how the case and locale sensitivity are to be applied.
</p> </p>
<a name="boost_regex.syntax.basic_extended.references"></a><h4> <a name="boost_regex.syntax.basic_extended.references"></a><h4>
<a name="id662952"></a> <a name="id795512"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.references">References</a> <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.references">References</a>
</h4> </h4>
<p> <p>

View File

@ -28,7 +28,7 @@
Expression Syntax</a> Expression Syntax</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.syntax.basic_syntax.synopsis"></a><h4> <a name="boost_regex.syntax.basic_syntax.synopsis"></a><h4>
<a name="id663001"></a> <a name="id795561"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.synopsis">Synopsis</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.synopsis">Synopsis</a>
</h4> </h4>
<p> <p>
@ -45,7 +45,7 @@
<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><h4> <a name="boost_regex.syntax.basic_syntax.posix_basic_syntax"></a><h4>
<a name="id664085"></a> <a name="id796525"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.posix_basic_syntax">POSIX <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.posix_basic_syntax">POSIX
Basic Syntax</a> Basic Syntax</a>
</h4> </h4>
@ -55,7 +55,7 @@
</p> </p>
<pre class="programlisting">.[\*^$</pre> <pre class="programlisting">.[\*^$</pre>
<a name="boost_regex.syntax.basic_syntax.wildcard_"></a><h5> <a name="boost_regex.syntax.basic_syntax.wildcard_"></a><h5>
<a name="id664106"></a> <a name="id796547"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.wildcard_">Wildcard:</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.wildcard_">Wildcard:</a>
</h5> </h5>
<p> <p>
@ -73,7 +73,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.syntax.basic_syntax.anchors_"></a><h5> <a name="boost_regex.syntax.basic_syntax.anchors_"></a><h5>
<a name="id664151"></a> <a name="id796591"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.anchors_">Anchors:</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.anchors_">Anchors:</a>
</h5> </h5>
<p> <p>
@ -85,7 +85,7 @@
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><h5> <a name="boost_regex.syntax.basic_syntax.marked_sub_expressions_"></a><h5>
<a name="id664171"></a> <a name="id796612"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.marked_sub_expressions_">Marked <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.marked_sub_expressions_">Marked
sub-expressions:</a> sub-expressions:</a>
</h5> </h5>
@ -97,7 +97,7 @@
by a back-reference. by a back-reference.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.repeats_"></a><h5> <a name="boost_regex.syntax.basic_syntax.repeats_"></a><h5>
<a name="id664202"></a> <a name="id796643"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.repeats_">Repeats:</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.repeats_">Repeats:</a>
</h5> </h5>
<p> <p>
@ -155,7 +155,7 @@ aaaa
to. to.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.back_references_"></a><h5> <a name="boost_regex.syntax.basic_syntax.back_references_"></a><h5>
<a name="id664367"></a> <a name="id796807"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.back_references_">Back references:</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.back_references_">Back references:</a>
</h5> </h5>
<p> <p>
@ -173,7 +173,7 @@ aaaa
</p> </p>
<pre class="programlisting">aaabba</pre> <pre class="programlisting">aaabba</pre>
<a name="boost_regex.syntax.basic_syntax.character_sets_"></a><h5> <a name="boost_regex.syntax.basic_syntax.character_sets_"></a><h5>
<a name="id664416"></a> <a name="id796857"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_sets_">Character <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_sets_">Character
sets:</a> sets:</a>
</h5> </h5>
@ -186,7 +186,7 @@ aaaa
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><h6> <a name="boost_regex.syntax.basic_syntax.single_characters_"></a><h6>
<a name="id664436"></a> <a name="id796877"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.single_characters_">Single <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.single_characters_">Single
characters:</a> characters:</a>
</h6> </h6>
@ -195,7 +195,7 @@ aaaa
or 'c'. or 'c'.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.character_ranges_"></a><h6> <a name="boost_regex.syntax.basic_syntax.character_ranges_"></a><h6>
<a name="id664468"></a> <a name="id796908"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_ranges_">Character <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_ranges_">Character
ranges:</a> ranges:</a>
</h6> </h6>
@ -211,7 +211,7 @@ aaaa
of the characters only. of the characters only.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.negation_"></a><h6> <a name="boost_regex.syntax.basic_syntax.negation_"></a><h6>
<a name="id664524"></a> <a name="id796965"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.negation_">Negation:</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.negation_">Negation:</a>
</h6> </h6>
<p> <p>
@ -220,7 +220,7 @@ aaaa
range a-c. range a-c.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.character_classes_"></a><h6> <a name="boost_regex.syntax.basic_syntax.character_classes_"></a><h6>
<a name="id664562"></a> <a name="id797003"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_classes_">Character <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_classes_">Character
classes:</a> classes:</a>
</h6> </h6>
@ -230,7 +230,7 @@ aaaa
<a class="link" href="character_classes.html" title="Character Class Names">character class names</a>. <a class="link" href="character_classes.html" title="Character Class Names">character class names</a>.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.collating_elements_"></a><h6> <a name="boost_regex.syntax.basic_syntax.collating_elements_"></a><h6>
<a name="id664614"></a> <a name="id797055"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.collating_elements_">Collating <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.collating_elements_">Collating
Elements:</a> Elements:</a>
</h6> </h6>
@ -259,7 +259,7 @@ aaaa
element names</a>. element names</a>.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.equivalence_classes_"></a><h6> <a name="boost_regex.syntax.basic_syntax.equivalence_classes_"></a><h6>
<a name="id664705"></a> <a name="id797146"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.equivalence_classes_">Equivalence <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.equivalence_classes_">Equivalence
classes:</a> classes:</a>
</h6> </h6>
@ -276,7 +276,7 @@ aaaa
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><h6> <a name="boost_regex.syntax.basic_syntax.combinations_"></a><h6>
<a name="id664763"></a> <a name="id797203"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.combinations_">Combinations:</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.combinations_">Combinations:</a>
</h6> </h6>
<p> <p>
@ -284,7 +284,7 @@ aaaa
<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> <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><h5> <a name="boost_regex.syntax.basic_syntax.escapes"></a><h5>
<a name="id664816"></a> <a name="id797256"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.escapes">Escapes</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.escapes">Escapes</a>
</h5> </h5>
<p> <p>
@ -299,7 +299,7 @@ aaaa
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><h4> <a name="boost_regex.syntax.basic_syntax.what_gets_matched"></a><h4>
<a name="id664849"></a> <a name="id797290"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.what_gets_matched">What Gets <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.what_gets_matched">What Gets
Matched</a> Matched</a>
</h4> </h4>
@ -309,13 +309,13 @@ aaaa
rule</a>. rule</a>.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.variations"></a><h4> <a name="boost_regex.syntax.basic_syntax.variations"></a><h4>
<a name="id664871"></a> <a name="id797311"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.variations">Variations</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.variations">Variations</a>
</h4> </h4>
<a name="boost_regex.grep_syntax"></a><p> <a name="boost_regex.grep_syntax"></a><p>
</p> </p>
<a name="boost_regex.syntax.basic_syntax.grep"></a><h5> <a name="boost_regex.syntax.basic_syntax.grep"></a><h5>
<a name="id664891"></a> <a name="id797332"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.grep">Grep</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.grep">Grep</a>
</h5> </h5>
<p> <p>
@ -333,7 +333,7 @@ aaaa
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><h5> <a name="boost_regex.syntax.basic_syntax.emacs"></a><h5>
<a name="id664986"></a> <a name="id797427"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.emacs">emacs</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.emacs">emacs</a>
</h5> </h5>
<p> <p>
@ -613,7 +613,7 @@ aaaa
leftmost-longest rule</a>. leftmost-longest rule</a>.
</p> </p>
<a name="boost_regex.syntax.basic_syntax.options"></a><h4> <a name="boost_regex.syntax.basic_syntax.options"></a><h4>
<a name="id665404"></a> <a name="id797844"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.options">Options</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.options">Options</a>
</h4> </h4>
<p> <p>
@ -627,7 +627,7 @@ aaaa
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><h4> <a name="boost_regex.syntax.basic_syntax.references"></a><h4>
<a name="id665510"></a> <a name="id797951"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.references">References</a> <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.references">References</a>
</h4> </h4>
<p> <p>

View File

@ -28,7 +28,7 @@
Syntax</a> Syntax</a>
</h3></div></div></div> </h3></div></div></div>
<a name="boost_regex.syntax.perl_syntax.synopsis"></a><h4> <a name="boost_regex.syntax.perl_syntax.synopsis"></a><h4>
<a name="id653383"></a> <a name="id786292"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.synopsis">Synopsis</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.synopsis">Synopsis</a>
</h4> </h4>
<p> <p>
@ -43,7 +43,7 @@
</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">perl</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">perl</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.syntax.perl_syntax.perl_regular_expression_syntax"></a><h4> <a name="boost_regex.syntax.perl_syntax.perl_regular_expression_syntax"></a><h4>
<a name="id653530"></a> <a name="id786440"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_regular_expression_syntax">Perl <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_regular_expression_syntax">Perl
Regular Expression Syntax</a> Regular Expression Syntax</a>
</h4> </h4>
@ -53,7 +53,7 @@
</p> </p>
<pre class="programlisting">.[{()\*+?|^$</pre> <pre class="programlisting">.[{()\*+?|^$</pre>
<a name="boost_regex.syntax.perl_syntax.wildcard"></a><h5> <a name="boost_regex.syntax.perl_syntax.wildcard"></a><h5>
<a name="id653554"></a> <a name="id786464"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.wildcard">Wildcard</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.wildcard">Wildcard</a>
</h5> </h5>
<p> <p>
@ -73,7 +73,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.syntax.perl_syntax.anchors"></a><h5> <a name="boost_regex.syntax.perl_syntax.anchors"></a><h5>
<a name="id653601"></a> <a name="id786511"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.anchors">Anchors</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.anchors">Anchors</a>
</h5> </h5>
<p> <p>
@ -83,7 +83,7 @@
A '$' character shall match the end of a line. A '$' character shall match the end of a line.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.marked_sub_expressions"></a><h5> <a name="boost_regex.syntax.perl_syntax.marked_sub_expressions"></a><h5>
<a name="id653623"></a> <a name="id786532"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.marked_sub_expressions">Marked <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.marked_sub_expressions">Marked
sub-expressions</a> sub-expressions</a>
</h5> </h5>
@ -94,7 +94,7 @@
can also repeated, or referred to by a back-reference. can also repeated, or referred to by a back-reference.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.non_marking_grouping"></a><h5> <a name="boost_regex.syntax.perl_syntax.non_marking_grouping"></a><h5>
<a name="id653649"></a> <a name="id786559"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_grouping">Non-marking <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_grouping">Non-marking
grouping</a> grouping</a>
</h5> </h5>
@ -107,7 +107,7 @@
without splitting out any separate sub-expressions. without splitting out any separate sub-expressions.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.repeats"></a><h5> <a name="boost_regex.syntax.perl_syntax.repeats"></a><h5>
<a name="id653685"></a> <a name="id786595"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.repeats">Repeats</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.repeats">Repeats</a>
</h5> </h5>
<p> <p>
@ -188,7 +188,7 @@
to be applied to. to be applied to.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.non_greedy_repeats"></a><h5> <a name="boost_regex.syntax.perl_syntax.non_greedy_repeats"></a><h5>
<a name="id653922"></a> <a name="id786831"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_greedy_repeats">Non greedy <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_greedy_repeats">Non greedy
repeats</a> repeats</a>
</h5> </h5>
@ -218,7 +218,7 @@
while consuming as little input as possible. while consuming as little input as possible.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.pocessive_repeats"></a><h5> <a name="boost_regex.syntax.perl_syntax.pocessive_repeats"></a><h5>
<a name="id653980"></a> <a name="id786890"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.pocessive_repeats">Pocessive <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.pocessive_repeats">Pocessive
repeats</a> repeats</a>
</h5> </h5>
@ -250,7 +250,7 @@
while giving nothing back. while giving nothing back.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.back_references"></a><h5> <a name="boost_regex.syntax.perl_syntax.back_references"></a><h5>
<a name="id654039"></a> <a name="id786949"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.back_references">Back references</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.back_references">Back references</a>
</h5> </h5>
<p> <p>
@ -360,7 +360,7 @@
named "two". named "two".
</p> </p>
<a name="boost_regex.syntax.perl_syntax.alternation"></a><h5> <a name="boost_regex.syntax.perl_syntax.alternation"></a><h5>
<a name="id654259"></a> <a name="id787168"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.alternation">Alternation</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.alternation">Alternation</a>
</h5> </h5>
<p> <p>
@ -387,7 +387,7 @@
<code class="literal">(?:abc)??</code> has exactly the same effect. <code class="literal">(?:abc)??</code> has exactly the same effect.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.character_sets"></a><h5> <a name="boost_regex.syntax.perl_syntax.character_sets"></a><h5>
<a name="id654327"></a> <a name="id787237"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_sets">Character sets</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_sets">Character sets</a>
</h5> </h5>
<p> <p>
@ -399,7 +399,7 @@
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.perl_syntax.single_characters"></a><h6> <a name="boost_regex.syntax.perl_syntax.single_characters"></a><h6>
<a name="id654632"></a> <a name="id787610"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.single_characters">Single characters</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.single_characters">Single characters</a>
</h6> </h6>
<p> <p>
@ -407,7 +407,7 @@
'b', or 'c'. 'b', or 'c'.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.character_ranges"></a><h6> <a name="boost_regex.syntax.perl_syntax.character_ranges"></a><h6>
<a name="id654654"></a> <a name="id787632"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_ranges">Character <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_ranges">Character
ranges</a> ranges</a>
</h6> </h6>
@ -421,7 +421,7 @@
sensitive. sensitive.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.negation"></a><h6> <a name="boost_regex.syntax.perl_syntax.negation"></a><h6>
<a name="id654686"></a> <a name="id787664"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.negation">Negation</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.negation">Negation</a>
</h6> </h6>
<p> <p>
@ -430,7 +430,7 @@
matches any character that is not in the range <code class="literal">a-c</code>. matches any character that is not in the range <code class="literal">a-c</code>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.character_classes"></a><h6> <a name="boost_regex.syntax.perl_syntax.character_classes"></a><h6>
<a name="id654714"></a> <a name="id787692"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_classes">Character <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_classes">Character
classes</a> classes</a>
</h6> </h6>
@ -441,7 +441,7 @@
class names</a>. class names</a>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.collating_elements"></a><h6> <a name="boost_regex.syntax.perl_syntax.collating_elements"></a><h6>
<a name="id654746"></a> <a name="id787724"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.collating_elements">Collating <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.collating_elements">Collating
Elements</a> Elements</a>
</h6> </h6>
@ -463,7 +463,7 @@
matches a <code class="literal">\0</code> character. matches a <code class="literal">\0</code> character.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.equivalence_classes"></a><h6> <a name="boost_regex.syntax.perl_syntax.equivalence_classes"></a><h6>
<a name="id654808"></a> <a name="id787786"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.equivalence_classes">Equivalence <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.equivalence_classes">Equivalence
classes</a> classes</a>
</h6> </h6>
@ -480,7 +480,7 @@
or even all locales on one platform. or even all locales on one platform.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.escaped_characters"></a><h6> <a name="boost_regex.syntax.perl_syntax.escaped_characters"></a><h6>
<a name="id654856"></a> <a name="id787834"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escaped_characters">Escaped <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escaped_characters">Escaped
Characters</a> Characters</a>
</h6> </h6>
@ -492,7 +492,7 @@
is <span class="emphasis"><em>not</em></span> a "word" character. is <span class="emphasis"><em>not</em></span> a "word" character.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.combinations"></a><h6> <a name="boost_regex.syntax.perl_syntax.combinations"></a><h6>
<a name="id654925"></a> <a name="id787903"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.combinations">Combinations</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.combinations">Combinations</a>
</h6> </h6>
<p> <p>
@ -500,7 +500,7 @@
<code class="literal">[[:digit:]a-c[.NUL.]]</code>. <code class="literal">[[:digit:]a-c[.NUL.]]</code>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.escapes"></a><h5> <a name="boost_regex.syntax.perl_syntax.escapes"></a><h5>
<a name="id654946"></a> <a name="id787924"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escapes">Escapes</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escapes">Escapes</a>
</h5> </h5>
<p> <p>
@ -692,7 +692,7 @@
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_"></a><h6> <a name="boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_"></a><h6>
<a name="id655334"></a> <a name="id788312"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_">"Single <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_">"Single
character" character classes:</a> character" character classes:</a>
</h6> </h6>
@ -894,7 +894,7 @@
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.perl_syntax.character_properties"></a><h6> <a name="boost_regex.syntax.perl_syntax.character_properties"></a><h6>
<a name="id655934"></a> <a name="id788912"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_properties">Character <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_properties">Character
Properties</a> Properties</a>
</h6> </h6>
@ -1002,7 +1002,7 @@
as does <code class="literal">\p{digit}</code>. as does <code class="literal">\p{digit}</code>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.word_boundaries"></a><h6> <a name="boost_regex.syntax.perl_syntax.word_boundaries"></a><h6>
<a name="id656223"></a> <a name="id789201"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.word_boundaries">Word Boundaries</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.word_boundaries">Word Boundaries</a>
</h6> </h6>
<p> <p>
@ -1021,7 +1021,7 @@
<code class="literal">\B</code> Matches only when not at a word boundary. <code class="literal">\B</code> Matches only when not at a word boundary.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.buffer_boundaries"></a><h6> <a name="boost_regex.syntax.perl_syntax.buffer_boundaries"></a><h6>
<a name="id656275"></a> <a name="id789253"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.buffer_boundaries">Buffer boundaries</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.buffer_boundaries">Buffer boundaries</a>
</h6> </h6>
<p> <p>
@ -1046,7 +1046,7 @@
to the regular expression <code class="literal">\n*\z</code> to the regular expression <code class="literal">\n*\z</code>
</p> </p>
<a name="boost_regex.syntax.perl_syntax.continuation_escape"></a><h6> <a name="boost_regex.syntax.perl_syntax.continuation_escape"></a><h6>
<a name="id656316"></a> <a name="id789294"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.continuation_escape">Continuation <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.continuation_escape">Continuation
Escape</a> Escape</a>
</h6> </h6>
@ -1058,7 +1058,7 @@
one ended. one ended.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.quoting_escape"></a><h6> <a name="boost_regex.syntax.perl_syntax.quoting_escape"></a><h6>
<a name="id656337"></a> <a name="id789315"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.quoting_escape">Quoting escape</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.quoting_escape">Quoting escape</a>
</h6> </h6>
<p> <p>
@ -1071,7 +1071,7 @@
<span class="special">\*+</span><span class="identifier">aaa</span> <span class="special">\*+</span><span class="identifier">aaa</span>
</pre> </pre>
<a name="boost_regex.syntax.perl_syntax.unicode_escapes"></a><h6> <a name="boost_regex.syntax.perl_syntax.unicode_escapes"></a><h6>
<a name="id656384"></a> <a name="id789362"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.unicode_escapes">Unicode escapes</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.unicode_escapes">Unicode escapes</a>
</h6> </h6>
<p> <p>
@ -1081,7 +1081,7 @@
followed by a sequence of zero or more combining characters. followed by a sequence of zero or more combining characters.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.matching_line_endings"></a><h6> <a name="boost_regex.syntax.perl_syntax.matching_line_endings"></a><h6>
<a name="id656410"></a> <a name="id789388"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.matching_line_endings">Matching <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.matching_line_endings">Matching
Line Endings</a> Line Endings</a>
</h6> </h6>
@ -1090,7 +1090,7 @@
sequence, specifically it is identical to the expression <code class="literal">(?&gt;\x0D\x0A?|[\x0A-\x0C\x85\x{2028}\x{2029}])</code>. sequence, specifically it is identical to the expression <code class="literal">(?&gt;\x0D\x0A?|[\x0A-\x0C\x85\x{2028}\x{2029}])</code>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.keeping_back_some_text"></a><h6> <a name="boost_regex.syntax.perl_syntax.keeping_back_some_text"></a><h6>
<a name="id656437"></a> <a name="id789415"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.keeping_back_some_text">Keeping <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.keeping_back_some_text">Keeping
back some text</a> back some text</a>
</h6> </h6>
@ -1105,7 +1105,7 @@
This can be used to simulate variable width lookbehind assertions. This can be used to simulate variable width lookbehind assertions.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.any_other_escape"></a><h6> <a name="boost_regex.syntax.perl_syntax.any_other_escape"></a><h6>
<a name="id656467"></a> <a name="id789445"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.any_other_escape">Any other <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.any_other_escape">Any other
escape</a> escape</a>
</h6> </h6>
@ -1114,7 +1114,7 @@
\@ matches a literal '@'. \@ matches a literal '@'.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.perl_extended_patterns"></a><h5> <a name="boost_regex.syntax.perl_syntax.perl_extended_patterns"></a><h5>
<a name="id656484"></a> <a name="id789462"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_extended_patterns">Perl <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_extended_patterns">Perl
Extended Patterns</a> Extended Patterns</a>
</h5> </h5>
@ -1123,7 +1123,7 @@
<code class="literal">(?</code>. <code class="literal">(?</code>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.named_subexpressions"></a><h6> <a name="boost_regex.syntax.perl_syntax.named_subexpressions"></a><h6>
<a name="id656505"></a> <a name="id789483"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.named_subexpressions">Named <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.named_subexpressions">Named
Subexpressions</a> Subexpressions</a>
</h6> </h6>
@ -1145,14 +1145,14 @@
format string for search and replace operations, or in the <a class="link" href="../ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> member functions. format string for search and replace operations, or in the <a class="link" href="../ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> member functions.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.comments"></a><h6> <a name="boost_regex.syntax.perl_syntax.comments"></a><h6>
<a name="id656600"></a> <a name="id789578"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.comments">Comments</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.comments">Comments</a>
</h6> </h6>
<p> <p>
<code class="literal">(?# ... )</code> is treated as a comment, it's contents are ignored. <code class="literal">(?# ... )</code> is treated as a comment, it's contents are ignored.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.modifiers"></a><h6> <a name="boost_regex.syntax.perl_syntax.modifiers"></a><h6>
<a name="id656623"></a> <a name="id789601"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.modifiers">Modifiers</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.modifiers">Modifiers</a>
</h6> </h6>
<p> <p>
@ -1166,7 +1166,7 @@
pattern only. pattern only.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.non_marking_groups"></a><h6> <a name="boost_regex.syntax.perl_syntax.non_marking_groups"></a><h6>
<a name="id656658"></a> <a name="id789636"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_groups">Non-marking <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_groups">Non-marking
groups</a> groups</a>
</h6> </h6>
@ -1175,7 +1175,7 @@
an additional sub-expression. an additional sub-expression.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.branch_reset"></a><h6> <a name="boost_regex.syntax.perl_syntax.branch_reset"></a><h6>
<a name="id656679"></a> <a name="id789657"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.branch_reset">Branch reset</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.branch_reset">Branch reset</a>
</h6> </h6>
<p> <p>
@ -1197,7 +1197,7 @@
# 1 2 2 3 2 3 4 # 1 2 2 3 2 3 4
</pre> </pre>
<a name="boost_regex.syntax.perl_syntax.lookahead"></a><h6> <a name="boost_regex.syntax.perl_syntax.lookahead"></a><h6>
<a name="id656716"></a> <a name="id789694"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookahead">Lookahead</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookahead">Lookahead</a>
</h6> </h6>
<p> <p>
@ -1220,7 +1220,7 @@
could be used to validate the password. could be used to validate the password.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.lookbehind"></a><h6> <a name="boost_regex.syntax.perl_syntax.lookbehind"></a><h6>
<a name="id656791"></a> <a name="id789769"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookbehind">Lookbehind</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookbehind">Lookbehind</a>
</h6> </h6>
<p> <p>
@ -1234,7 +1234,7 @@
(pattern must be of fixed length). (pattern must be of fixed length).
</p> </p>
<a name="boost_regex.syntax.perl_syntax.independent_sub_expressions"></a><h6> <a name="boost_regex.syntax.perl_syntax.independent_sub_expressions"></a><h6>
<a name="id658462"></a> <a name="id791307"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.independent_sub_expressions">Independent <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.independent_sub_expressions">Independent
sub-expressions</a> sub-expressions</a>
</h6> </h6>
@ -1247,7 +1247,7 @@
no match is found at all. no match is found at all.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.recursive_expressions"></a><h6> <a name="boost_regex.syntax.perl_syntax.recursive_expressions"></a><h6>
<a name="id658493"></a> <a name="id791338"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.recursive_expressions">Recursive <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.recursive_expressions">Recursive
Expressions</a> Expressions</a>
</h6> </h6>
@ -1271,7 +1271,7 @@
to the next sub-expression to be declared. to the next sub-expression to be declared.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.conditional_expressions"></a><h6> <a name="boost_regex.syntax.perl_syntax.conditional_expressions"></a><h6>
<a name="id658591"></a> <a name="id791435"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.conditional_expressions">Conditional <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.conditional_expressions">Conditional
Expressions</a> Expressions</a>
</h6> </h6>
@ -1319,7 +1319,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.syntax.perl_syntax.operator_precedence"></a><h5> <a name="boost_regex.syntax.perl_syntax.operator_precedence"></a><h5>
<a name="id658732"></a> <a name="id791577"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.operator_precedence">Operator <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.operator_precedence">Operator
precedence</a> precedence</a>
</h5> </h5>
@ -1354,7 +1354,7 @@
</li> </li>
</ol></div> </ol></div>
<a name="boost_regex.syntax.perl_syntax.what_gets_matched"></a><h4> <a name="boost_regex.syntax.perl_syntax.what_gets_matched"></a><h4>
<a name="id658822"></a> <a name="id791667"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">What gets <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">What gets
matched</a> matched</a>
</h4> </h4>
@ -1529,7 +1529,7 @@
</tbody> </tbody>
</table></div> </table></div>
<a name="boost_regex.syntax.perl_syntax.variations"></a><h4> <a name="boost_regex.syntax.perl_syntax.variations"></a><h4>
<a name="id659180"></a> <a name="id792024"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.variations">Variations</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.variations">Variations</a>
</h4> </h4>
<p> <p>
@ -1538,7 +1538,7 @@
and <code class="literal">JScript</code></a> are all synonyms for <code class="literal">perl</code>. and <code class="literal">JScript</code></a> are all synonyms for <code class="literal">perl</code>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.options"></a><h4> <a name="boost_regex.syntax.perl_syntax.options"></a><h4>
<a name="id659227"></a> <a name="id792071"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.options">Options</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.options">Options</a>
</h4> </h4>
<p> <p>
@ -1550,7 +1550,7 @@
are to be applied. are to be applied.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.pattern_modifiers"></a><h4> <a name="boost_regex.syntax.perl_syntax.pattern_modifiers"></a><h4>
<a name="id659275"></a> <a name="id792119"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.pattern_modifiers">Pattern <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.pattern_modifiers">Pattern
Modifiers</a> Modifiers</a>
</h4> </h4>
@ -1562,7 +1562,7 @@
and <code class="literal">no_mod_s</code></a>. and <code class="literal">no_mod_s</code></a>.
</p> </p>
<a name="boost_regex.syntax.perl_syntax.references"></a><h4> <a name="boost_regex.syntax.perl_syntax.references"></a><h4>
<a name="id659327"></a> <a name="id792172"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.references">References</a> <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.references">References</a>
</h4> </h4>
<p> <p>

View File

@ -30,7 +30,7 @@
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><h5> <a name="boost_regex.unicode.rely_on_wchar_t"></a><h5>
<a name="id648171"></a> <a name="id780738"></a>
<a class="link" href="unicode.html#boost_regex.unicode.rely_on_wchar_t">Rely on wchar_t</a> <a class="link" href="unicode.html#boost_regex.unicode.rely_on_wchar_t">Rely on wchar_t</a>
</h5> </h5>
<p> <p>
@ -56,7 +56,7 @@
</li> </li>
</ul></div> </ul></div>
<a name="boost_regex.unicode.use_a_unicode_aware_regular_expression_type_"></a><h5> <a name="boost_regex.unicode.use_a_unicode_aware_regular_expression_type_"></a><h5>
<a name="id648289"></a> <a name="id780856"></a>
<a class="link" href="unicode.html#boost_regex.unicode.use_a_unicode_aware_regular_expression_type_">Use <a class="link" 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>
</h5> </h5>

View File

@ -28,7 +28,7 @@
</h3></div></div></div> </h3></div></div></div>
<div><p class="copyright">Copyright <20> 1998 -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="id637869"></a><p> <a name="id770427"></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>
@ -196,7 +196,7 @@
</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: July 29, 2009 at 15:59:46 GMT</small></p></td> <td align="left"><p><small>Last revised: October 30, 2009 at 17:13:44 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td> <td align="right"><div class="copyright-footer"></div></td>
</tr></table> </tr></table>
<hr> <hr>

View File

@ -105,11 +105,12 @@ Class template `match_results` is most commonly used as one of the typedefs
const_iterator ``[link boost_regex.match_results.begin begin]``() const; const_iterator ``[link boost_regex.match_results.begin begin]``() const;
const_iterator ``[link boost_regex.match_results.end end]``() const; const_iterator ``[link boost_regex.match_results.end end]``() const;
// format: // format:
template <class OutputIterator> template <class OutputIterator, class Formatter>
OutputIterator ``[link boost_regex.match_results.format format]``(OutputIterator out, OutputIterator ``[link boost_regex.match_results.format format]``(OutputIterator out,
const string_type& fmt, Formatter fmt,
match_flag_type flags = format_default) const; match_flag_type flags = format_default) const;
string_type ``[link boost_regex.match_results.format2 format]``(const string_type& fmt, template <class Formatter>
string_type ``[link boost_regex.match_results.format2 format]``(Formatter fmt,
match_flag_type flags = format_default) const; match_flag_type flags = format_default) const;
allocator_type ``[link boost_regex.match_results.get_allocator get_allocator]``() const; allocator_type ``[link boost_regex.match_results.get_allocator get_allocator]``() const;
@ -352,15 +353,25 @@ marked sub-expression matches stored in *this.
[#boost_regex.match_results_format] [#boost_regex.match_results_format]
[#boost_regex.match_results.format] [#boost_regex.match_results.format]
template <class OutputIterator> template <class OutputIterator, class Formatter>
OutputIterator format(OutputIterator out, OutputIterator format(OutputIterator out,
const string_type& fmt, Formatter fmt,
match_flag_type flags = format_default); match_flag_type flags = format_default);
[*Requires]: The type `OutputIterator` conforms to the Output Iterator requirements [*Requires]: The type `OutputIterator` conforms to the Output Iterator requirements
(C++ std 24.1.2). (C++ std 24.1.2).
[*Effects]: Copies the character sequence `[fmt.begin(), fmt.end())` to The type `Formatter` must be either a pointer to a null-terminated string
of type `char_type[]`, or be a container of `char_type`'s (for example
`std::basic_string<char_type>`) or be a unary, binary or ternary functor
that computes the replacement string from a function call: either
`fmt(*this)` which must return a container of `char_type`'s to be used as the
replacement text, or either `fmt(*this, out)` or `fmt(*this, out, flags)`, both of
which write the replacement text to `*out`, and then return the new
OutputIterator position.
[*Effects]: If `fmt` is either a null-terminated string, or a
container of `char_type`'s, then copies the character sequence `[fmt.begin(), fmt.end())` to
`OutputIterator` /out/. For each format specifier or escape sequence in `OutputIterator` /out/. For each format specifier or escape sequence in
/fmt/, replace that sequence with either the character(s) it represents, /fmt/, replace that sequence with either the character(s) it represents,
or the sequence of characters within `*this` to which it refers. or the sequence of characters within `*this` to which it refers.
@ -369,6 +380,16 @@ escape sequences are recognized, by default this is the format used by
ECMA-262, ECMAScript Language Specification, Chapter 15 part ECMA-262, ECMAScript Language Specification, Chapter 15 part
5.4.11 String.prototype.replace. 5.4.11 String.prototype.replace.
If `fmt` is a function object, then depending on the number of arguments
the function object accepts, it will either:
* Call `fmt(*this)` and copy the result to `OutputIterator`
/out/.
* Call `fmt(*this, out)`.
* Call `fmt(*this, out, flags)`.
In all cases the new position of the `OutputIterator` is returned.
See the [link boost_regex.format format syntax guide for more information]. See the [link boost_regex.format format syntax guide for more information].
[*Returns]: out. [*Returns]: out.
@ -376,10 +397,23 @@ See the [link boost_regex.format format syntax guide for more information].
[#boost_regex.match_results.format2] [#boost_regex.match_results.format2]
string_type format(const string_type& fmt, template <class Formatter>
match_flag_type flags = format_default); string_type format(Formatter fmt,
match_flag_type flags = format_default);
[*Effects]: Returns a copy of the string /fmt/. For each format specifier or [*Requires]
The type `Formatter` must be either a pointer to a null-terminated string
of type `char_type[]`, or be a container of `char_type`'s (for example
`std::basic_string<char_type>`) or be a unary, binary or ternary functor
that computes the replacement string from a function call: either
`fmt(*this)` which must return a container of `char_type`'s to be used as the
replacement text, or either `fmt(*this, out)` or `fmt(*this, out, flags)`, both of
which write the replacement text to `*out`, and then return the new
OutputIterator position.
[*Effects]:
If `fmt` is either a null-terminated string, or a
container of `char_type`'s, then copies the string /fmt/: For each format specifier or
escape sequence in /fmt/, replace that sequence with either the escape sequence in /fmt/, replace that sequence with either the
character(s) it represents, or the sequence of characters within `*this` to character(s) it represents, or the sequence of characters within `*this` to
which it refers. The bitmasks specified in flags determines what format which it refers. The bitmasks specified in flags determines what format
@ -387,6 +421,15 @@ specifiers or escape sequences are recognized, by default this is the format
used by ECMA-262, ECMAScript Language Specification, Chapter 15 part used by ECMA-262, ECMAScript Language Specification, Chapter 15 part
5.4.11 String.prototype.replace. 5.4.11 String.prototype.replace.
If `fmt` is a function object, then depending on the number of arguments
the function object accepts, it will either:
* Call `fmt(*this)` and return the result.
* Call `fmt(*this, unspecified-output-iterator)`, where `unspecified-output-iterator`
is an unspecified OutputIterator type used to copy the output to the string result.
* Call `fmt(*this, unspecified-output-iterator, flags)`, where `unspecified-output-iterator`
is an unspecified OutputIterator type used to copy the output to the string result.
See the [link boost_regex.format format syntax guide for more information]. See the [link boost_regex.format format syntax guide for more information].
[#boost_regex.match_results.get_allocator] [#boost_regex.match_results.get_allocator]

View File

@ -21,15 +21,10 @@ The algorithm `regex_format` takes the results of a match and creates a
new string based upon a format string, `regex_format` can be used for new string based upon a format string, `regex_format` can be used for
search and replace operations: search and replace operations:
template <class OutputIterator, class iterator, class Allocator, class charT> template <class OutputIterator, class iterator, class Allocator, class Formatter>
OutputIterator regex_format(OutputIterator out, OutputIterator regex_format(OutputIterator out,
const match_results<iterator, Allocator>& m, const match_results<iterator, Allocator>& m,
const charT* fmt, Formatter fmt,
match_flag_type flags = 0);
template <class OutputIterator, class iterator, class Allocator, class charT>
OutputIterator regex_format(OutputIterator out,
const match_results<iterator, Allocator>& m,
const std::basic_string<charT>& fmt,
match_flag_type flags = 0); match_flag_type flags = 0);
The library also defines the following convenience variation of The library also defines the following convenience variation of
@ -39,16 +34,10 @@ than outputting to an iterator.
[note This version may not be available, or may be available in a more limited [note 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]
template <class iterator, class Allocator, class charT> template <class iterator, class Allocator, class Formatter>
std::basic_string<charT> regex_format std::basic_string<charT> regex_format
(const match_results<iterator, Allocator>& m, (const match_results<iterator, Allocator>& m,
const charT* fmt, Formatter fmt,
match_flag_type flags = 0);
template <class iterator, class Allocator, class charT>
std::basic_string<charT> regex_format
(const match_results<iterator, Allocator>& m,
const std::basic_string<charT>& fmt,
match_flag_type flags = 0); match_flag_type flags = 0);
Parameters to the main version of the function are passed as follows: Parameters to the main version of the function are passed as follows:
@ -57,7 +46,7 @@ Parameters to the main version of the function are passed as follows:
[[Parameter][Description]] [[Parameter][Description]]
[[`OutputIterator out`][An output iterator type, the output string is sent to this iterator. Typically this would be a std::ostream_iterator. ]] [[`OutputIterator out`][An output iterator type, the output string is sent to this iterator. Typically this would be a std::ostream_iterator. ]]
[[`const match_results<iterator, Allocator>& m`][An instance of [match_results] obtained from one of the matching algorithms above, and denoting what matched. ]] [[`const match_results<iterator, Allocator>& m`][An instance of [match_results] obtained from one of the matching algorithms above, and denoting what matched. ]]
[[`const charT* fmt`][A format string that determines how the match is transformed into the new string. ]] [[`Formatter fmt`][Either a format string that determines how the match is transformed into the new string, or a functor that computes the new string from /m/ - see [match_results_format]. ]]
[[`unsigned flags`][Optional flags which describe how the format string is to be interpreted. ]] [[`unsigned flags`][Optional flags which describe how the format string is to be interpreted. ]]
] ]

View File

@ -18,34 +18,37 @@ output unchanged only if the /flags/ parameter does not have the
flag `format_no_copy` set. If the flag `format_first_only` is set then flag `format_no_copy` set. If the flag `format_first_only` is set then
only the first occurrence is replaced rather than all occurrences. only the first occurrence is replaced rather than all occurrences.
template <class OutputIterator, class BidirectionalIterator, class traits, class charT> template <class OutputIterator, class BidirectionalIterator, class traits, class Formatter>
OutputIterator regex_replace(OutputIterator out, OutputIterator regex_replace(OutputIterator out,
BidirectionalIterator first, BidirectionalIterator first,
BidirectionalIterator last, BidirectionalIterator last,
const basic_regex<charT, traits>& e, const basic_regex<charT, traits>& e,
const basic_string<charT>& fmt, Formatter fmt,
match_flag_type flags = match_default); match_flag_type flags = match_default);
template <class traits, class charT> template <class traits, class Formatter>
basic_string<charT> regex_replace(const basic_string<charT>& s, basic_string<charT> regex_replace(const basic_string<charT>& s,
const basic_regex<charT, traits>& e, const basic_regex<charT, traits>& e,
const basic_string<charT>& fmt, Formatter fmt,
match_flag_type flags = match_default); match_flag_type flags = match_default);
[h4 Description] [h4 Description]
template <class OutputIterator, class BidirectionalIterator, class traits, class charT> template <class OutputIterator, class BidirectionalIterator, class traits, class Formatter>
OutputIterator regex_replace(OutputIterator out, OutputIterator regex_replace(OutputIterator out,
BidirectionalIterator first, BidirectionalIterator first,
BidirectionalIterator last, BidirectionalIterator last,
const basic_regex<charT, traits>& e, const basic_regex<charT, traits>& e,
const basic_string<charT>& fmt, Formatter fmt,
match_flag_type flags = match_default); match_flag_type flags = match_default);
Enumerates all the occurences of expression /e/ in the sequence \[first, last), Enumerates all the occurences of expression /e/ in the sequence \[first, last),
replacing each occurence with the string that results by merging the replacing each occurence with the string that results by merging the
match found with the format string /fmt/, and copies the resulting string to /out/. match found with the format string /fmt/, and copies the resulting string to /out/.
In the case that /fmt/ is a unary, binary or ternary function object, then the
character sequence generated by that object is copied unchanged to the output when performing
a substitution.
If the flag `format_no_copy` is set in /flags/ then unmatched sections of If the flag `format_no_copy` is set in /flags/ then unmatched sections of
text are not copied to output. text are not copied to output.
@ -57,6 +60,17 @@ The manner in which the format string /fmt/ is interpretted, along with the
rules used for finding matches, are determined by the flags set in /flags/: rules used for finding matches, are determined by the flags set in /flags/:
see [match_flag_type]. see [match_flag_type].
[*Requires]
The type `Formatter` must be either a pointer to a null-terminated string
of type `char_type[]`, or be a container of `char_type`'s (for example
`std::basic_string<char_type>`) or be a unary, binary or ternary functor
that computes the replacement string from a function call: either
`fmt(what)` which must return a container of `char_type`'s to be used as the
replacement text, or either `fmt(what, out)` or `fmt(what, out, flags)`, both of
which write the replacement text to `*out`, and then return the new
OutputIterator position. In each case `what` is the [match_results] object
that represents the match found.
[*Effects]: Constructs an [regex_iterator] object: [*Effects]: Constructs an [regex_iterator] object:
regex_iterator<BidirectionalIterator, charT, traits, Allocator> regex_iterator<BidirectionalIterator, charT, traits, Allocator>
@ -107,12 +121,23 @@ memory allocation (if Boost.Regex is configured in non-recursive mode).
[*Returns]: out. [*Returns]: out.
template <class traits, class charT> template <class traits, class Formatter>
basic_string<charT> regex_replace(const basic_string<charT>& s, basic_string<charT> regex_replace(const basic_string<charT>& s,
const basic_regex<charT, traits>& e, const basic_regex<charT, traits>& e,
const basic_string<charT>& fmt, Formatter fmt,
match_flag_type flags = match_default); match_flag_type flags = match_default);
[*Requires]
The type `Formatter` must be either a pointer to a null-terminated string
of type `char_type[]`, or be a container of `char_type`'s (for example
`std::basic_string<char_type>`) or be a unary, binary or ternary functor
that computes the replacement string from a function call: either
`fmt(what)` which must return a container of `char_type`'s to be used as the
replacement text, or either `fmt(what, out)` or `fmt(what, out, flags)`, both of
which write the replacement text to `*out`, and then return the new
OutputIterator position. In each case `what` is the [match_results] object
that represents the match found.
[*Effects]: Constructs an object `basic_string<charT> result`, calls [*Effects]: Constructs an object `basic_string<charT> result`, calls
`regex_replace(back_inserter(result), s.begin(), s.end(), e, fmt, flags)`, `regex_replace(back_inserter(result), s.begin(), s.end(), e, fmt, flags)`,
and then returns `result`. and then returns `result`.

View File

@ -747,6 +747,46 @@ struct RegexConcept
}; };
#ifndef BOOST_REGEX_TEST_STD #ifndef BOOST_REGEX_TEST_STD
template <class M>
struct functor1
{
typedef typename M::char_type char_type;
const char_type* operator()(const M& m)
{
static const char_type c = static_cast<char_type>(0);
return &c;
}
};
template <class M>
struct functor1b
{
typedef typename M::char_type char_type;
std::vector<char_type> operator()(const M& m)
{
static const std::vector<char_type> c;
return c;
}
};
template <class M>
struct functor2
{
template <class O>
O operator()(const M& /*m*/, O i)
{
return i;
}
};
template <class M>
struct functor3
{
template <class O>
O operator()(const M& /*m*/, O i, regex_constants::match_flag_type)
{
return i;
}
};
// //
// BoostRegexConcept: // BoostRegexConcept:
// Test every interface in the Boost implementation: // Test every interface in the Boost implementation:
@ -764,6 +804,7 @@ struct BoostRegexConcept
typedef std::basic_string<value_type> string_type; typedef std::basic_string<value_type> string_type;
typedef typename Regex::const_iterator const_iterator; typedef typename Regex::const_iterator const_iterator;
typedef bidirectional_iterator_archetype<value_type> BidiIterator; typedef bidirectional_iterator_archetype<value_type> BidiIterator;
typedef output_iterator_archetype<value_type> OutputIterator;
typedef global_regex_namespace::sub_match<BidiIterator> sub_match_type; typedef global_regex_namespace::sub_match<BidiIterator> sub_match_type;
typedef global_regex_namespace::match_results<BidiIterator> match_results_type; typedef global_regex_namespace::match_results<BidiIterator> match_results_type;
@ -884,6 +925,58 @@ struct BoostRegexConcept
m_stream << m_sub; m_stream << m_sub;
m_stream << m_cresults; m_stream << m_cresults;
#endif #endif
//
// Extended formatting with a functor:
//
regex_constants::match_flag_type f = regex_constants::match_default;
OutputIterator out = static_object<OutputIterator>::get();
functor3<match_results_type> func3;
out = regex_format(out, m_cresults, func3, f);
out = regex_format(out, m_cresults, func3);
functor2<match_results_type> func2;
out = regex_format(out, m_cresults, func2, f);
out = regex_format(out, m_cresults, func2);
functor1<match_results_type> func1;
out = regex_format(out, m_cresults, func1, f);
out = regex_format(out, m_cresults, func1);
m_string += regex_format(m_cresults, func3, f);
m_string += regex_format(m_cresults, func3);
m_string += regex_format(m_cresults, func2, f);
m_string += regex_format(m_cresults, func2);
m_string += regex_format(m_cresults, func1, f);
m_string += regex_format(m_cresults, func1);
out = m_cresults.format(out, func3, f);
out = m_cresults.format(out, func3);
out = m_cresults.format(out, func2, f);
out = m_cresults.format(out, func2);
out = m_cresults.format(out, func1, f);
out = m_cresults.format(out, func1);
m_string += m_cresults.format(func3, f);
m_string += m_cresults.format(func3);
m_string += m_cresults.format(func2, f);
m_string += m_cresults.format(func2);
m_string += m_cresults.format(func1, f);
m_string += m_cresults.format(func1);
out = regex_replace(out, m_in, m_in, ce, func3, f);
out = regex_replace(out, m_in, m_in, ce, func3);
out = regex_replace(out, m_in, m_in, ce, func2, f);
out = regex_replace(out, m_in, m_in, ce, func2);
out = regex_replace(out, m_in, m_in, ce, func1, f);
out = regex_replace(out, m_in, m_in, ce, func1);
functor3<match_results<typename string_type::const_iterator> > func3s;
functor2<match_results<typename string_type::const_iterator> > func2s;
functor1<match_results<typename string_type::const_iterator> > func1s;
m_string += regex_replace(m_string, ce, func3s, f);
m_string += regex_replace(m_string, ce, func3s);
m_string += regex_replace(m_string, ce, func2s, f);
m_string += regex_replace(m_string, ce, func2s);
m_string += regex_replace(m_string, ce, func1s, f);
m_string += regex_replace(m_string, ce, func1s);
} }
std::basic_ostream<value_type> m_stream; std::basic_ostream<value_type> m_stream;
@ -893,6 +986,7 @@ struct BoostRegexConcept
const value_type m_char; const value_type m_char;
match_results_type m_results; match_results_type m_results;
const match_results_type m_cresults; const match_results_type m_cresults;
BidiIterator m_in;
BoostRegexConcept(); BoostRegexConcept();
BoostRegexConcept(const BoostRegexConcept&); BoostRegexConcept(const BoostRegexConcept&);

View File

@ -1,6 +1,6 @@
/* /*
* *
* Copyright (c) 1998-2002 * Copyright (c) 1998-2009
* John Maddock * John Maddock
* *
* Use, modification and distribution are subject to the * Use, modification and distribution are subject to the
@ -282,42 +282,55 @@ public:
return m_subs.end(); return m_subs.end();
} }
// format: // format:
template <class OutputIterator> template <class OutputIterator, class Functor>
OutputIterator format(OutputIterator out, OutputIterator format(OutputIterator out,
const string_type& fmt, Functor fmt,
match_flag_type flags = format_default) const match_flag_type flags = format_default) const
{ {
re_detail::trivial_format_traits<char_type> traits; typedef typename re_detail::compute_functor_type<Functor, match_results<BidiIterator, Allocator>, OutputIterator>::type F;
return re_detail::regex_format_imp(out, *this, fmt.data(), fmt.data() + fmt.size(), flags, traits); F func(fmt);
return func(*this, out, flags);
} }
string_type format(const string_type& fmt, template <class Functor>
match_flag_type flags = format_default) const string_type format(Functor fmt, match_flag_type flags = format_default) const
{ {
string_type result; std::basic_string<char_type> result;
re_detail::string_out_iterator<string_type> i(result); re_detail::string_out_iterator<std::basic_string<char_type> > i(result);
re_detail::trivial_format_traits<char_type> traits;
re_detail::regex_format_imp(i, *this, fmt.data(), fmt.data() + fmt.size(), flags, traits); typedef typename re_detail::compute_functor_type<Functor, match_results<BidiIterator, Allocator>, re_detail::string_out_iterator<std::basic_string<char_type> > >::type F;
F func(fmt);
func(*this, i, flags);
return result; return result;
} }
// format with locale: // format with locale:
template <class OutputIterator, class RegexT> template <class OutputIterator, class Functor, class RegexT>
OutputIterator format(OutputIterator out, OutputIterator format(OutputIterator out,
const string_type& fmt, Functor fmt,
match_flag_type flags, match_flag_type flags,
const RegexT& re) const const RegexT& re) const
{ {
return ::boost::re_detail::regex_format_imp(out, *this, fmt.data(), fmt.data() + fmt.size(), flags, re.get_traits()); typedef ::boost::regex_traits_wrapper<typename RegexT::traits_type> traits_type;
typedef typename re_detail::compute_functor_type<Functor, match_results<BidiIterator, Allocator>, OutputIterator, traits_type>::type F;
F func(fmt);
return func(*this, out, flags, re.get_traits());
} }
template <class RegexT> template <class RegexT, class Functor>
string_type format(const string_type& fmt, string_type format(Functor fmt,
match_flag_type flags, match_flag_type flags,
const RegexT& re) const const RegexT& re) const
{ {
string_type result; typedef ::boost::regex_traits_wrapper<typename RegexT::traits_type> traits_type;
re_detail::string_out_iterator<string_type> i(result); std::basic_string<char_type> result;
::boost::re_detail::regex_format_imp(i, *this, fmt.data(), fmt.data() + fmt.size(), flags, re.get_traits()); re_detail::string_out_iterator<std::basic_string<char_type> > i(result);
typedef typename re_detail::compute_functor_type<Functor, match_results<BidiIterator, Allocator>, re_detail::string_out_iterator<std::basic_string<char_type> >, traits_type >::type F;
F func(fmt);
func(*this, i, flags, re.get_traits());
return result; return result;
} }
const_reference get_last_closed_paren()const const_reference get_last_closed_paren()const
{ {
return m_last_closed_paren == 0 ? m_null : (*this)[m_last_closed_paren]; return m_last_closed_paren == 0 ? m_null : (*this)[m_last_closed_paren];

View File

@ -1,7 +1,7 @@
/* /*
* *
* Copyright (c) 1998-2002 * Copyright (c) 1998-2009 John Maddock
* John Maddock * Copyright 2008 Eric Niebler.
* *
* Use, modification and distribution are subject to the * Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file * Boost Software License, Version 1.0. (See accompanying file
@ -21,6 +21,19 @@
#ifndef BOOST_REGEX_FORMAT_HPP #ifndef BOOST_REGEX_FORMAT_HPP
#define BOOST_REGEX_FORMAT_HPP #define BOOST_REGEX_FORMAT_HPP
#include <boost/type_traits/is_pointer.hpp>
#include <boost/type_traits/is_function.hpp>
#include <boost/type_traits/is_class.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/remove_pointer.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/not.hpp>
#ifndef BOOST_NO_SFINAE
#include <boost/mpl/has_xxx.hpp>
#endif
namespace boost{ namespace boost{
@ -76,15 +89,15 @@ struct trivial_format_traits
} }
}; };
template <class OutputIterator, class Results, class traits> template <class OutputIterator, class Results, class traits, class ForwardIter>
class basic_regex_formatter class basic_regex_formatter
{ {
public: public:
typedef typename traits::char_type char_type; typedef typename traits::char_type char_type;
basic_regex_formatter(OutputIterator o, const Results& r, const traits& t) basic_regex_formatter(OutputIterator o, const Results& r, const traits& t)
: m_traits(t), m_results(r), m_out(o), m_state(output_copy), m_restore_state(output_copy), m_have_conditional(false) {} : m_traits(t), m_results(r), m_out(o), m_state(output_copy), m_restore_state(output_copy), m_have_conditional(false) {}
OutputIterator format(const char_type* p1, const char_type* p2, match_flag_type f); OutputIterator format(ForwardIter p1, ForwardIter p2, match_flag_type f);
OutputIterator format(const char_type* p1, match_flag_type f) OutputIterator format(ForwardIter p1, match_flag_type f)
{ {
return format(p1, p1 + m_traits.length(p1), f); return format(p1, p1 + m_traits.length(p1), f);
} }
@ -109,22 +122,75 @@ private:
void format_until_scope_end(); void format_until_scope_end();
bool handle_perl_verb(bool have_brace); bool handle_perl_verb(bool have_brace);
const traits& m_traits; // the traits class for localised formatting operations inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j, const mpl::false_&)
const Results& m_results; // the match_results being used. {
OutputIterator m_out; // where to send output. std::vector<char_type> v(i, j);
const char_type* m_position; // format string, current position return (i != j) ? this->m_results.named_subexpression(&v[0], &v[0] + v.size())
const char_type* m_end; // format string end : this->m_results.named_subexpression(static_cast<const char_type*>(0), static_cast<const char_type*>(0));
match_flag_type m_flags; // format flags to use }
output_state m_state; // what to do with the next character inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j, const mpl::true_&)
output_state m_restore_state; // what state to restore to. {
bool m_have_conditional; // we are parsing a conditional return this->m_results.named_subexpression(i, j);
}
inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j)
{
typedef typename boost::is_convertible<ForwardIter, const char_type*>::type tag_type;
return get_named_sub(i, j, tag_type());
}
inline int get_named_sub_index(ForwardIter i, ForwardIter j, const mpl::false_&)
{
std::vector<char_type> v(i, j);
return (i != j) ? this->m_results.named_subexpression_index(&v[0], &v[0] + v.size())
: this->m_results.named_subexpression_index(static_cast<const char_type*>(0), static_cast<const char_type*>(0));
}
inline int get_named_sub_index(ForwardIter i, ForwardIter j, const mpl::true_&)
{
return this->m_results.named_subexpression_index(i, j);
}
inline int get_named_sub_index(ForwardIter i, ForwardIter j)
{
typedef typename boost::is_convertible<ForwardIter, const char_type*>::type tag_type;
return get_named_sub_index(i, j, tag_type());
}
inline int toi(ForwardIter& i, ForwardIter j, int base, const boost::mpl::false_&)
{
if(i != j)
{
std::vector<char_type> v(i, j);
const char_type* start = &v[0];
const char_type* pos = start;
int r = m_traits.toi(pos, &v[0] + v.size(), base);
std::advance(i, pos - start);
return r;
}
return -1;
}
inline int toi(ForwardIter& i, ForwardIter j, int base, const boost::mpl::true_&)
{
return m_traits.toi(i, j, base);
}
inline int toi(ForwardIter& i, ForwardIter j, int base)
{
typedef typename boost::is_convertible<ForwardIter, const char_type*&>::type tag_type;
return toi(i, j, base, tag_type());
}
const traits& m_traits; // the traits class for localised formatting operations
const Results& m_results; // the match_results being used.
OutputIterator m_out; // where to send output.
ForwardIter m_position; // format string, current position
ForwardIter m_end; // format string end
match_flag_type m_flags; // format flags to use
output_state m_state; // what to do with the next character
output_state m_restore_state; // what state to restore to.
bool m_have_conditional; // we are parsing a conditional
private: private:
basic_regex_formatter(const basic_regex_formatter&); basic_regex_formatter(const basic_regex_formatter&);
basic_regex_formatter& operator=(const basic_regex_formatter&); basic_regex_formatter& operator=(const basic_regex_formatter&);
}; };
template <class OutputIterator, class Results, class traits> template <class OutputIterator, class Results, class traits, class ForwardIter>
OutputIterator basic_regex_formatter<OutputIterator, Results, traits>::format(const char_type* p1, const char_type* p2, match_flag_type f) OutputIterator basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format(ForwardIter p1, ForwardIter p2, match_flag_type f)
{ {
m_position = p1; m_position = p1;
m_end = p2; m_end = p2;
@ -133,8 +199,8 @@ OutputIterator basic_regex_formatter<OutputIterator, Results, traits>::format(co
return m_out; return m_out;
} }
template <class OutputIterator, class Results, class traits> template <class OutputIterator, class Results, class traits, class ForwardIter>
void basic_regex_formatter<OutputIterator, Results, traits>::format_all() void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_all()
{ {
// over and over: // over and over:
while(m_position != m_end) while(m_position != m_end)
@ -211,8 +277,8 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_all()
} }
} }
template <class OutputIterator, class Results, class traits> template <class OutputIterator, class Results, class traits, class ForwardIter>
void basic_regex_formatter<OutputIterator, Results, traits>::format_perl() void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_perl()
{ {
// //
// On entry *m_position points to a '$' character // On entry *m_position points to a '$' character
@ -233,7 +299,7 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_perl()
// OK find out what kind it is: // OK find out what kind it is:
// //
bool have_brace = false; bool have_brace = false;
const char_type* save_position = m_position; ForwardIter save_position = m_position;
switch(*m_position) switch(*m_position)
{ {
case '&': case '&':
@ -254,12 +320,12 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_perl()
case '+': case '+':
if((++m_position != m_end) && (*m_position == '{')) if((++m_position != m_end) && (*m_position == '{'))
{ {
const char_type* base = ++m_position; ForwardIter base = ++m_position;
while((m_position != m_end) && (*m_position != '}')) ++m_position; while((m_position != m_end) && (*m_position != '}')) ++m_position;
if(m_position != m_end) if(m_position != m_end)
{ {
// Named sub-expression: // Named sub-expression:
put(this->m_results.named_subexpression(base, m_position)); put(get_named_sub(base, m_position));
++m_position; ++m_position;
break; break;
} }
@ -279,7 +345,7 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_perl()
{ {
std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end); std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end);
//len = (std::min)(static_cast<std::ptrdiff_t>(2), len); //len = (std::min)(static_cast<std::ptrdiff_t>(2), len);
int v = m_traits.toi(m_position, m_position + len, 10); int v = this->toi(m_position, m_position + len, 10);
if((v < 0) || (have_brace && ((m_position == m_end) || (*m_position != '}')))) if((v < 0) || (have_brace && ((m_position == m_end) || (*m_position != '}'))))
{ {
// Look for a Perl-5.10 verb: // Look for a Perl-5.10 verb:
@ -300,8 +366,8 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_perl()
} }
} }
template <class OutputIterator, class Results, class traits> template <class OutputIterator, class Results, class traits, class ForwardIter>
bool basic_regex_formatter<OutputIterator, Results, traits>::handle_perl_verb(bool have_brace) bool basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::handle_perl_verb(bool have_brace)
{ {
// //
// We may have a capitalised string containing a Perl action: // We may have a capitalised string containing a Perl action:
@ -313,6 +379,8 @@ bool basic_regex_formatter<OutputIterator, Results, traits>::handle_perl_verb(bo
static const char_type LAST_SUBMATCH_RESULT[] = { 'L', 'A', 'S', 'T', '_', 'S', 'U', 'B', 'M', 'A', 'T', 'C', 'H', '_', 'R', 'E', 'S', 'U', 'L', 'T' }; static const char_type LAST_SUBMATCH_RESULT[] = { 'L', 'A', 'S', 'T', '_', 'S', 'U', 'B', 'M', 'A', 'T', 'C', 'H', '_', 'R', 'E', 'S', 'U', 'L', 'T' };
static const char_type LAST_SUBMATCH_RESULT_ALT[] = { '^', 'N' }; static const char_type LAST_SUBMATCH_RESULT_ALT[] = { '^', 'N' };
if(m_position == m_end)
return false;
if(have_brace && (*m_position == '^')) if(have_brace && (*m_position == '^'))
++m_position; ++m_position;
@ -323,7 +391,7 @@ bool basic_regex_formatter<OutputIterator, Results, traits>::handle_perl_verb(bo
m_position += 5; m_position += 5;
if(have_brace) if(have_brace)
{ {
if(*m_position == '}') if((m_position != m_end) && (*m_position == '}'))
++m_position; ++m_position;
else else
{ {
@ -339,7 +407,7 @@ bool basic_regex_formatter<OutputIterator, Results, traits>::handle_perl_verb(bo
m_position += 8; m_position += 8;
if(have_brace) if(have_brace)
{ {
if(*m_position == '}') if((m_position != m_end) && (*m_position == '}'))
++m_position; ++m_position;
else else
{ {
@ -355,7 +423,7 @@ bool basic_regex_formatter<OutputIterator, Results, traits>::handle_perl_verb(bo
m_position += 9; m_position += 9;
if(have_brace) if(have_brace)
{ {
if(*m_position == '}') if((m_position != m_end) && (*m_position == '}'))
++m_position; ++m_position;
else else
{ {
@ -371,7 +439,7 @@ bool basic_regex_formatter<OutputIterator, Results, traits>::handle_perl_verb(bo
m_position += 16; m_position += 16;
if(have_brace) if(have_brace)
{ {
if(*m_position == '}') if((m_position != m_end) && (*m_position == '}'))
++m_position; ++m_position;
else else
{ {
@ -387,7 +455,7 @@ bool basic_regex_formatter<OutputIterator, Results, traits>::handle_perl_verb(bo
m_position += 20; m_position += 20;
if(have_brace) if(have_brace)
{ {
if(*m_position == '}') if((m_position != m_end) && (*m_position == '}'))
++m_position; ++m_position;
else else
{ {
@ -403,7 +471,7 @@ bool basic_regex_formatter<OutputIterator, Results, traits>::handle_perl_verb(bo
m_position += 2; m_position += 2;
if(have_brace) if(have_brace)
{ {
if(*m_position == '}') if((m_position != m_end) && (*m_position == '}'))
++m_position; ++m_position;
else else
{ {
@ -417,8 +485,8 @@ bool basic_regex_formatter<OutputIterator, Results, traits>::handle_perl_verb(bo
return false; return false;
} }
template <class OutputIterator, class Results, class traits> template <class OutputIterator, class Results, class traits, class ForwardIter>
void basic_regex_formatter<OutputIterator, Results, traits>::format_escape() void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_escape()
{ {
// skip the escape and check for trailing escape: // skip the escape and check for trailing escape:
if(++m_position == m_end) if(++m_position == m_end)
@ -463,7 +531,7 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_escape()
if(*m_position == static_cast<char_type>('{')) if(*m_position == static_cast<char_type>('{'))
{ {
++m_position; ++m_position;
int val = m_traits.toi(m_position, m_end, 16); int val = this->toi(m_position, m_end, 16);
if(val < 0) if(val < 0)
{ {
// invalid value treat everything as literals: // invalid value treat everything as literals:
@ -471,8 +539,9 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_escape()
put(static_cast<char_type>('{')); put(static_cast<char_type>('{'));
return; return;
} }
if(*m_position != static_cast<char_type>('}')) if((m_position == m_end) || (*m_position != static_cast<char_type>('}')))
{ {
--m_position;
while(*m_position != static_cast<char_type>('\\')) while(*m_position != static_cast<char_type>('\\'))
--m_position; --m_position;
++m_position; ++m_position;
@ -487,7 +556,7 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_escape()
{ {
std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end); std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end);
len = (std::min)(static_cast<std::ptrdiff_t>(2), len); len = (std::min)(static_cast<std::ptrdiff_t>(2), len);
int val = m_traits.toi(m_position, m_position + len, 16); int val = this->toi(m_position, m_position + len, 16);
if(val < 0) if(val < 0)
{ {
--m_position; --m_position;
@ -549,7 +618,9 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_escape()
break; break;
} }
// see if we have a \n sed style backreference: // see if we have a \n sed style backreference:
int v = m_traits.toi(m_position, m_position+1, 10); std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end);
len = (std::min)(static_cast<std::ptrdiff_t>(1), len);
int v = this->toi(m_position, m_position+len, 10);
if((v > 0) || ((v == 0) && (m_flags & ::boost::regex_constants::format_sed))) if((v > 0) || ((v == 0) && (m_flags & ::boost::regex_constants::format_sed)))
{ {
put(m_results[v]); put(m_results[v]);
@ -561,7 +632,7 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_escape()
--m_position; --m_position;
std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end); std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end);
len = (std::min)(static_cast<std::ptrdiff_t>(4), len); len = (std::min)(static_cast<std::ptrdiff_t>(4), len);
v = m_traits.toi(m_position, m_position + len, 8); v = this->toi(m_position, m_position + len, 8);
BOOST_ASSERT(v >= 0); BOOST_ASSERT(v >= 0);
put(static_cast<char_type>(v)); put(static_cast<char_type>(v));
break; break;
@ -572,8 +643,8 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_escape()
} }
} }
template <class OutputIterator, class Results, class traits> template <class OutputIterator, class Results, class traits, class ForwardIter>
void basic_regex_formatter<OutputIterator, Results, traits>::format_conditional() void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_conditional()
{ {
if(m_position == m_end) if(m_position == m_end)
{ {
@ -584,15 +655,15 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_conditional(
int v; int v;
if(*m_position == '{') if(*m_position == '{')
{ {
const char_type* base = m_position; ForwardIter base = m_position;
++m_position; ++m_position;
v = m_traits.toi(m_position, m_end, 10); v = this->toi(m_position, m_end, 10);
if(v < 0) if(v < 0)
{ {
// Try a named subexpression: // Try a named subexpression:
while((m_position != m_end) && (*m_position != '}')) while((m_position != m_end) && (*m_position != '}'))
++m_position; ++m_position;
v = m_results.named_subexpression_index(base + 1, m_position); v = this->get_named_sub_index(base + 1, m_position);
} }
if((v < 0) || (*m_position != '}')) if((v < 0) || (*m_position != '}'))
{ {
@ -608,7 +679,7 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_conditional(
{ {
std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end); std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end);
len = (std::min)(static_cast<std::ptrdiff_t>(2), len); len = (std::min)(static_cast<std::ptrdiff_t>(2), len);
v = m_traits.toi(m_position, m_position + len, 10); v = this->toi(m_position, m_position + len, 10);
} }
if(v < 0) if(v < 0)
{ {
@ -657,8 +728,8 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_conditional(
} }
} }
template <class OutputIterator, class Results, class traits> template <class OutputIterator, class Results, class traits, class ForwardIter>
void basic_regex_formatter<OutputIterator, Results, traits>::format_until_scope_end() void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_until_scope_end()
{ {
do do
{ {
@ -669,8 +740,8 @@ void basic_regex_formatter<OutputIterator, Results, traits>::format_until_scope_
}while(m_position != m_end); }while(m_position != m_end);
} }
template <class OutputIterator, class Results, class traits> template <class OutputIterator, class Results, class traits, class ForwardIter>
void basic_regex_formatter<OutputIterator, Results, traits>::put(char_type c) void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::put(char_type c)
{ {
// write a single character to output // write a single character to output
// according to which case translation mode we are in: // according to which case translation mode we are in:
@ -699,8 +770,8 @@ void basic_regex_formatter<OutputIterator, Results, traits>::put(char_type c)
++m_out; ++m_out;
} }
template <class OutputIterator, class Results, class traits> template <class OutputIterator, class Results, class traits, class ForwardIter>
void basic_regex_formatter<OutputIterator, Results, traits>::put(const sub_match_type& sub) void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::put(const sub_match_type& sub)
{ {
typedef typename sub_match_type::iterator iterator_type; typedef typename sub_match_type::iterator iterator_type;
iterator_type i = sub.first; iterator_type i = sub.first;
@ -738,10 +809,10 @@ public:
#endif #endif
}; };
template <class OutputIterator, class Iterator, class Alloc, class charT, class traits> template <class OutputIterator, class Iterator, class Alloc, class ForwardIter, class traits>
OutputIterator regex_format_imp(OutputIterator out, OutputIterator regex_format_imp(OutputIterator out,
const match_results<Iterator, Alloc>& m, const match_results<Iterator, Alloc>& m,
const charT* p1, const charT* p2, ForwardIter p1, ForwardIter p2,
match_flag_type flags, match_flag_type flags,
const traits& t const traits& t
) )
@ -754,57 +825,279 @@ OutputIterator regex_format_imp(OutputIterator out,
re_detail::basic_regex_formatter< re_detail::basic_regex_formatter<
OutputIterator, OutputIterator,
match_results<Iterator, Alloc>, match_results<Iterator, Alloc>,
traits > f(out, m, t); traits, ForwardIter> f(out, m, t);
return f.format(p1, p2, flags); return f.format(p1, p2, flags);
} }
#ifndef BOOST_NO_SFINAE
BOOST_MPL_HAS_XXX_TRAIT_DEF(const_iterator);
struct any_type { any_type(...); };
typedef char no_type;
typedef char (&unary_type)[2];
typedef char (&binary_type)[3];
typedef char (&ternary_type)[4];
no_type check_is_formatter(unary_type, binary_type, ternary_type);
template<typename T>
unary_type check_is_formatter(T const &, binary_type, ternary_type);
template<typename T>
binary_type check_is_formatter(unary_type, T const &, ternary_type);
template<typename T, typename U>
binary_type check_is_formatter(T const &, U const &, ternary_type);
template<typename T>
ternary_type check_is_formatter(unary_type, binary_type, T const &);
template<typename T, typename U>
ternary_type check_is_formatter(T const &, binary_type, U const &);
template<typename T, typename U>
ternary_type check_is_formatter(unary_type, T const &, U const &);
template<typename T, typename U, typename V>
ternary_type check_is_formatter(T const &, U const &, V const &);
struct unary_binary_ternary
{
typedef unary_type (*unary_fun)(any_type);
typedef binary_type (*binary_fun)(any_type, any_type);
typedef ternary_type (*ternary_fun)(any_type, any_type, any_type);
operator unary_fun();
operator binary_fun();
operator ternary_fun();
};
template<typename Formatter, bool IsFunction = boost::is_function<Formatter>::value>
struct formatter_wrapper
: Formatter
, unary_binary_ternary
{
formatter_wrapper(){}
};
template<typename Formatter>
struct formatter_wrapper<Formatter, true>
: unary_binary_ternary
{
operator Formatter *();
};
template<typename Formatter>
struct formatter_wrapper<Formatter *, false>
: unary_binary_ternary
{
operator Formatter *();
};
template <class F, class M, class O>
struct format_traits_imp
{
private:
//
// F must be a pointer, a function, or a class with a function call operator:
//
BOOST_STATIC_ASSERT((::boost::is_pointer<F>::value || ::boost::is_function<F>::value || ::boost::is_class<F>::value));
static formatter_wrapper<F> f;
static M m;
static O out;
static boost::regex_constants::match_flag_type flags;
public:
BOOST_STATIC_CONSTANT(int, value = sizeof(check_is_formatter(f(m), f(m, out), f(m, out, flags))));
};
template <class F, class M, class O>
struct format_traits
{
public:
//
// Type is mpl::int_<N> where N is one of:
//
// 0 : F is a pointer to a presumably null-terminated string.
// 1 : F is a character-container such as a std::string.
// 2 : F is a Unary Functor.
// 3 : F is a Binary Functor.
// 4 : F is a Ternary Functor.
//
typedef typename boost::mpl::if_<
boost::mpl::and_<boost::is_pointer<F>, boost::mpl::not_<boost::is_function<typename boost::remove_pointer<F>::type> > >,
boost::mpl::int_<0>,
typename boost::mpl::if_<
has_const_iterator<F>,
boost::mpl::int_<1>,
boost::mpl::int_<format_traits_imp<F, M, O>::value>
>::type
>::type type;
//
// This static assertion will fail if the functor passed does not accept
// the same type of arguments passed.
//
BOOST_STATIC_ASSERT( boost::is_class<F>::value && !has_const_iterator<F>::value ? (type::value > 1) : true);
};
#else // BOOST_NO_SFINAE
template <class F, class M, class O>
struct format_traits
{
public:
//
// Type is mpl::int_<N> where N is one of:
//
// 0 : F is a pointer to a presumably null-terminated string.
// 1 : F is a character-container such as a std::string.
//
// Other options such as F being a Functor are not supported without
// SFINAE support.
//
typedef typename boost::mpl::if_<
boost::is_pointer<F>,
boost::mpl::int_<0>,
boost::mpl::int_<1>
>::type type;
};
#endif // BOOST_NO_SFINAE
template <class Base, class Match>
struct format_functor3
{
format_functor3(Base b) : func(b) {}
template <class OutputIter>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f)
{
return func(m, i, f);
}
template <class OutputIter, class Traits>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
{
return (*this)(m, i, f);
}
private:
Base func;
};
template <class Base, class Match>
struct format_functor2
{
format_functor2(Base b) : func(b) {}
template <class OutputIter>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/)
{
return func(m, i);
}
template <class OutputIter, class Traits>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
{
return (*this)(m, i, f);
}
private:
Base func;
};
template <class Base, class Match>
struct format_functor1
{
format_functor1(Base b) : func(b) {}
template <class S, class OutputIter>
OutputIter do_format_string(const S& s, OutputIter i)
{
return re_detail::copy(s.begin(), s.end(), i);
}
template <class S, class OutputIter>
inline OutputIter do_format_string(const S* s, OutputIter i)
{
while(s && *s)
{
*i = *s;
++i;
++s;
}
return i;
}
template <class OutputIter>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/)
{
return do_format_string(func(m), i);
}
template <class OutputIter, class Traits>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
{
return (*this)(m, i, f);
}
private:
Base func;
};
template <class charT, class Match, class Traits>
struct format_functor_c_string
{
format_functor_c_string(const charT* ps) : func(ps) {}
template <class OutputIter>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits())
{
typedef typename Match::char_type char_type;
const charT* end = func;
while(*end) ++end;
return regex_format_imp(i, m, func, end, f, t);
}
private:
const charT* func;
};
template <class Container, class Match, class Traits>
struct format_functor_container
{
format_functor_container(const Container& c) : func(c) {}
template <class OutputIter>
OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits())
{
typedef typename Match::char_type char_type;
return re_detail::regex_format_imp(i, m, func.begin(), func.end(), f, t);
}
private:
const Container& func;
};
template <class Func, class Match, class OutputIterator, class Traits = re_detail::trivial_format_traits<typename Match::char_type> >
struct compute_functor_type
{
typedef typename format_traits<Func, Match, OutputIterator>::type tag;
typedef typename boost::remove_cv< typename boost::remove_pointer<Func>::type>::type maybe_char_type;
typedef typename mpl::if_<
::boost::is_same<tag, mpl::int_<0> >, format_functor_c_string<maybe_char_type, Match, Traits>,
typename mpl::if_<
::boost::is_same<tag, mpl::int_<1> >, format_functor_container<Func, Match, Traits>,
typename mpl::if_<
::boost::is_same<tag, mpl::int_<2> >, format_functor1<Func, Match>,
typename mpl::if_<
::boost::is_same<tag, mpl::int_<3> >, format_functor2<Func, Match>,
format_functor3<Func, Match>
>::type
>::type
>::type
>::type type;
};
} // namespace re_detail } // namespace re_detail
template <class OutputIterator, class Iterator, class charT> template <class OutputIterator, class Iterator, class Allocator, class Functor>
OutputIterator regex_format(OutputIterator out, inline OutputIterator regex_format(OutputIterator out,
const match_results<Iterator>& m, const match_results<Iterator, Allocator>& m,
const charT* fmt, Functor fmt,
match_flag_type flags = format_all match_flag_type flags = format_all
) )
{ {
re_detail::trivial_format_traits<charT> traits; return m.format(out, fmt, flags);
return re_detail::regex_format_imp(out, m, fmt, fmt + traits.length(fmt), flags, traits);
} }
template <class OutputIterator, class Iterator, class charT> template <class Iterator, class Allocator, class Functor>
OutputIterator regex_format(OutputIterator out, inline std::basic_string<typename match_results<Iterator, Allocator>::char_type> regex_format(const match_results<Iterator, Allocator>& m,
const match_results<Iterator>& m, Functor fmt,
const std::basic_string<charT>& fmt,
match_flag_type flags = format_all
)
{
re_detail::trivial_format_traits<charT> traits;
return re_detail::regex_format_imp(out, m, fmt.data(), fmt.data() + fmt.size(), flags, traits);
}
template <class Iterator, class charT>
std::basic_string<charT> regex_format(const match_results<Iterator>& m,
const charT* fmt,
match_flag_type flags = format_all) match_flag_type flags = format_all)
{ {
std::basic_string<charT> result; return m.format(fmt, flags);
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
re_detail::trivial_format_traits<charT> traits;
re_detail::regex_format_imp(i, m, fmt, fmt + traits.length(fmt), flags, traits);
return result;
}
template <class Iterator, class charT>
std::basic_string<charT> regex_format(const match_results<Iterator>& m,
const std::basic_string<charT>& fmt,
match_flag_type flags = format_all)
{
std::basic_string<charT> result;
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
re_detail::trivial_format_traits<charT> traits;
re_detail::regex_format_imp(i, m, fmt.data(), fmt.data() + fmt.size(), flags, traits);
return result;
} }
#ifdef BOOST_MSVC #ifdef BOOST_MSVC

View File

@ -1,6 +1,6 @@
/* /*
* *
* Copyright (c) 1998-2002 * Copyright (c) 1998-2009
* John Maddock * John Maddock
* *
* Use, modification and distribution are subject to the * Use, modification and distribution are subject to the
@ -35,12 +35,12 @@ namespace boost{
#pragma warning(pop) #pragma warning(pop)
#endif #endif
template <class OutputIterator, class BidirectionalIterator, class traits, class charT> template <class OutputIterator, class BidirectionalIterator, class traits, class charT, class Formatter>
OutputIterator regex_replace(OutputIterator out, OutputIterator regex_replace(OutputIterator out,
BidirectionalIterator first, BidirectionalIterator first,
BidirectionalIterator last, BidirectionalIterator last,
const basic_regex<charT, traits>& e, const basic_regex<charT, traits>& e,
const charT* fmt, Formatter fmt,
match_flag_type flags = match_default) match_flag_type flags = match_default)
{ {
regex_iterator<BidirectionalIterator, charT, traits> i(first, last, e, flags); regex_iterator<BidirectionalIterator, charT, traits> i(first, last, e, flags);
@ -69,21 +69,10 @@ OutputIterator regex_replace(OutputIterator out,
return out; return out;
} }
template <class OutputIterator, class Iterator, class traits, class charT> template <class traits, class charT, class Formatter>
inline OutputIterator regex_replace(OutputIterator out,
Iterator first,
Iterator last,
const basic_regex<charT, traits>& e,
const std::basic_string<charT>& fmt,
match_flag_type flags = match_default)
{
return regex_replace(out, first, last, e, fmt.c_str(), flags);
}
template <class traits, class charT>
std::basic_string<charT> regex_replace(const std::basic_string<charT>& s, std::basic_string<charT> regex_replace(const std::basic_string<charT>& s,
const basic_regex<charT, traits>& e, const basic_regex<charT, traits>& e,
const charT* fmt, Formatter fmt,
match_flag_type flags = match_default) match_flag_type flags = match_default)
{ {
std::basic_string<charT> result; std::basic_string<charT> result;
@ -92,18 +81,6 @@ std::basic_string<charT> regex_replace(const std::basic_string<charT>& s,
return result; return result;
} }
template <class traits, class charT>
std::basic_string<charT> regex_replace(const std::basic_string<charT>& s,
const basic_regex<charT, traits>& e,
const std::basic_string<charT>& fmt,
match_flag_type flags = match_default)
{
std::basic_string<charT> result;
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
regex_replace(i, s.begin(), s.end(), e, fmt.c_str(), flags);
return result;
}
#ifdef BOOST_MSVC #ifdef BOOST_MSVC
#pragma warning(push) #pragma warning(push)
#pragma warning(disable: 4103) #pragma warning(disable: 4103)