Added support for \g \K and \R.

[SVN r52592]
This commit is contained in:
John Maddock
2009-04-25 17:32:49 +00:00
parent 7b10b5dac5
commit 30941e330d
42 changed files with 795 additions and 519 deletions

View File

@ -28,7 +28,7 @@
Example Programs</a>
</h3></div></div></div>
<a name="boost_regex.background_information.examples.test_programs"></a><h5>
<a name="id963507"></a>
<a name="id935382"></a>
<a class="link" href="examples.html#boost_regex.background_information.examples.test_programs">Test
Programs</a>
</h5>
@ -107,7 +107,7 @@
Files: <a href="../../../../test/captures/captures_test.cpp" target="_top">captures_test.cpp</a>.
</p>
<a name="boost_regex.background_information.examples.example_programs"></a><h5>
<a name="id963977"></a>
<a name="id935685"></a>
<a class="link" href="examples.html#boost_regex.background_information.examples.example_programs">Example
programs</a>
</h5>
@ -133,7 +133,7 @@
Files: <a href="../../../../example/timer/regex_timer.cpp" target="_top">regex_timer.cpp</a>.
</p>
<a name="boost_regex.background_information.examples.code_snippets"></a><h5>
<a name="id964036"></a>
<a name="id935744"></a>
<a class="link" href="examples.html#boost_regex.background_information.examples.code_snippets">Code
snippets</a>
</h5>

View File

@ -26,7 +26,7 @@
<a name="boost_regex.background_information.history"></a><a class="link" href="history.html" title="History"> History</a>
</h3></div></div></div>
<a name="boost_regex.background_information.history.boost_1_38"></a><h5>
<a name="id965524"></a>
<a name="id937370"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_38">Boost
1.38</a>
</h5>
@ -53,7 +53,7 @@
</li>
</ul></div>
<a name="boost_regex.background_information.history.boost_1_34"></a><h5>
<a name="id965602"></a>
<a name="id937448"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_34">Boost
1.34</a>
</h5>
@ -76,7 +76,7 @@
</li>
</ul></div>
<a name="boost_regex.background_information.history.boost_1_33_1"></a><h5>
<a name="id965633"></a>
<a name="id937479"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_1">Boost
1.33.1</a>
</h5>
@ -146,7 +146,7 @@
</li>
</ul></div>
<a name="boost_regex.background_information.history.boost_1_33_0"></a><h5>
<a name="id965712"></a>
<a name="id937558"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_0">Boost
1.33.0</a>
</h5>
@ -201,7 +201,7 @@
</li>
</ul></div>
<a name="boost_regex.background_information.history.boost_1_32_1"></a><h5>
<a name="id965771"></a>
<a name="id937617"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_32_1">Boost
1.32.1</a>
</h5>
@ -209,7 +209,7 @@
Fixed bug in partial matches of bounded repeats of '.'.
</li></ul></div>
<a name="boost_regex.background_information.history.boost_1_31_0"></a><h5>
<a name="id965792"></a>
<a name="id937638"></a>
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_31_0">Boost
1.31.0</a>
</h5>

View File

@ -58,7 +58,7 @@
There are three separate localization mechanisms supported by Boost.Regex:
</p>
<a name="boost_regex.background_information.locale.win32_localization_model_"></a><h5>
<a name="id959022"></a>
<a name="id931072"></a>
<a class="link" href="locale.html#boost_regex.background_information.locale.win32_localization_model_">Win32
localization model.</a>
</h5>
@ -90,7 +90,7 @@
are treated as "unknown" graphic characters.
</p>
<a name="boost_regex.background_information.locale.c_localization_model_"></a><h5>
<a name="id959177"></a>
<a name="id931227"></a>
<a class="link" href="locale.html#boost_regex.background_information.locale.c_localization_model_">C
localization model.</a>
</h5>
@ -114,7 +114,7 @@
libraries including version 1 of this library.
</p>
<a name="boost_regex.background_information.locale.c___localization_model_"></a><h5>
<a name="id959245"></a>
<a name="id931295"></a>
<a class="link" href="locale.html#boost_regex.background_information.locale.c___localization_model_">C++
localization model.</a>
</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>.
</p>
<a name="boost_regex.background_information.locale.providing_a_message_catalogue"></a><h5>
<a name="id959547"></a>
<a name="id931597"></a>
<a class="link" href="locale.html#boost_regex.background_information.locale.providing_a_message_catalogue">Providing
a message catalogue</a>
</h5>

View File

@ -28,7 +28,7 @@
Conformance</a>
</h3></div></div></div>
<a name="boost_regex.background_information.standards.c__"></a><h5>
<a name="id964665"></a>
<a name="id936373"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.c__">C++</a>
</h5>
<p>
@ -36,7 +36,7 @@
Report on C++ Library Extensions</a>.
</p>
<a name="boost_regex.background_information.standards.ecmascript___javascript"></a><h5>
<a name="id964686"></a>
<a name="id936395"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.ecmascript___javascript">ECMAScript
/ JavaScript</a>
</h5>
@ -49,7 +49,7 @@
rather than a Unicode escape sequence; use \x{DDDD} for Unicode escape sequences.
</p>
<a name="boost_regex.background_information.standards.perl"></a><h5>
<a name="id964707"></a>
<a name="id936415"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.perl">Perl</a>
</h5>
<p>
@ -62,7 +62,7 @@
(??{code}) Not implementable in a compiled strongly typed language.
</p>
<a name="boost_regex.background_information.standards.posix"></a><h5>
<a name="id964731"></a>
<a name="id936439"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.posix">POSIX</a>
</h5>
<p>
@ -82,7 +82,7 @@
a custom traits class.
</p>
<a name="boost_regex.background_information.standards.unicode"></a><h5>
<a name="id964755"></a>
<a name="id936463"></a>
<a class="link" href="standards.html#boost_regex.background_information.standards.unicode">Unicode</a>
</h5>
<p>

View File

@ -35,7 +35,7 @@
accessed.
</p>
<a name="boost_regex.captures.marked_sub_expressions"></a><h5>
<a name="id808354"></a>
<a name="id781457"></a>
<a class="link" href="captures.html#boost_regex.captures.marked_sub_expressions">Marked sub-expressions</a>
</h5>
<p>
@ -218,7 +218,7 @@
output stream.
</p>
<a name="boost_regex.captures.unmatched_sub_expressions"></a><h5>
<a name="id808810"></a>
<a name="id781913"></a>
<a class="link" href="captures.html#boost_regex.captures.unmatched_sub_expressions">Unmatched Sub-Expressions</a>
</h5>
<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.
</p>
<a name="boost_regex.captures.repeated_captures"></a><h5>
<a name="id808850"></a>
<a name="id781953"></a>
<a class="link" href="captures.html#boost_regex.captures.repeated_captures">Repeated Captures</a>
</h5>
<p>

View File

@ -32,7 +32,7 @@
'$', '\', '(', ')', '?', and ':'.
</p>
<a name="boost_regex.format.boost_format_syntax.grouping"></a><h5>
<a name="id830630"></a>
<a name="id802668"></a>
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.grouping">Grouping</a>
</h5>
<p>
@ -40,7 +40,7 @@
you want a to output literal parenthesis.
</p>
<a name="boost_regex.format.boost_format_syntax.conditionals"></a><h5>
<a name="id830647"></a>
<a name="id802685"></a>
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.conditionals">Conditionals</a>
</h5>
<p>
@ -66,7 +66,7 @@
with "bar" otherwise.
</p>
<a name="boost_regex.format.boost_format_syntax.placeholder_sequences"></a><h5>
<a name="id830684"></a>
<a name="id802722"></a>
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.placeholder_sequences">Placeholder
Sequences</a>
</h5>
@ -161,7 +161,7 @@
as a literal.
</p>
<a name="boost_regex.format.boost_format_syntax.escape_sequences"></a><h5>
<a name="id830824"></a>
<a name="id802862"></a>
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.escape_sequences">Escape
Sequences</a>
</h5>

View File

@ -49,7 +49,7 @@
file before you can use it, instructions for specific platforms are as follows:
</p>
<a name="boost_regex.install.building_with_bjam"></a><h5>
<a name="id805614"></a>
<a name="id778713"></a>
<a class="link" href="install.html#boost_regex.install.building_with_bjam">Building with bjam</a>
</h5>
<p>
@ -58,7 +58,7 @@
started guide</a> for more information.
</p>
<a name="boost_regex.install.building_with_unicode_and_icu_support"></a><h5>
<a name="id805638"></a>
<a name="id778737"></a>
<a class="link" href="install.html#boost_regex.install.building_with_unicode_and_icu_support">Building
With Unicode and ICU Support</a>
</h5>
@ -96,11 +96,11 @@
ICU you are using is binary compatible with the toolset you use to build Boost.
</p>
<a name="boost_regex.install.building_via_makefiles"></a><h5>
<a name="id805757"></a>
<a name="id778856"></a>
<a class="link" href="install.html#boost_regex.install.building_via_makefiles">Building via makefiles</a>
</h5>
<a name="boost_regex.install.borland_c___builder_"></a><h6>
<a name="id805770"></a>
<a name="id778869"></a>
<a class="link" href="install.html#boost_regex.install.borland_c___builder_">Borland C++ Builder:</a>
</h6>
<div class="itemizedlist"><ul type="disc">
@ -166,7 +166,7 @@
a lot in compile times!
</p>
<a name="boost_regex.install.microsoft_visual_c___6__7__7_1_and_8"></a><h5>
<a name="id806009"></a>
<a name="id779108"></a>
<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>
</h5>
@ -253,7 +253,7 @@
</li>
</ul></div>
<a name="boost_regex.install.gcc_2_95_and_later_"></a><h6>
<a name="id806208"></a>
<a name="id779307"></a>
<a class="link" href="install.html#boost_regex.install.gcc_2_95_and_later_">GCC(2.95 and later)</a>
</h6>
<p>
@ -302,7 +302,7 @@
see the <a href="../../../../config/index.html" target="_top">config library documentation</a>.
</p>
<a name="boost_regex.install.sun_workshop_6_1"></a><h6>
<a name="id806334"></a>
<a name="id779433"></a>
<a class="link" href="install.html#boost_regex.install.sun_workshop_6_1">Sun Workshop 6.1</a>
</h6>
<p>
@ -347,7 +347,7 @@
will build v9 variants of the regex library named libboost_regex_v9.a etc.
</p>
<a name="boost_regex.install.makefiles_for_other_compilers"></a><h6>
<a name="id806478"></a>
<a name="id779577"></a>
<a class="link" href="install.html#boost_regex.install.makefiles_for_other_compilers">Makefiles
for Other compilers</a>
</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>
</h3></div></div></div>
<a name="boost_regex.ref.bad_expression.synopsis"></a><h5>
<a name="id911373"></a>
<a name="id883611"></a>
<a class="link" href="bad_expression.html#boost_regex.ref.bad_expression.synopsis">Synopsis</a>
</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>
@ -54,7 +54,7 @@
<span class="special">}</span> <span class="comment">// namespace boost
</span></pre>
<a name="boost_regex.ref.bad_expression.description"></a><h5>
<a name="id911735"></a>
<a name="id883972"></a>
<a class="link" href="bad_expression.html#boost_regex.ref.bad_expression.description">Description</a>
</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>

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>
</h3></div></div></div>
<a name="boost_regex.ref.basic_regex.synopsis"></a><h5>
<a name="id831168"></a>
<a name="id803206"></a>
<a class="link" href="basic_regex.html#boost_regex.ref.basic_regex.synopsis">Synopsis</a>
</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>
@ -244,7 +244,7 @@
<span class="special">}</span> <span class="comment">// namespace boost
</span></pre>
<a name="boost_regex.ref.basic_regex.description"></a><h5>
<a name="id835693"></a>
<a name="id808818"></a>
<a class="link" href="basic_regex.html#boost_regex.ref.basic_regex.description">Description</a>
</h5>
<p>
@ -327,7 +327,7 @@
<code class="computeroutput"><span class="identifier">basic_regex</span></code>.
</p>
<div class="table">
<a name="id838696"></a><p class="title"><b>Table<EFBFBD>1.<2E>basic_regex default construction postconditions</b></p>
<a name="id810182"></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">
<colgroup>
<col>
@ -407,7 +407,7 @@
flags</a> specified in <span class="emphasis"><em>f</em></span>.
</p>
<div class="table">
<a name="id838994"></a><p class="title"><b>Table<EFBFBD>2.<2E>Postconditions for basic_regex construction</b></p>
<a name="id812119"></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">
<colgroup>
<col>
@ -512,7 +512,7 @@
specified in <span class="emphasis"><em>f</em></span>.
</p>
<div class="table">
<a name="id839406"></a><p class="title"><b>Table<EFBFBD>3.<2E>Postconditions for basic_regex construction</b></p>
<a name="id812531"></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">
<colgroup>
<col>
@ -616,7 +616,7 @@
according the option flags specified in <span class="emphasis"><em>f</em></span>.
</p>
<div class="table">
<a name="id839811"></a><p class="title"><b>Table<EFBFBD>4.<2E>Postconditions for basic_regex construction</b></p>
<a name="id812936"></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">
<colgroup>
<col>
@ -727,7 +727,7 @@
flags</a> specified in <span class="emphasis"><em>f</em></span>.
</p>
<div class="table">
<a name="id841930"></a><p class="title"><b>Table<EFBFBD>5.<2E>Postconditions for basic_regex construction</b></p>
<a name="id813412"></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">
<colgroup>
<col>
@ -829,7 +829,7 @@
flags</a> specified in <span class="emphasis"><em>f</em></span>.
</p>
<div class="table">
<a name="id842288"></a><p class="title"><b>Table<EFBFBD>6.<2E>Postconditions for basic_regex construction</b></p>
<a name="id813771"></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">
<colgroup>
<col>
@ -1043,7 +1043,7 @@
in <span class="emphasis"><em>f</em></span>.
</p>
<div class="table">
<a name="id844897"></a><p class="title"><b>Table<EFBFBD>7.<2E>Postconditions for basic_regex::assign</b></p>
<a name="id815427"></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">
<colgroup>
<col>

View File

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

View File

@ -34,7 +34,7 @@
previous version of Boost.Regex and will not be further updated:
</p>
<a name="boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format"></a><h5>
<a name="id940303"></a>
<a name="id912446"></a>
<a class="link" href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm
regex_format</a>
</h5>

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>
</h3></div></div></div>
<a name="boost_regex.ref.error_type.synopsis"></a><h5>
<a name="id917903"></a>
<a name="id889804"></a>
<a class="link" href="error_type.html#boost_regex.ref.error_type.synopsis">Synopsis</a>
</h5>
<p>
@ -57,7 +57,7 @@
</span><span class="special">}</span> <span class="comment">// namespace boost
</span></pre>
<a name="boost_regex.ref.error_type.description"></a><h5>
<a name="id918318"></a>
<a name="id890220"></a>
<a class="link" href="error_type.html#boost_regex.ref.error_type.description">Description</a>
</h5>
<p>

View File

@ -69,7 +69,7 @@
</span><span class="special">}</span> <span class="comment">// namespace boost
</span></pre>
<a name="boost_regex.ref.match_flag_type.description"></a><h5>
<a name="id917352"></a>
<a name="id889254"></a>
<a class="link" href="match_flag_type.html#boost_regex.ref.match_flag_type.description">Description</a>
</h5>
<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>
</h3></div></div></div>
<a name="boost_regex.ref.match_results.synopsis"></a><h5>
<a name="id847363"></a>
<a name="id818644"></a>
<a class="link" href="match_results.html#boost_regex.ref.match_results.synopsis">Synopsis</a>
</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>
@ -142,7 +142,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>
</pre>
<a name="boost_regex.ref.match_results.description"></a><h5>
<a name="id849957"></a>
<a name="id821784"></a>
<a class="link" href="match_results.html#boost_regex.ref.match_results.description">Description</a>
</h5>
<p>

View File

@ -43,7 +43,7 @@
on to the "real" algorithm.
</p>
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match"></a><h5>
<a name="id920675"></a>
<a name="id892187"></a>
<a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match">u32regex_match</a>
</h5>
<p>
@ -89,7 +89,7 @@
<span class="special">}</span>
</pre>
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search"></a><h5>
<a name="id923146"></a>
<a name="id892702"></a>
<a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search">u32regex_search</a>
</h5>
<p>
@ -128,7 +128,7 @@
<span class="special">}</span>
</pre>
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace"></a><h5>
<a name="id923564"></a>
<a name="id893121"></a>
<a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace">u32regex_replace</a>
</h5>
<p>

View File

@ -28,7 +28,7 @@
Unicode Aware Regex Iterators</a>
</h5></div></div></div>
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator"></a><h5>
<a name="id923882"></a>
<a name="id893439"></a>
<a class="link" href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator">u32regex_iterator</a>
</h5>
<p>
@ -126,7 +126,7 @@
Provided of course that the input is encoded as UTF-8.
</p>
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator"></a><h5>
<a name="id925151"></a>
<a name="id895828"></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>
<p>

View File

@ -34,7 +34,7 @@
here they are anyway:
</p>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match"></a><h5>
<a name="id928910"></a>
<a name="id900818"></a>
<a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match">regex_match</a>
</h5>
<p>
@ -82,7 +82,7 @@
<span class="special">}</span>
</pre>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_"></a><h5>
<a name="id929567"></a>
<a name="id901476"></a>
<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>
</h5>
@ -110,7 +110,7 @@
<span class="special">}</span>
</pre>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search"></a><h5>
<a name="id931101"></a>
<a name="id901906"></a>
<a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search">regex_search</a>
</h5>
<p>
@ -149,7 +149,7 @@
<span class="special">}</span>
</pre>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_"></a><h5>
<a name="id931636"></a>
<a name="id902442"></a>
<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>
</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>
</p>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace"></a><h5>
<a name="id931926"></a>
<a name="id905547"></a>
<a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace">regex_replace</a>
</h5>
<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>:
</p>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper"></a><h5>
<a name="id932697"></a>
<a name="id906317"></a>
<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>
</h5>
@ -68,7 +68,7 @@
<span class="special">}</span>
</pre>
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers"></a><h5>
<a name="id935236"></a>
<a name="id906865"></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
creation helpers</a>
</h5>

View File

@ -165,7 +165,7 @@
<a name="regcomp"></a><p>
</p>
<a name="boost_regex.ref.posix.regcomp"></a><h5>
<a name="id937926"></a>
<a name="id909004"></a>
<a class="link" href="posix.html#boost_regex.ref.posix.regcomp">regcomp</a>
</h5>
<p>
@ -379,7 +379,7 @@
<a name="regerror"></a><p>
</p>
<a name="boost_regex.ref.posix.regerror"></a><h5>
<a name="id938432"></a>
<a name="id909510"></a>
<a class="link" href="posix.html#boost_regex.ref.posix.regerror">regerror</a>
</h5>
<p>
@ -467,7 +467,7 @@
<a name="regexec"></a><p>
</p>
<a name="boost_regex.ref.posix.regexec"></a><h5>
<a name="id938560"></a>
<a name="id909638"></a>
<a class="link" href="posix.html#boost_regex.ref.posix.regexec">regexec</a>
</h5>
<p>
@ -537,7 +537,7 @@
<a name="regfree"></a><p>
</p>
<a name="boost_regex.ref.posix.regfree"></a><h5>
<a name="id938672"></a>
<a name="id909750"></a>
<a class="link" href="posix.html#boost_regex.ref.posix.regfree">regfree</a>
</h5>
<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>
</pre>
<a name="boost_regex.ref.regex_iterator.description"></a><h5>
<a name="id896324"></a>
<a name="id867332"></a>
<a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.description">Description</a>
</h5>
<p>
@ -436,7 +436,7 @@
<span class="emphasis"><em>m</em></span>.
</p>
<a name="boost_regex.ref.regex_iterator.examples"></a><h5>
<a name="id898681"></a>
<a name="id870714"></a>
<a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.examples">Examples</a>
</h5>
<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>
</pre>
<a name="boost_regex.ref.regex_match.description"></a><h5>
<a name="id878078"></a>
<a name="id851340"></a>
<a class="link" href="regex_match.html#boost_regex.ref.regex_match.description">Description</a>
</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>
@ -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>.
</p>
<a name="boost_regex.ref.regex_match.examples"></a><h5>
<a name="id882087"></a>
<a name="id855348"></a>
<a class="link" href="regex_match.html#boost_regex.ref.regex_match.examples">Examples</a>
</h5>
<p>

View File

@ -53,7 +53,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>
</pre>
<a name="boost_regex.ref.regex_replace.description"></a><h5>
<a name="id889850"></a>
<a name="id861814"></a>
<a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.description">Description</a>
</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>
@ -163,7 +163,7 @@
and then returns <code class="computeroutput"><span class="identifier">result</span></code>.
</p>
<a name="boost_regex.ref.regex_replace.examples"></a><h5>
<a name="id890965"></a>
<a name="id863066"></a>
<a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.examples">Examples</a>
</h5>
<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>
</pre>
<a name="boost_regex.ref.regex_search.description"></a><h5>
<a name="id884803"></a>
<a name="id856972"></a>
<a class="link" href="regex_search.html#boost_regex.ref.regex_search.description">Description</a>
</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>
@ -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>.
</p>
<a name="boost_regex.ref.regex_search.examples"></a><h5>
<a name="id888397"></a>
<a name="id860498"></a>
<a class="link" href="regex_search.html#boost_regex.ref.regex_search.examples">Examples</a>
</h5>
<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>
</pre>
<a name="boost_regex.ref.regex_token_iterator.description"></a><h5>
<a name="id904578"></a>
<a name="id876064"></a>
<a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.description">Description</a>
</h5>
<a name="boost_regex.regex_token_iterator.construct1"></a><p>
@ -383,7 +383,7 @@
<span class="emphasis"><em>m</em></span>.
</p>
<a name="boost_regex.ref.regex_token_iterator.examples"></a><h5>
<a name="id909280"></a>
<a name="id881603"></a>
<a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.examples">Examples</a>
</h5>
<p>

View File

@ -46,7 +46,7 @@
<span class="special">}</span> <span class="comment">// namespace boost
</span></pre>
<a name="boost_regex.ref.regex_traits.description"></a><h5>
<a name="id919480"></a>
<a name="id890760"></a>
<a class="link" href="regex_traits.html#boost_regex.ref.regex_traits.description">Description</a>
</h5>
<p>

View File

@ -329,11 +329,11 @@
<span class="special">}</span> <span class="comment">// namespace boost
</span></pre>
<a name="boost_regex.ref.sub_match.description"></a><h5>
<a name="id863009"></a>
<a name="id835742"></a>
<a class="link" href="sub_match.html#boost_regex.ref.sub_match.description">Description</a>
</h5>
<a name="boost_regex.ref.sub_match.members"></a><h6>
<a name="id863023"></a>
<a name="id835755"></a>
<a class="link" href="sub_match.html#boost_regex.ref.sub_match.members">Members</a>
</h6>
<a name="boost_regex.sub_match.value_type"></a><p>
@ -473,7 +473,7 @@
</li>
</ul></div>
<a name="boost_regex.ref.sub_match.sub_match_non_member_operators"></a><h6>
<a name="id865762"></a>
<a name="id836855"></a>
<a class="link" href="sub_match.html#boost_regex.ref.sub_match.sub_match_non_member_operators">sub_match
non-member operators</a>
</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>.
</p>
<a name="boost_regex.ref.sub_match.stream_inserter"></a><h6>
<a name="id876680"></a>
<a name="id849395"></a>
<a class="link" href="sub_match.html#boost_regex.ref.sub_match.stream_inserter">Stream inserter</a>
</h6>
<a name="boost_regex.sub_match.op_stream"></a><p>

View File

@ -28,7 +28,7 @@
Expression Syntax</a>
</h3></div></div></div>
<a name="boost_regex.syntax.basic_extended.synopsis"></a><h4>
<a name="id819412"></a>
<a name="id791861"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.synopsis">Synopsis</a>
</h4>
<p>
@ -46,7 +46,7 @@
<a name="boost_regex.posix_extended_syntax"></a><p>
</p>
<a name="boost_regex.syntax.basic_extended.posix_extended_syntax"></a><h4>
<a name="id819591"></a>
<a name="id792040"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.posix_extended_syntax">POSIX
Extended Syntax</a>
</h4>
@ -56,7 +56,7 @@
</p>
<pre class="programlisting">.[{()\*+?|^$</pre>
<a name="boost_regex.syntax.basic_extended.wildcard_"></a><h5>
<a name="id819612"></a>
<a name="id792062"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.wildcard_">Wildcard:</a>
</h5>
<p>
@ -74,7 +74,7 @@
</li>
</ul></div>
<a name="boost_regex.syntax.basic_extended.anchors_"></a><h5>
<a name="id819657"></a>
<a name="id792106"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.anchors_">Anchors:</a>
</h5>
<p>
@ -86,7 +86,7 @@
of an expression, or the last character of a sub-expression.
</p>
<a name="boost_regex.syntax.basic_extended.marked_sub_expressions_"></a><h5>
<a name="id819679"></a>
<a name="id792129"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.marked_sub_expressions_">Marked
sub-expressions:</a>
</h5>
@ -98,7 +98,7 @@
to by a back-reference.
</p>
<a name="boost_regex.syntax.basic_extended.repeats_"></a><h5>
<a name="id819713"></a>
<a name="id792163"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.repeats_">Repeats:</a>
</h5>
<p>
@ -184,7 +184,7 @@ cab
operator to be applied to.
</p>
<a name="boost_regex.syntax.basic_extended.back_references_"></a><h5>
<a name="id820975"></a>
<a name="id792469"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.back_references_">Back references:</a>
</h5>
<p>
@ -214,7 +214,7 @@ cab
</p></td></tr>
</table></div>
<a name="boost_regex.syntax.basic_extended.alternation"></a><h5>
<a name="id821039"></a>
<a name="id792532"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.alternation">Alternation</a>
</h5>
<p>
@ -227,7 +227,7 @@ cab
will match either of "abd" or "abef".
</p>
<a name="boost_regex.syntax.basic_extended.character_sets_"></a><h5>
<a name="id821106"></a>
<a name="id792599"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_sets_">Character
sets:</a>
</h5>
@ -240,7 +240,7 @@ cab
A bracket expression may contain any combination of the following:
</p>
<a name="boost_regex.syntax.basic_extended.single_characters_"></a><h6>
<a name="id821126"></a>
<a name="id792620"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.single_characters_">Single
characters:</a>
</h6>
@ -249,7 +249,7 @@ cab
or 'c'.
</p>
<a name="boost_regex.syntax.basic_extended.character_ranges_"></a><h6>
<a name="id821158"></a>
<a name="id792651"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_ranges_">Character
ranges:</a>
</h6>
@ -265,7 +265,7 @@ cab
the code points of the characters only.
</p>
<a name="boost_regex.syntax.basic_extended.negation_"></a><h6>
<a name="id821219"></a>
<a name="id792712"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.negation_">Negation:</a>
</h6>
<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>.
</p>
<a name="boost_regex.syntax.basic_extended.character_classes_"></a><h6>
<a name="id821273"></a>
<a name="id792766"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_classes_">Character
classes:</a>
</h6>
@ -284,7 +284,7 @@ cab
<a class="link" href="character_classes.html" title="Character Class Names">character class names</a>.
</p>
<a name="boost_regex.syntax.basic_extended.collating_elements_"></a><h6>
<a name="id821324"></a>
<a name="id792818"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.collating_elements_">Collating
Elements:</a>
</h6>
@ -312,7 +312,7 @@ cab
matches a NUL character.
</p>
<a name="boost_regex.syntax.basic_extended.equivalence_classes_"></a><h6>
<a name="id821426"></a>
<a name="id792920"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.equivalence_classes_">Equivalence
classes:</a>
</h6>
@ -329,7 +329,7 @@ cab
or even all locales on one platform.
</p>
<a name="boost_regex.syntax.basic_extended.combinations_"></a><h6>
<a name="id821484"></a>
<a name="id792977"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.combinations_">Combinations:</a>
</h6>
<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>.
</p>
<a name="boost_regex.syntax.basic_extended.escapes"></a><h5>
<a name="id821537"></a>
<a name="id793030"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes">Escapes</a>
</h5>
<p>
@ -363,7 +363,7 @@ cab
extensions are also supported by Boost.Regex:
</p>
<a name="boost_regex.syntax.basic_extended.escapes_matching_a_specific_character"></a><h6>
<a name="id821580"></a>
<a name="id793073"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes_matching_a_specific_character">Escapes
matching a specific character</a>
</h6>
@ -552,7 +552,7 @@ cab
</tbody>
</table></div>
<a name="boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_"></a><h6>
<a name="id821870"></a>
<a name="id793364"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_">"Single
character" character classes:</a>
</h6>
@ -706,7 +706,7 @@ cab
</tbody>
</table></div>
<a name="boost_regex.syntax.basic_extended.character_properties"></a><h6>
<a name="id822359"></a>
<a name="id793921"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_properties">Character
Properties</a>
</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>.
</p>
<a name="boost_regex.syntax.basic_extended.word_boundaries"></a><h6>
<a name="id822666"></a>
<a name="id794228"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.word_boundaries">Word Boundaries</a>
</h6>
<p>
@ -888,7 +888,7 @@ cab
</tbody>
</table></div>
<a name="boost_regex.syntax.basic_extended.buffer_boundaries"></a><h6>
<a name="id822822"></a>
<a name="id794384"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.buffer_boundaries">Buffer
boundaries</a>
</h6>
@ -979,7 +979,7 @@ cab
</tbody>
</table></div>
<a name="boost_regex.syntax.basic_extended.continuation_escape"></a><h6>
<a name="id823007"></a>
<a name="id794569"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.continuation_escape">Continuation
Escape</a>
</h6>
@ -991,7 +991,7 @@ cab
match to start where the last one ended.
</p>
<a name="boost_regex.syntax.basic_extended.quoting_escape"></a><h6>
<a name="id823034"></a>
<a name="id794597"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.quoting_escape">Quoting
escape</a>
</h6>
@ -1005,7 +1005,7 @@ cab
<span class="special">\*+</span><span class="identifier">aaa</span>
</pre>
<a name="boost_regex.syntax.basic_extended.unicode_escapes"></a><h6>
<a name="id823320"></a>
<a name="id794677"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.unicode_escapes">Unicode
escapes</a>
</h6>
@ -1056,7 +1056,7 @@ cab
</tbody>
</table></div>
<a name="boost_regex.syntax.basic_extended.any_other_escape"></a><h6>
<a name="id823422"></a>
<a name="id794779"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.any_other_escape">Any other
escape</a>
</h6>
@ -1065,7 +1065,7 @@ cab
\@ matches a literal '@'.
</p>
<a name="boost_regex.syntax.basic_extended.operator_precedence"></a><h5>
<a name="id823439"></a>
<a name="id794796"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.operator_precedence">Operator
precedence</a>
</h5>
@ -1101,7 +1101,7 @@ cab
</li>
</ol></div>
<a name="boost_regex.syntax.basic_extended.what_gets_matched"></a><h5>
<a name="id823572"></a>
<a name="id794929"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.what_gets_matched">What
Gets Matched</a>
</h5>
@ -1111,11 +1111,11 @@ cab
rule</a>.
</p>
<a name="boost_regex.syntax.basic_extended.variations"></a><h4>
<a name="id823594"></a>
<a name="id794951"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.variations">Variations</a>
</h4>
<a name="boost_regex.syntax.basic_extended.egrep"></a><h5>
<a name="id823607"></a>
<a name="id794964"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.egrep">Egrep</a>
</h5>
<p>
@ -1136,7 +1136,7 @@ cab
used with the -E option.
</p>
<a name="boost_regex.syntax.basic_extended.awk"></a><h5>
<a name="id823709"></a>
<a name="id795066"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.awk">awk</a>
</h5>
<p>
@ -1150,7 +1150,7 @@ cab
these by default anyway.
</p>
<a name="boost_regex.syntax.basic_extended.options"></a><h4>
<a name="id823734"></a>
<a name="id795091"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.options">Options</a>
</h4>
<p>
@ -1163,7 +1163,7 @@ cab
modify how the case and locale sensitivity are to be applied.
</p>
<a name="boost_regex.syntax.basic_extended.references"></a><h4>
<a name="id823812"></a>
<a name="id795169"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.references">References</a>
</h4>
<p>

View File

@ -28,7 +28,7 @@
Expression Syntax</a>
</h3></div></div></div>
<a name="boost_regex.syntax.basic_syntax.synopsis"></a><h4>
<a name="id823861"></a>
<a name="id795218"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.synopsis">Synopsis</a>
</h4>
<p>
@ -45,7 +45,7 @@
<a name="boost_regex.posix_basic"></a><p>
</p>
<a name="boost_regex.syntax.basic_syntax.posix_basic_syntax"></a><h4>
<a name="id824057"></a>
<a name="id795414"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.posix_basic_syntax">POSIX
Basic Syntax</a>
</h4>
@ -55,7 +55,7 @@
</p>
<pre class="programlisting">.[\*^$</pre>
<a name="boost_regex.syntax.basic_syntax.wildcard_"></a><h5>
<a name="id824079"></a>
<a name="id795435"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.wildcard_">Wildcard:</a>
</h5>
<p>
@ -73,7 +73,7 @@
</li>
</ul></div>
<a name="boost_regex.syntax.basic_syntax.anchors_"></a><h5>
<a name="id824123"></a>
<a name="id795480"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.anchors_">Anchors:</a>
</h5>
<p>
@ -85,7 +85,7 @@
of an expression, or the last character of a sub-expression.
</p>
<a name="boost_regex.syntax.basic_syntax.marked_sub_expressions_"></a><h5>
<a name="id824143"></a>
<a name="id795500"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.marked_sub_expressions_">Marked
sub-expressions:</a>
</h5>
@ -97,7 +97,7 @@
by a back-reference.
</p>
<a name="boost_regex.syntax.basic_syntax.repeats_"></a><h5>
<a name="id824175"></a>
<a name="id795531"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.repeats_">Repeats:</a>
</h5>
<p>
@ -155,7 +155,7 @@ aaaa
to.
</p>
<a name="boost_regex.syntax.basic_syntax.back_references_"></a><h5>
<a name="id824339"></a>
<a name="id795696"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.back_references_">Back references:</a>
</h5>
<p>
@ -173,7 +173,7 @@ aaaa
</p>
<pre class="programlisting">aaabba</pre>
<a name="boost_regex.syntax.basic_syntax.character_sets_"></a><h5>
<a name="id824388"></a>
<a name="id796514"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_sets_">Character
sets:</a>
</h5>
@ -186,7 +186,7 @@ aaaa
A bracket expression may contain any combination of the following:
</p>
<a name="boost_regex.syntax.basic_syntax.single_characters_"></a><h6>
<a name="id824409"></a>
<a name="id796534"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.single_characters_">Single
characters:</a>
</h6>
@ -195,7 +195,7 @@ aaaa
or 'c'.
</p>
<a name="boost_regex.syntax.basic_syntax.character_ranges_"></a><h6>
<a name="id824440"></a>
<a name="id796565"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_ranges_">Character
ranges:</a>
</h6>
@ -211,7 +211,7 @@ aaaa
of the characters only.
</p>
<a name="boost_regex.syntax.basic_syntax.negation_"></a><h6>
<a name="id824496"></a>
<a name="id796622"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.negation_">Negation:</a>
</h6>
<p>
@ -220,7 +220,7 @@ aaaa
range a-c.
</p>
<a name="boost_regex.syntax.basic_syntax.character_classes_"></a><h6>
<a name="id824535"></a>
<a name="id796660"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_classes_">Character
classes:</a>
</h6>
@ -230,7 +230,7 @@ aaaa
<a class="link" href="character_classes.html" title="Character Class Names">character class names</a>.
</p>
<a name="boost_regex.syntax.basic_syntax.collating_elements_"></a><h6>
<a name="id824586"></a>
<a name="id796712"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.collating_elements_">Collating
Elements:</a>
</h6>
@ -259,7 +259,7 @@ aaaa
element names</a>.
</p>
<a name="boost_regex.syntax.basic_syntax.equivalence_classes_"></a><h6>
<a name="id824677"></a>
<a name="id796803"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.equivalence_classes_">Equivalence
classes:</a>
</h6>
@ -276,7 +276,7 @@ aaaa
or even all locales on one platform.
</p>
<a name="boost_regex.syntax.basic_syntax.combinations_"></a><h6>
<a name="id824735"></a>
<a name="id796860"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.combinations_">Combinations:</a>
</h6>
<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>
</p>
<a name="boost_regex.syntax.basic_syntax.escapes"></a><h5>
<a name="id824788"></a>
<a name="id796913"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.escapes">Escapes</a>
</h5>
<p>
@ -299,7 +299,7 @@ aaaa
will match either a literal '\' or a '^'.
</p>
<a name="boost_regex.syntax.basic_syntax.what_gets_matched"></a><h4>
<a name="id824821"></a>
<a name="id796947"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.what_gets_matched">What Gets
Matched</a>
</h4>
@ -309,13 +309,13 @@ aaaa
rule</a>.
</p>
<a name="boost_regex.syntax.basic_syntax.variations"></a><h4>
<a name="id824843"></a>
<a name="id796968"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.variations">Variations</a>
</h4>
<a name="boost_regex.grep_syntax"></a><p>
</p>
<a name="boost_regex.syntax.basic_syntax.grep"></a><h5>
<a name="id824863"></a>
<a name="id796989"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.grep">Grep</a>
</h5>
<p>
@ -333,7 +333,7 @@ aaaa
As its name suggests, this behavior is consistent with the Unix utility grep.
</p>
<a name="boost_regex.syntax.basic_syntax.emacs"></a><h5>
<a name="id824958"></a>
<a name="id797084"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.emacs">emacs</a>
</h5>
<p>
@ -613,7 +613,7 @@ aaaa
leftmost-longest rule</a>.
</p>
<a name="boost_regex.syntax.basic_syntax.options"></a><h4>
<a name="id825376"></a>
<a name="id797501"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.options">Options</a>
</h4>
<p>
@ -627,7 +627,7 @@ aaaa
options</a> modify how the case and locale sensitivity are to be applied.
</p>
<a name="boost_regex.syntax.basic_syntax.references"></a><h4>
<a name="id826942"></a>
<a name="id797608"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.references">References</a>
</h4>
<p>

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,7 @@
There are two ways to use Boost.Regex with Unicode strings:
</p>
<a name="boost_regex.unicode.rely_on_wchar_t"></a><h5>
<a name="id807642"></a>
<a name="id780741"></a>
<a class="link" href="unicode.html#boost_regex.unicode.rely_on_wchar_t">Rely on wchar_t</a>
</h5>
<p>
@ -56,7 +56,7 @@
</li>
</ul></div>
<a name="boost_regex.unicode.use_a_unicode_aware_regular_expression_type_"></a><h5>
<a name="id807760"></a>
<a name="id780858"></a>
<a class="link" href="unicode.html#boost_regex.unicode.use_a_unicode_aware_regular_expression_type_">Use
a Unicode Aware Regular Expression Type.</a>
</h5>

View File

@ -28,7 +28,7 @@
</h3></div></div></div>
<div><p class="copyright">Copyright <20> 1998 -2007 John Maddock</p></div>
<div><div class="legalnotice">
<a name="id797340"></a><p>
<a name="id770426"></a><p>
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>)
</p>
@ -196,7 +196,7 @@
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: April 23, 2009 at 09:45:24 GMT</small></p></td>
<td align="left"><p><small>Last revised: April 25, 2009 at 17:20:04 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>

View File

@ -12,7 +12,7 @@
The Perl regular expression syntax is based on that used by the
programming language Perl . Perl regular expressions are the
default behavior in Boost.Regex or you can pass the flag `perl` to the
default behavior in Boost.Regex or you can pass the flag =perl= to the
[basic_regex] constructor, for example:
// e1 is a case sensitive Perl regular expression:
@ -34,9 +34,9 @@ The single character '.' when used outside of a character set will match
any single character except:
* The NULL character when the [link boost_regex.ref.match_flag_type flag
`match_not_dot_null`] is passed to the matching algorithms.
=match_not_dot_null=] is passed to the matching algorithms.
* The newline character when the [link boost_regex.ref.match_flag_type
flag `match_not_dot_newline`] is passed to
flag =match_not_dot_newline=] is passed to
the matching algorithms.
[h4 Anchors]
@ -47,7 +47,7 @@ A '$' character shall match the end of a line.
[h4 Marked sub-expressions]
A section beginning `(` and ending `)` acts as a marked sub-expression.
A section beginning =(= and ending =)= acts as a marked sub-expression.
Whatever matched the sub-expression is split out in a separate field by
the matching algorithms. Marked sub-expressions can also repeated, or
referred to by a back-reference.
@ -58,23 +58,23 @@ A marked sub-expression is useful to lexically group part of a regular
expression, but has the side-effect of spitting out an extra field in
the result. As an alternative you can lexically group part of a
regular expression, without generating a marked sub-expression by using
`(?:` and `)` , for example `(?:ab)+` will repeat `ab` without splitting
=(?:= and =)= , for example =(?:ab)+= will repeat =ab= without splitting
out any separate sub-expressions.
[h4 Repeats]
Any atom (a single character, a marked sub-expression, or a character class)
can be repeated with the `*`, `+`, `?`, and `{}` operators.
can be repeated with the =*=, =+=, =?=, and ={}= operators.
The `*` operator will match the preceding atom zero or more times,
for example the expression `a*b` will match any of the following:
The =*= operator will match the preceding atom zero or more times,
for example the expression =a*b= will match any of the following:
b
ab
aaaaaaaab
The `+` operator will match the preceding atom one or more times, for
example the expression `a+b` will match any of the following:
The =+= operator will match the preceding atom one or more times, for
example the expression =a+b= will match any of the following:
ab
aaaaaaaab
@ -83,7 +83,7 @@ But will not match:
b
The `?` operator will match the preceding atom zero or one times, for
The =?= operator will match the preceding atom zero or one times, for
example the expression ca?b will match any of the following:
cb
@ -95,11 +95,11 @@ But will not match:
An atom can also be repeated with a bounded repeat:
`a{n}` Matches 'a' repeated exactly n times.
=a{n}= Matches 'a' repeated exactly n times.
`a{n,}` Matches 'a' repeated n or more times.
=a{n,}= Matches 'a' repeated n or more times.
`a{n, m}` Matches 'a' repeated between n and m times inclusive.
=a{n, m}= Matches 'a' repeated between n and m times inclusive.
For example:
@ -120,7 +120,7 @@ be repeated, for example:
a(*)
Will raise an error, as there is nothing for the `*` operator to be applied to.
Will raise an error, as there is nothing for the =*= operator to be applied to.
[h4 Non greedy repeats]
@ -128,19 +128,19 @@ The normal repeat operators are "greedy", that is to say they will consume as
much input as possible. There are non-greedy versions available that will
consume as little input as possible while still producing a match.
`*?` Matches the previous atom zero or more times, while consuming as little
=*?= Matches the previous atom zero or more times, while consuming as little
input as possible.
`+?` Matches the previous atom one or more times, while consuming as
=+?= Matches the previous atom one or more times, while consuming as
little input as possible.
`??` Matches the previous atom zero or one times, while consuming
=??= Matches the previous atom zero or one times, while consuming
as little input as possible.
`{n,}?` Matches the previous atom n or more times, while consuming as
={n,}?= Matches the previous atom n or more times, while consuming as
little input as possible.
`{n,m}?` Matches the previous atom between n and m times, while
={n,m}?= Matches the previous atom between n and m times, while
consuming as little input as possible.
[h4 Pocessive repeats]
@ -150,15 +150,15 @@ a match is found. However, this behaviour can sometime be undesireable so there
also "pocessive" repeats: these match as much as possible and do not then allow
backtracking if the rest of the expression fails to match.
`*+` Matches the previous atom zero or more times, while giving nothing back.
=*+= Matches the previous atom zero or more times, while giving nothing back.
`++` Matches the previous atom one or more times, while giving nothing back.
=++= Matches the previous atom one or more times, while giving nothing back.
`?+` Matches the previous atom zero or one times, while giving nothing back.
=?+= Matches the previous atom zero or one times, while giving nothing back.
`{n,}+` Matches the previous atom n or more times, while giving nothing back.
={n,}+= Matches the previous atom n or more times, while giving nothing back.
`{n,m}+` Matches the previous atom between n and m times, while giving nothing back.
={n,m}+= Matches the previous atom between n and m times, while giving nothing back.
[h4 Back references]
@ -176,26 +176,37 @@ But not the string:
aaabba
You can also use the \g escape for the same function, for example:
[table
[[Escape][Meaning]]
[[=\g1=][Match whatever matched sub-expression 1]]
[[=\g{1}=][Match whatever matched sub-expression 1: this form allows for safer
parsing of the expression in cases like =\g{1}2= or for indexes higher than 9 as in =\g{1234}=]]
[[=\g-1=][Match whatever matched the last opened sub-expression]]
[[=\g{-2}=][Match whatever matched the last but one opened sub-expression]]
]
[h4 Alternation]
The `|` operator will match either of its arguments, so for example:
`abc|def` will match either "abc" or "def".
The =|= operator will match either of its arguments, so for example:
=abc|def= will match either "abc" or "def".
Parenthesis can be used to group alternations, for example: `ab(d|ef)`
Parenthesis can be used to group alternations, for example: =ab(d|ef)=
will match either of "abd" or "abef".
Empty alternatives are not allowed (these are almost always a mistake), but
if you really want an empty alternative use `(?:)` as a placeholder, for example:
if you really want an empty alternative use =(?:)= as a placeholder, for example:
`|abc` is not a valid expression, but
=|abc= is not a valid expression, but
`(?:)|abc` is and is equivalent, also the expression:
=(?:)|abc= is and is equivalent, also the expression:
`(?:abc)??` has exactly the same effect.
=(?:abc)??= has exactly the same effect.
[h4 Character sets]
A character set is a bracket-expression starting with `[` and ending with `]`,
A character set is a bracket-expression starting with =[= and ending with =]=,
it defines a set of characters, and matches any single character that is a
member of that set.
@ -203,35 +214,35 @@ A bracket expression may contain any combination of the following:
[h5 Single characters]
For example `[abc]`, will match any of the characters 'a', 'b', or 'c'.
For example =[abc]=, will match any of the characters 'a', 'b', or 'c'.
[h5 Character ranges]
For example `[a-c]` will match any single character in the range 'a' to 'c'.
For example =[a-c]= will match any single character in the range 'a' to 'c'.
By default, for Perl regular expressions, a character x is within the
range y to z, if the code point of the character lies within the codepoints of
the endpoints of the range. Alternatively, if you set the
[link boost_regex.ref.syntax_option_type.syntax_option_type_perl `collate` flag]
[link boost_regex.ref.syntax_option_type.syntax_option_type_perl =collate= flag]
when constructing the regular expression, then ranges are locale sensitive.
[h5 Negation]
If the bracket-expression begins with the ^ character, then it matches the
complement of the characters it contains, for example `[^a-c]` matches
any character that is not in the range `a-c`.
complement of the characters it contains, for example =[^a-c]= matches
any character that is not in the range =a-c=.
[h5 Character classes]
An expression of the form `[[:name:]]` matches the named character class
"name", for example `[[:lower:]]` matches any lower case character.
An expression of the form [^\[\[:name:\]\]] matches the named character class
"name", for example [^\[\[:lower:\]\]] matches any lower case character.
See [link boost_regex.syntax.character_classes character class names].
[h5 Collating Elements]
An expression of the form `[[.col.]` matches the collating element /col/.
An expression of the form [^\[\[.col.\]\]] matches the collating element /col/.
A collating element is any single character, or any sequence of characters
that collates as a single unit. Collating elements may also be used
as the end point of a range, for example: `[[.ae.]-c]` matches the
as the end point of a range, for example: [^\[\[.ae.\]-c\]] matches the
character sequence "ae", plus any single character in the range "ae"-c,
assuming that "ae" is treated as a single collating element in the current locale.
@ -240,11 +251,11 @@ As an extension, a collating element may also be specified via it's
[[.NUL.]]
matches a `\0` character.
matches a =\0= character.
[h5 Equivalence classes]
An expression of the form `[[=col=]]`, matches any character or collating element
An expression of the form [^\[\[\=col\=\]\]], matches any character or collating element
whose primary sort key is the same as that for collating element /col/, as with
collating elements the name /col/ may be a
[link boost_regex.syntax.collating_names symbolic name]. A primary sort key is
@ -267,7 +278,7 @@ that is either a "digit", /or/ is /not/ a "word" character.
[h5 Combinations]
All of the above can be combined in one character set declaration, for example:
`[[:digit:]a-c[.NUL.]]`.
[^\[\[:digit:\]a-c\[.NUL.\]\]].
[h4 Escapes]
@ -277,24 +288,24 @@ The following escape sequences are all synonyms for single characters:
[table
[[Escape][Character]]
[[`\a`][`\a`]]
[[`\e`][`0x1B`]]
[[`\f`][`\f`]]
[[`\n`][`\n`]]
[[`\r`][`\r`]]
[[`\t`][`\t`]]
[[`\v `][`\v`]]
[[`\b`][`\b` (but only inside a character class declaration).]]
[[`\cX`][An ASCII escape sequence - the character whose code point is X % 32]]
[[`\xdd`][A hexadecimal escape sequence - matches the single character whose
[[=\a=][=\a=]]
[[=\e=][=0x1B=]]
[[=\f=][=\f=]]
[[=\n=][=\n=]]
[[=\r=][=\r=]]
[[=\t=][=\t=]]
[[=\v=][=\v=]]
[[=\b=][=\b= (but only inside a character class declaration).]]
[[=\cX=][An ASCII escape sequence - the character whose code point is X % 32]]
[[=\xdd=][A hexadecimal escape sequence - matches the single character whose
code point is 0xdd.]]
[[`\x{dddd}`][A hexadecimal escape sequence - matches the single character whose
[[=\x{dddd}=][A hexadecimal escape sequence - matches the single character whose
code point is 0xdddd.]]
[[`\0ddd`][An octal escape sequence - matches the single character whose
[[=\0ddd=][An octal escape sequence - matches the single character whose
code point is 0ddd.]]
[[`\N{name}`][Matches the single character which has the
[[=\N{name}=][Matches the single character which has the
[link boost_regex.syntax.collating_names symbolic name] /name/.
For example `\N{newline}` matches the single character \\n.]]
For example =\N{newline}= matches the single character \\n.]]
]
[h5 "Single character" character classes:]
@ -337,19 +348,19 @@ to the [link boost_regex.syntax.character_classes names used in character classe
[[`\P{Name}`][Matches any character that does not have the property Name.][`[^[:Name:]]`]]
]
For example `\pd` matches any "digit" character, as does `\p{digit}`.
For example =\pd= matches any "digit" character, as does =\p{digit}=.
[h5 Word Boundaries]
The following escape sequences match the boundaries of words:
`\<` Matches the start of a word.
=\<= Matches the start of a word.
`\>` Matches the end of a word.
=\>= Matches the end of a word.
`\b` Matches a word boundary (the start or end of a word).
=\b= Matches a word boundary (the start or end of a word).
`\B` Matches only when not at a word boundary.
=\B= Matches only when not at a word boundary.
[h5 Buffer boundaries]
@ -366,31 +377,45 @@ context is the whole of the input text that is being matched against
\\z Matches at the end of a buffer only (the same as \\').
\\Z Matches an optional sequence of newlines at the end of a buffer:
equivalent to the regular expression `\n*\z`
equivalent to the regular expression =\n*\z=
[h5 Continuation Escape]
The sequence `\G` matches only at the end of the last match found, or at
The sequence =\G= matches only at the end of the last match found, or at
the start of the text being matched if no previous match was found.
This escape useful if you're iterating over the matches contained within a
text, and you want each subsequence match to start where the last one ended.
[h5 Quoting escape]
The escape sequence `\Q` begins a "quoted sequence": all the subsequent characters
The escape sequence =\Q= begins a "quoted sequence": all the subsequent characters
are treated as literals, until either the end of the regular expression or \\E
is found. For example the expression: `\Q\*+\Ea+` would match either of:
is found. For example the expression: =\Q\*+\Ea+= would match either of:
\*+a
\*+aaa
[h5 Unicode escapes]
`\C` Matches a single code point: in Boost regex this has exactly the
=\C= Matches a single code point: in Boost regex this has exactly the
same effect as a "." operator.
`\X` Matches a combining character sequence: that is any non-combining
=\X= Matches a combining character sequence: that is any non-combining
character followed by a sequence of zero or more combining characters.
[h5 Matching Line Endings]
The escape sequence =\R= matches any line ending character sequence, specifically it is identical to
the expression [^(?>\x0D\x0A?|\[\x0A-\x0C\x85\x{2028}\x{2029}\])].
[h5 Keeping back some text]
=\K= Resets the start location of $0 to the current text position: in other words everything to the
left of \K is "kept back" and does not form part of the regular expression match. $` is updated
accordingly.
For example =foo\Kbar= matched against the text "foobar" would return the match "bar" for $0 and "foo"
for $`. This can be used to simulate variable width lookbehind assertions.
[h5 Any other escape]
Any other escape sequence matches the character that is escaped, for example
@ -398,31 +423,31 @@ Any other escape sequence matches the character that is escaped, for example
[h4 Perl Extended Patterns]
Perl-specific extensions to the regular expression syntax all start with `(?`.
Perl-specific extensions to the regular expression syntax all start with =(?=.
[h5 Comments]
`(?# ... )` is treated as a comment, it's contents are ignored.
=(?# ... )= is treated as a comment, it's contents are ignored.
[h5 Modifiers]
`(?imsx-imsx ... )` alters which of the perl modifiers are in effect within
=(?imsx-imsx ... )= alters which of the perl modifiers are in effect within
the pattern, changes take effect from the point that the block is first seen
and extend to any enclosing `)`. Letters before a '-' turn that perl
and extend to any enclosing =)=. Letters before a '-' turn that perl
modifier on, letters afterward, turn it off.
`(?imsx-imsx:pattern)` applies the specified modifiers to pattern only.
=(?imsx-imsx:pattern)= applies the specified modifiers to pattern only.
[h5 Non-marking groups]
`(?:pattern)` lexically groups pattern, without generating an additional
=(?:pattern)= lexically groups pattern, without generating an additional
sub-expression.
[h5 Lookahead]
`(?=pattern)` consumes zero characters, only if pattern matches.
[^(?=pattern)] consumes zero characters, only if pattern matches.
`(?!pattern)` consumes zero characters, only if pattern does not match.
=(?!pattern)= consumes zero characters, only if pattern does not match.
Lookahead is typically used to create the logical AND of two regular
expressions, for example if a password must contain a lower case letter,
@ -435,17 +460,17 @@ could be used to validate the password.
[h5 Lookbehind]
`(?<=pattern)` consumes zero characters, only if pattern could be matched
[^(?<=pattern)] consumes zero characters, only if pattern could be matched
against the characters preceding the current position (pattern must be
of fixed length).
`(?<!pattern)` consumes zero characters, only if pattern could not be
=(?<!pattern)= consumes zero characters, only if pattern could not be
matched against the characters preceding the current position (pattern must
be of fixed length).
[h5 Independent sub-expressions]
`(?>pattern)` /pattern/ is matched independently of the surrounding patterns,
=(?>pattern)= /pattern/ is matched independently of the surrounding patterns,
the expression will never backtrack into /pattern/. Independent sub-expressions
are typically used to improve performance; only the best possible match
for pattern will be considered, if this doesn't allow the expression as a
@ -453,10 +478,10 @@ whole to match then no match is found at all.
[h5 Conditional Expressions]
`(?(condition)yes-pattern|no-pattern)` attempts to match /yes-pattern/ if
=(?(condition)yes-pattern|no-pattern)= attempts to match /yes-pattern/ if
the /condition/ is true, otherwise attempts to match /no-pattern/.
`(?(condition)yes-pattern)` attempts to match /yes-pattern/ if the /condition/
=(?(condition)yes-pattern)= attempts to match /yes-pattern/ if the /condition/
is true, otherwise fails.
/condition/ may be either a forward lookahead assert, or the index of
@ -468,10 +493,10 @@ has been matched).
The order of precedence for of operators is as follows:
# Collation-related bracket symbols `[==] [::] [..]`
# Escaped characters `\`
# Escaped characters =\=
# Character set (bracket expression) `[]`
# Grouping `()`
# Single-character-ERE duplication `* + ? {m,n}`
# Grouping =()=
# Single-character-ERE duplication =* + ? {m,n}=
# Concatenation
# Anchoring ^$
# Alternation |
@ -490,42 +515,42 @@ with individual elements matched as follows;
[table
[[Construct][What gets matched]]
[[`AtomA AtomB`][Locates the best match for /AtomA/ that has a following match for /AtomB/.]]
[[`Expression1 | Expression2`][If /Expresion1/ can be matched then returns that match,
[[=AtomA AtomB=][Locates the best match for /AtomA/ that has a following match for /AtomB/.]]
[[=Expression1 | Expression2=][If /Expresion1/ can be matched then returns that match,
otherwise attempts to match /Expression2/.]]
[[`S{N}`][Matches /S/ repeated exactly N times.]]
[[`S{N,M}`][Matches S repeated between N and M times, and as many times as possible.]]
[[`S{N,M}?`][Matches S repeated between N and M times, and as few times as possible.]]
[[`S?, S*, S+`][The same as `S{0,1}`, `S{0,UINT_MAX}`, `S{1,UINT_MAX}` respectively.]]
[[`S??, S*?, S+?`][The same as `S{0,1}?`, `S{0,UINT_MAX}?`, `S{1,UINT_MAX}?` respectively.]]
[[`(?>S)`][Matches the best match for /S/, and only that.]]
[[`(?=S), (?<=S)`][Matches only the best match for /S/ (this is only
[[=S{N}=][Matches /S/ repeated exactly N times.]]
[[=S{N,M}=][Matches S repeated between N and M times, and as many times as possible.]]
[[=S{N,M}?=][Matches S repeated between N and M times, and as few times as possible.]]
[[=S?, S*, S+=][The same as =S{0,1}=, =S{0,UINT_MAX}=, =S{1,UINT_MAX}= respectively.]]
[[=S??, S*?, S+?=][The same as =S{0,1}?=, =S{0,UINT_MAX}?=, =S{1,UINT_MAX}?= respectively.]]
[[=(?>S)=][Matches the best match for /S/, and only that.]]
[[[^(?=S), (?<=S)]][Matches only the best match for /S/ (this is only
visible if there are capturing parenthesis within /S/).]]
[[`(?!S), (?<!S)`][Considers only whether a match for S exists or not.]]
[[`(?(condition)yes-pattern | no-pattern)`][If condition is true, then
[[=(?!S), (?<!S)=][Considers only whether a match for S exists or not.]]
[[=(?(condition)yes-pattern | no-pattern)=][If condition is true, then
only yes-pattern is considered, otherwise only no-pattern is considered.]]
]
[h3 Variations]
The [link boost_regex.ref.syntax_option_type.syntax_option_type_perl options `normal`,
`ECMAScript`, `JavaScript` and `JScript`] are all synonyms for
`perl`.
The [link boost_regex.ref.syntax_option_type.syntax_option_type_perl options =normal=,
=ECMAScript=, =JavaScript= and =JScript=] are all synonyms for
=perl=.
[h3 Options]
There are a [link boost_regex.ref.syntax_option_type.syntax_option_type_perl
variety of flags] that may be combined with the `perl` option when
variety of flags] that may be combined with the =perl= option when
constructing the regular expression, in particular note that the
`newline_alt` option alters the syntax, while the `collate`, `nosubs` and
`icase` options modify how the case and locale sensitivity are to be applied.
=newline_alt= option alters the syntax, while the =collate=, =nosubs= and
=icase= options modify how the case and locale sensitivity are to be applied.
[h3 Pattern Modifiers]
The perl `smix` modifiers can either be applied using a `(?smix-smix)`
The perl =smix= modifiers can either be applied using a =(?smix-smix)=
prefix to the regular expression, or with one of the
[link boost_regex.ref.syntax_option_type.syntax_option_type_perl regex-compile time
flags `no_mod_m`, `mod_x`, `mod_s`, and `no_mod_s`].
flags =no_mod_m=, =mod_x=, =mod_s=, and =no_mod_s=].
[h3 References]

View File

@ -720,7 +720,89 @@ escape_type_class_jump:
return true;
}
fail(regex_constants::error_ctype, m_position - m_base);
return false;
}
case regex_constants::escape_type_reset_start_mark:
if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
{
re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
pb->index = -5;
this->m_pdata->m_data.align();
++m_position;
return true;
}
goto escape_type_class_jump;
case regex_constants::escape_type_line_ending:
if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
{
const charT* e = get_escape_R_string<charT>();
const charT* old_position = m_position;
const charT* old_end = m_end;
const charT* old_base = m_base;
m_position = e;
m_base = e;
m_end = e + traits::length(e);
bool r = parse_all();
m_position = ++old_position;
m_end = old_end;
m_base = old_base;
return r;
}
goto escape_type_class_jump;
case regex_constants::escape_type_extended_backref:
if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
{
bool have_brace = false;
bool negative = false;
if(++m_position == m_end)
{
fail(regex_constants::error_escape, m_position - m_base);
return false;
}
// maybe have \g{ddd}
if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace)
{
if(++m_position == m_end)
{
fail(regex_constants::error_escape, m_position - m_base);
return false;
}
have_brace = true;
}
negative = (*m_position == static_cast<charT>('-'));
if((negative) && (++m_position == m_end))
{
fail(regex_constants::error_escape, m_position - m_base);
return false;
}
const charT* pc = m_position;
int i = this->m_traits.toi(pc, m_end, 10);
if(negative)
i = 1 + m_mark_count - i;
if((i > 0) && (this->m_backrefs & (1u << (i-1))))
{
m_position = pc;
re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_backref, sizeof(re_brace)));
pb->index = i;
}
else
{
fail(regex_constants::error_backref, m_position - m_end);
return false;
}
m_position = pc;
if(have_brace)
{
if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
{
fail(regex_constants::error_escape, m_position - m_base);
return false;
}
++m_position;
}
return true;
}
goto escape_type_class_jump;
case regex_constants::escape_type_control_v:
if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
goto escape_type_class_jump;
@ -1499,7 +1581,7 @@ charT basic_regex_parser<charT, traits>::unescape_character()
int i = this->m_traits.toi(m_position, m_end, 16);
if((m_position == m_end)
|| (i < 0)
|| ((std::numeric_limits<charT>::is_specialized) && (charT(i) > (std::numeric_limits<charT>::max)()))
|| ((std::numeric_limits<charT>::is_specialized) && (i > (int)(std::numeric_limits<charT>::max)()))
|| (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
{
fail(regex_constants::error_badbrace, m_position - m_base);

View File

@ -230,13 +230,13 @@ public:
m_null.matched = false;
}
void BOOST_REGEX_CALL set_second(BidiIterator i, size_type pos, bool m = true)
void BOOST_REGEX_CALL set_second(BidiIterator i, size_type pos, bool m = true, bool escape_k = false)
{
pos += 2;
BOOST_ASSERT(m_subs.size() > pos);
m_subs[pos].second = i;
m_subs[pos].matched = m;
if(pos == 2)
if((pos == 2) && !escape_k)
{
m_subs[0].first = i;
m_subs[0].matched = (m_subs[0].first != m_subs[0].second);
@ -284,11 +284,18 @@ public:
m_subs[n].matched = false;
}
}
void BOOST_REGEX_CALL set_first(BidiIterator i, size_type pos)
void BOOST_REGEX_CALL set_first(BidiIterator i, size_type pos, bool escape_k = false)
{
BOOST_ASSERT(pos+2 < m_subs.size());
if(pos)
if(pos || escape_k)
{
m_subs[pos+2].first = i;
if(escape_k)
{
m_subs[1].second = i;
m_subs[1].matched = (m_subs[1].first != m_subs[1].second);
}
}
else
set_first(i);
}

View File

@ -205,7 +205,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_imp()
verify_options(re.flags(), m_match_flags);
if(0 == match_prefix())
return false;
return m_result[0].second == last;
return (m_result[0].second == last) && (m_result[0].first == base);
#if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_NO_EXCEPTIONS)
}

View File

@ -213,7 +213,7 @@ void perl_matcher<BidiIterator, Allocator, traits>::extend_stack()
template <class BidiIterator, class Allocator, class traits>
inline void perl_matcher<BidiIterator, Allocator, traits>::push_matched_paren(int index, const sub_match<BidiIterator>& sub)
{
BOOST_ASSERT(index);
//BOOST_ASSERT(index);
saved_matched_paren<BidiIterator>* pmp = static_cast<saved_matched_paren<BidiIterator>*>(m_backup_state);
--pmp;
if(pmp < m_stack_base)
@ -404,6 +404,13 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_startmark()
break;
}
}
case -5:
{
push_matched_paren(0, (*m_presult)[0]);
m_presult->set_first(position, 0, true);
pstate = pstate->next.p;
break;
}
default:
{
BOOST_ASSERT(index > 0);
@ -911,8 +918,8 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_paren(bool have_match
// restore previous values if no match was found:
if(have_match == false)
{
m_presult->set_first(pmp->sub.first, pmp->index);
m_presult->set_second(pmp->sub.second, pmp->index, pmp->sub.matched);
m_presult->set_first(pmp->sub.first, pmp->index, pmp->index == 0);
m_presult->set_second(pmp->sub.second, pmp->index, pmp->sub.matched, pmp->index == 0);
}
#ifdef BOOST_REGEX_MATCH_EXTRA
//

View File

@ -51,8 +51,8 @@ public:
template <class A>
void restore(match_results<BidiIterator, A>& w)
{
w.set_first(sub.first, index);
w.set_second(sub.second, index, sub.matched);
w.set_first(sub.first, index, index == 0);
w.set_second(sub.second, index, sub.matched, index == 0);
}
const sub_match<BidiIterator>& get() { return sub; }
};
@ -209,6 +209,17 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_startmark()
break;
}
}
case -5:
{
// Reset start of $0, since we have a \K escape
backup_subex<BidiIterator> sub(*m_presult, 0);
m_presult->set_first(position, 0, true);
pstate = pstate->next.p;
r = match_all_states();
if(r == false)
sub.restore(*m_presult);
break;
}
default:
{
BOOST_ASSERT(index > 0);

View File

@ -317,6 +317,28 @@ int global_toi(const charT*& p1, const charT* p2, int radix, const traits& t)
return result;
}
template <class charT>
inline const charT* get_escape_R_string()
{
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable:4309)
#endif
static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?',
'|', '[', '\x0A', '\x0B', '\x0C', '\x85', '\\', 'x', '{', '2', '0', '2', '8', '}',
'\\', 'x', '{', '2', '0', '2', '9', '}', ']', ')' };
static const charT e2[] = { '(', '?', '>', '\x0D', '\x0A', '?',
'|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')' };
charT c = static_cast<charT>(0x2029u);
bool b = (static_cast<unsigned>(c) == 0x2029u);
return (b ? e1 : e2);
#ifdef BOOST_MSVC
# pragma warning(pop)
#endif
}
} // re_detail
} // boost

View File

@ -92,8 +92,11 @@ static const escape_syntax_type escape_type_G = 52; /
static const escape_syntax_type escape_type_property = 54; // for \p
static const escape_syntax_type escape_type_not_property = 55; // for \P
static const escape_syntax_type escape_type_named_char = 56; // for \N
static const escape_syntax_type escape_type_extended_backref = 57; // for \g
static const escape_syntax_type escape_type_reset_start_mark = 58; // for \K
static const escape_syntax_type escape_type_line_ending = 59; // for \R
static const escape_syntax_type syntax_max = 57;
static const escape_syntax_type syntax_max = 60;
}
}

View File

@ -100,6 +100,9 @@ BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_syntax(regex_constants
"p",
"P",
"N",
"g",
"K",
"R",
};
return ((n >= (sizeof(messages) / sizeof(messages[1]))) ? "" : messages[n]);
@ -375,14 +378,14 @@ BOOST_REGEX_DECL regex_constants::escape_syntax_type BOOST_REGEX_CALL get_defaul
regex_constants::escape_type_not_class, /*H*/
regex_constants::escape_type_not_class, /*I*/
regex_constants::escape_type_not_class, /*J*/
regex_constants::escape_type_not_class, /*K*/
regex_constants::escape_type_reset_start_mark, /*K*/
regex_constants::escape_type_not_class, /*L*/
regex_constants::escape_type_not_class, /*M*/
regex_constants::escape_type_named_char, /*N*/
regex_constants::escape_type_not_class, /*O*/
regex_constants::escape_type_not_property, /*P*/
regex_constants::escape_type_Q, /*Q*/
regex_constants::escape_type_not_class, /*R*/
regex_constants::escape_type_line_ending, /*R*/
regex_constants::escape_type_not_class, /*S*/
regex_constants::escape_type_not_class, /*T*/
regex_constants::escape_type_not_class, /*U*/
@ -403,11 +406,11 @@ BOOST_REGEX_DECL regex_constants::escape_syntax_type BOOST_REGEX_CALL get_defaul
regex_constants::escape_type_class, /*d*/
regex_constants::escape_type_e, /*e*/
regex_constants::escape_type_control_f, /*f*/
regex_constants::escape_type_class, /*g*/
regex_constants::escape_type_extended_backref, /*g*/
regex_constants::escape_type_class, /*h*/
regex_constants::escape_type_class, /*i*/
regex_constants::escape_type_class, /*j*/
regex_constants::escape_type_class, /*k*/
regex_constants::escape_type_extended_backref, /*k*/
regex_constants::escape_type_class, /*l*/
regex_constants::escape_type_class, /*m*/
regex_constants::escape_type_control_n, /*n*/

View File

@ -55,5 +55,40 @@ void test_backrefs()
TEST_REGEX_SEARCH("\\(a\\)\\1bc*[ce]d", basic, "aabcccd", match_default, make_array(0, 7, 0, 1, -2, -2));
TEST_REGEX_SEARCH("^\\(a\\)\\1b\\(c\\)*cd$", basic, "aabcccd", match_default, make_array(0, 7, 0, 1, 4, 5, -2, -2));
TEST_REGEX_SEARCH("\\(ab*\\)[ab]*\\1", basic, "ababaaa", match_default, make_array(0, 7, 0, 1, -2, -2));
//
// Now test the \g version:
//
TEST_INVALID_REGEX("a(b)\\g2c", perl);
TEST_INVALID_REGEX("a(b\\g1)c", perl);
TEST_INVALID_REGEX("a(b\\g0)c", perl);
TEST_REGEX_SEARCH("a(b*)c\\g1d", perl, "abbcbbd", match_default, make_array(0, 7, 1, 3, -2, -2));
TEST_REGEX_SEARCH("a(b*)c\\g1d", perl, "abbcbd", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("a(b*)c\\g1d", perl, "abbcbbbd", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("^(.)\\g1", perl, "abc", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("a([bc])\\g1d", perl, "abcdabbd", match_default, make_array(4, 8, 5, 6, -2, -2));
TEST_INVALID_REGEX("a(b)\\g{2}c", perl);
TEST_INVALID_REGEX("a(b\\g{1})c", perl);
TEST_INVALID_REGEX("a(b\\g{0})c", perl);
TEST_REGEX_SEARCH("a(b*)c\\g{1}d", perl, "abbcbbd", match_default, make_array(0, 7, 1, 3, -2, -2));
TEST_REGEX_SEARCH("a(b*)c\\g{1}d", perl, "abbcbd", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("a(b*)c\\g{1}d", perl, "abbcbbbd", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("^(.)\\g{1}", perl, "abc", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("a([bc])\\g{1}d", perl, "abcdabbd", match_default, make_array(4, 8, 5, 6, -2, -2));
// And again but with negative indexes:
TEST_INVALID_REGEX("a(b)\\g-2c", perl);
TEST_INVALID_REGEX("a(b\\g-1)c", perl);
TEST_INVALID_REGEX("a(b\\g-0)c", perl);
TEST_REGEX_SEARCH("a(b*)c\\g-1d", perl, "abbcbbd", match_default, make_array(0, 7, 1, 3, -2, -2));
TEST_REGEX_SEARCH("a(b*)c\\g-1d", perl, "abbcbd", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("a(b*)c\\g-1d", perl, "abbcbbbd", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("^(.)\\g1", perl, "abc", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("a([bc])\\g1d", perl, "abcdabbd", match_default, make_array(4, 8, 5, 6, -2, -2));
TEST_INVALID_REGEX("a(b)\\g{-2}c", perl);
TEST_INVALID_REGEX("a(b\\g{-1})c", perl);
TEST_REGEX_SEARCH("a(b*)c\\g{-1}d", perl, "abbcbbd", match_default, make_array(0, 7, 1, 3, -2, -2));
TEST_REGEX_SEARCH("a(b*)c\\g{-1}d", perl, "abbcbd", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("a(b*)c\\g{-1}d", perl, "abbcbbbd", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("^(.)\\g{-1}", perl, "abc", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("a([bc])\\g{-1}d", perl, "abcdabbd", match_default, make_array(4, 8, 5, 6, -2, -2));
}

View File

@ -144,5 +144,23 @@ void test_assertion_escapes()
TEST_REGEX_SEARCH("a\\Gbc", perl, "abc", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("a\\Aab", perl, "abc", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("abc(?:\\Z|$)", perl, "abc\n\n", match_default, make_array(0, 3, -2, -2));
// Buffer reset \K:
TEST_REGEX_SEARCH("(foo)\\Kbar", perl, "foobar", match_default, make_array(3, 6, 0, 3, -2, -2));
TEST_REGEX_SEARCH("(foo)(\\Kbar|baz)", perl, "foobar", match_default, make_array(3, 6, 0, 3, 3, 6, -2, -2));
TEST_REGEX_SEARCH("(foo)(\\Kbar|baz)", perl, "foobaz", match_default, make_array(0, 6, 0, 3, 3, 6, -2, -2));
TEST_REGEX_SEARCH("(foo\\Kbar)baz", perl, "foobarbaz", match_default, make_array(3, 9, 0, 6, -2, -2));
// Line ending \R:
TEST_REGEX_SEARCH("\\R", perl, "foo\nbar", match_default, make_array(3, 4, -2, -2));
TEST_REGEX_SEARCH("\\R", perl, "foo\rbar", match_default, make_array(3, 4, -2, -2));
TEST_REGEX_SEARCH("\\R", perl, "foo\r\nbar", match_default, make_array(3, 5, -2, -2));
// see if \u works:
const wchar_t* w = "\u2028";
if(*w == 0x2028u)
{
TEST_REGEX_SEARCH_W(L"\\R", perl, L"foo\u2028bar", match_default, make_array(3, 4, -2, -2));
TEST_REGEX_SEARCH_W(L"\\R", perl, L"foo\u2029bar", match_default, make_array(3, 4, -2, -2));
}
}