forked from boostorg/regex
@ -22,7 +22,7 @@ rule check-icu-config ( )
|
||||
|
||||
if ! $(gICU_CONFIG_CHECKED)
|
||||
{
|
||||
if $(HAVE_ICU)
|
||||
if $(HAVE_ICU) && ! $(ICU_PATH)
|
||||
{
|
||||
gHAS_ICU = true ;
|
||||
gICU_CORE_LIB = icuuc ;
|
||||
@ -79,6 +79,10 @@ rule check-icu-config ( )
|
||||
{
|
||||
gICU_IN_LIB = icuin ;
|
||||
}
|
||||
else if [ GLOB $(dir)/lib : icui18n.* ]
|
||||
{
|
||||
gICU_IN_LIB = icui18n ;
|
||||
}
|
||||
else if [ GLOB $(dir)/lib64 : libicui18n.* ]
|
||||
{
|
||||
gICU_IN_LIB = icui18n ;
|
||||
|
@ -33,6 +33,15 @@ order to prevent ambiguities.
|
||||
For example, the format string "(?1foo:bar)" will replace each match found with "foo" if
|
||||
the sub-expression $1 was matched, and with "bar" otherwise.
|
||||
|
||||
For sub-expressions with an index greater than 9, or for access to named sub-expressions use:
|
||||
|
||||
?{INDEX}true-expression:false-expression
|
||||
|
||||
or
|
||||
|
||||
?{NAME}true-expression:false-expression
|
||||
|
||||
|
||||
[h4 Placeholder Sequences]
|
||||
|
||||
Placeholder sequences specify that some part of what matched the regular expression
|
||||
@ -41,12 +50,24 @@ should be sent to output as follows:
|
||||
[table
|
||||
[[Placeholder][Meaning]]
|
||||
[[$&][Outputs what matched the whole expression.]]
|
||||
[[$`][Outputs the text between the end of the last match found (or the
|
||||
start of the text if no previous match was found), and the start
|
||||
of the current match.]]
|
||||
[[$MATCH][As $&]]
|
||||
[[${^MATCH}][As $&]]
|
||||
[[$\`][Outputs the text between the end of the last match found (or the
|
||||
start of the text if no previous match was found), and the start
|
||||
of the current match.]]
|
||||
[[$PREMATCH][As $\`]]
|
||||
[[${^PREMATCH}][As $\`]]
|
||||
[[$'][Outputs all the text following the end of the current match.]]
|
||||
[[$POSTMATCH][As $']]
|
||||
[[${^POSTMATCH}][As $']]
|
||||
[[$+][Outputs what matched the last marked sub-expression in the regular expression.]]
|
||||
[[$LAST_PAREN_MATCH][As $+]]
|
||||
[[$LAST_SUBMATCH_RESULT][Outputs what matched the last sub-expression to be actually matched.]]
|
||||
[[$^N][As $LAST_SUBMATCH_RESULT]]
|
||||
[[$$][Outputs a literal '$']]
|
||||
[[$n][Outputs what matched the n'th sub-expression.]]
|
||||
[[${n}][Outputs what matched the n'th sub-expression.]]
|
||||
[[$+{NAME}][Outputs whatever matched the sub-expression named "NAME".]]
|
||||
]
|
||||
|
||||
Any $-placeholder sequence not listed above, results in '$' being treated as a literal.
|
||||
|
@ -17,13 +17,24 @@ should be sent to output as follows:
|
||||
[table
|
||||
[[Placeholder][Meaning]]
|
||||
[[$&][Outputs what matched the whole expression.]]
|
||||
[[$`][Outputs the text between the end of the last match found (or the
|
||||
[[$MATCH][As $&]]
|
||||
[[${^MATCH}][As $&]]
|
||||
[[$\`][Outputs the text between the end of the last match found (or the
|
||||
start of the text if no previous match was found), and the start
|
||||
of the current match.]]
|
||||
[[$PREMATCH][As $\`]]
|
||||
[[${^PREMATCH}][As $\`]]
|
||||
[[$'][Outputs all the text following the end of the current match.]]
|
||||
[[$POSTMATCH][As $']]
|
||||
[[${^POSTMATCH}][As $']]
|
||||
[[$+][Outputs what matched the last marked sub-expression in the regular expression.]]
|
||||
[[$LAST_PAREN_MATCH][As $+]]
|
||||
[[$LAST_SUBMATCH_RESULT][Outputs what matched the last sub-expression to be actually matched.]]
|
||||
[[$^N][As $LAST_SUBMATCH_RESULT]]
|
||||
[[$$][Outputs a literal '$']]
|
||||
[[$n][Outputs what matched the n'th sub-expression.]]
|
||||
[[${n}][Outputs what matched the n'th sub-expression.]]
|
||||
[[$+{NAME}][Outputs whatever matched the sub-expression named "NAME".]]
|
||||
]
|
||||
|
||||
Any $-placeholder sequence not listed above, results in '$' being treated
|
||||
|
@ -8,6 +8,11 @@
|
||||
|
||||
[section:history History]
|
||||
|
||||
[h4 Boost 1.40]
|
||||
|
||||
* Added support for many Perl 5.10 syntax elements including named
|
||||
sub-expressions, branch resets and recursive regular expressions.
|
||||
|
||||
[h4 Boost 1.38]
|
||||
|
||||
* [*Breaking change]: empty expressions, and empty alternatives are now
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Background Information</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="ref/deprecated_interfaces/old_regex.html" title="High Level Class RegEx (Deprecated)">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Acknowledgements</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="redist.html" title="Redistributables">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Test and Example Programs</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="thread_safety.html" title="Thread Safety">
|
||||
@ -28,7 +28,7 @@
|
||||
Example Programs</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.background_information.examples.test_programs"></a><h5>
|
||||
<a name="id685550"></a>
|
||||
<a name="id805166"></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="id685938"></a>
|
||||
<a name="id805469"></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="id686019"></a>
|
||||
<a name="id805528"></a>
|
||||
<a class="link" href="examples.html#boost_regex.background_information.examples.code_snippets">Code
|
||||
snippets</a>
|
||||
</h5>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>FAQ</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="futher.html" title="References and Further Information">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>References and Further Information</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="examples.html" title="Test and Example Programs">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Headers</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="../background_information.html" title="Background Information">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>History</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="acknowledgements.html" title="Acknowledgements">
|
||||
@ -25,8 +25,17 @@
|
||||
<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>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_40"></a><h5>
|
||||
<a name="id807313"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_40">Boost
|
||||
1.40</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc"><li>
|
||||
Added support for many Perl 5.10 syntax elements including named sub-expressions,
|
||||
branch resets and recursive regular expressions.
|
||||
</li></ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_38"></a><h5>
|
||||
<a name="id688173"></a>
|
||||
<a name="id807333"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_38">Boost
|
||||
1.38</a>
|
||||
</h5>
|
||||
@ -36,7 +45,7 @@
|
||||
empty alternatives are now allowed when using the Perl regular expression
|
||||
syntax. This change has been added for Perl compatibility, when the new
|
||||
<a class="link" href="../ref/syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a><span class="emphasis"><em>no_empty_expressions</em></span> is set then the old behaviour
|
||||
is preserved and empty expressions are prohibited.
|
||||
is preserved and empty expressions are prohibited. This is issue <a href="https://svn.boost.org/trac/boost/ticket/1081" target="_top">#1081</a>.
|
||||
</li>
|
||||
<li>
|
||||
Added support for Perl style ${n} expressions in format strings (issue
|
||||
@ -53,7 +62,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_34"></a><h5>
|
||||
<a name="id688292"></a>
|
||||
<a name="id807411"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_34">Boost
|
||||
1.34</a>
|
||||
</h5>
|
||||
@ -76,7 +85,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_33_1"></a><h5>
|
||||
<a name="id688343"></a>
|
||||
<a name="id807442"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_1">Boost
|
||||
1.33.1</a>
|
||||
</h5>
|
||||
@ -146,7 +155,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_33_0"></a><h5>
|
||||
<a name="id688472"></a>
|
||||
<a name="id807522"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_0">Boost
|
||||
1.33.0</a>
|
||||
</h5>
|
||||
@ -201,7 +210,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_32_1"></a><h5>
|
||||
<a name="id688569"></a>
|
||||
<a name="id807580"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_32_1">Boost
|
||||
1.32.1</a>
|
||||
</h5>
|
||||
@ -209,7 +218,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="id688603"></a>
|
||||
<a name="id807601"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_31_0">Boost
|
||||
1.31.0</a>
|
||||
</h5>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Localization</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="headers.html" title="Headers">
|
||||
@ -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="id682058"></a>
|
||||
<a name="id802331"></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="id682296"></a>
|
||||
<a name="id802486"></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="id682409"></a>
|
||||
<a name="id802554"></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"><</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">></span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.locale.providing_a_message_catalogue"></a><h5>
|
||||
<a name="id682868"></a>
|
||||
<a name="id802855"></a>
|
||||
<a class="link" href="locale.html#boost_regex.background_information.locale.providing_a_message_catalogue">Providing
|
||||
a message catalogue</a>
|
||||
</h5>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Performance</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="faq.html" title="FAQ">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Redistributables</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="standards.html" title="Standards Conformance">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Standards Conformance</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="performance.html" title="Performance">
|
||||
@ -28,7 +28,7 @@
|
||||
Conformance</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.background_information.standards.c__"></a><h5>
|
||||
<a name="id686998"></a>
|
||||
<a name="id806454"></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="id687036"></a>
|
||||
<a name="id806475"></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="id687075"></a>
|
||||
<a name="id806496"></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="id687114"></a>
|
||||
<a name="id806520"></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="id687161"></a>
|
||||
<a name="id806544"></a>
|
||||
<a class="link" href="standards.html#boost_regex.background_information.standards.unicode">Unicode</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Thread Safety</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="locale.html" title="Localization">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Understanding Marked Sub-Expressions and Captures</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="unicode.html" title="Unicode and Boost.Regex">
|
||||
@ -35,7 +35,7 @@
|
||||
accessed.
|
||||
</p>
|
||||
<a name="boost_regex.captures.marked_sub_expressions"></a><h5>
|
||||
<a name="id530356"></a>
|
||||
<a name="id648883"></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="id530979"></a>
|
||||
<a name="id649339"></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="id531042"></a>
|
||||
<a name="id649379"></a>
|
||||
<a class="link" href="captures.html#boost_regex.captures.repeated_captures">Repeated Captures</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Configuration</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="../index.html" title="Boost.Regex">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Algorithm Selection</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../configuration.html" title="Configuration">
|
||||
<link rel="prev" href="linkage.html" title="Linkage Options">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Compiler Setup</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../configuration.html" title="Configuration">
|
||||
<link rel="prev" href="../configuration.html" title="Configuration">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Linkage Options</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../configuration.html" title="Configuration">
|
||||
<link rel="prev" href="locale.html" title="Locale and traits class selection">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Locale and traits class selection</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../configuration.html" title="Configuration">
|
||||
<link rel="prev" href="compiler.html" title="Compiler Setup">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Algorithm Tuning</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../configuration.html" title="Configuration">
|
||||
<link rel="prev" href="algorithm.html" title="Algorithm Selection">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Search and Replace Format String Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="syntax/leftmost_longest_rule.html" title="The Leftmost Longest Rule">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Boost-Extended Format String Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../format.html" title="Search and Replace Format String Syntax">
|
||||
<link rel="prev" href="perl_format.html" title="Perl Format String Syntax">
|
||||
@ -32,7 +32,7 @@
|
||||
'$', '\', '(', ')', '?', and ':'.
|
||||
</p>
|
||||
<a name="boost_regex.format.boost_format_syntax.grouping"></a><h5>
|
||||
<a name="id552944"></a>
|
||||
<a name="id670774"></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="id552974"></a>
|
||||
<a name="id670790"></a>
|
||||
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.conditionals">Conditionals</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -65,8 +65,21 @@
|
||||
match found with "foo" if the sub-expression $1 was matched, and
|
||||
with "bar" otherwise.
|
||||
</p>
|
||||
<p>
|
||||
For sub-expressions with an index greater than 9, or for access to named
|
||||
sub-expressions use:
|
||||
</p>
|
||||
<p>
|
||||
?{INDEX}true-expression:false-expression
|
||||
</p>
|
||||
<p>
|
||||
or
|
||||
</p>
|
||||
<p>
|
||||
?{NAME}true-expression:false-expression
|
||||
</p>
|
||||
<a name="boost_regex.format.boost_format_syntax.placeholder_sequences"></a><h5>
|
||||
<a name="id553032"></a>
|
||||
<a name="id670843"></a>
|
||||
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.placeholder_sequences">Placeholder
|
||||
Sequences</a>
|
||||
</h5>
|
||||
@ -105,6 +118,30 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$MATCH
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $&
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
${^MATCH}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $&
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$`
|
||||
@ -119,6 +156,30 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$PREMATCH
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $`
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
${^PREMATCH}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $`
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$'
|
||||
@ -131,6 +192,79 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$POSTMATCH
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $'
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
${^POSTMATCH}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $'
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$+
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Outputs what matched the last marked sub-expression in the regular
|
||||
expression.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$LAST_PAREN_MATCH
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $+
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$LAST_SUBMATCH_RESULT
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Outputs what matched the last sub-expression to be actually matched.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$^N
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $LAST_SUBMATCH_RESULT
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$$
|
||||
@ -154,6 +288,30 @@
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
${n}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Outputs what matched the n'th sub-expression.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$+{NAME}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Outputs whatever matched the sub-expression named "NAME".
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<p>
|
||||
@ -161,7 +319,7 @@
|
||||
as a literal.
|
||||
</p>
|
||||
<a name="boost_regex.format.boost_format_syntax.escape_sequences"></a><h5>
|
||||
<a name="id553203"></a>
|
||||
<a name="id671186"></a>
|
||||
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.escape_sequences">Escape
|
||||
Sequences</a>
|
||||
</h5>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Perl Format String Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../format.html" title="Search and Replace Format String Syntax">
|
||||
<link rel="prev" href="sed_format.html" title="Sed Format String Syntax">
|
||||
@ -65,6 +65,30 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$MATCH
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $&
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
${^MATCH}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $&
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$`
|
||||
@ -79,6 +103,30 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$PREMATCH
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $`
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
${^PREMATCH}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $`
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$'
|
||||
@ -91,6 +139,79 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$POSTMATCH
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $'
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
${^POSTMATCH}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $'
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$+
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Outputs what matched the last marked sub-expression in the regular
|
||||
expression.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$LAST_PAREN_MATCH
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $+
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$LAST_SUBMATCH_RESULT
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Outputs what matched the last sub-expression to be actually matched.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$^N
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
As $LAST_SUBMATCH_RESULT
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$$
|
||||
@ -126,6 +247,18 @@
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
$+{NAME}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Outputs whatever matched the sub-expression named "NAME".
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Sed Format String Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../format.html" title="Search and Replace Format String Syntax">
|
||||
<link rel="prev" href="../format.html" title="Search and Replace Format String Syntax">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Building and Installing the Library</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="configuration/tuning.html" title="Algorithm Tuning">
|
||||
@ -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="id473594"></a>
|
||||
<a name="id646143"></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="id473628"></a>
|
||||
<a name="id646167"></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="id473176"></a>
|
||||
<a name="id646286"></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="id473199"></a>
|
||||
<a name="id646299"></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="id527567"></a>
|
||||
<a name="id646538"></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="id527884"></a>
|
||||
<a name="id646737"></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="id528091"></a>
|
||||
<a name="id646863"></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="id528312"></a>
|
||||
<a name="id647007"></a>
|
||||
<a class="link" href="install.html#boost_regex.install.makefiles_for_other_compilers">Makefiles
|
||||
for Other compilers</a>
|
||||
</h6>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Introduction and Overview</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="install.html" title="Building and Installing the Library">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Partial Matches</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="captures.html" title="Understanding Marked Sub-Expressions and Captures">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="format/boost_format_syntax.html" title="Boost-Extended Format String Syntax">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>bad_expression</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="regex_token_iterator.html" title="regex_token_iterator">
|
||||
@ -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="id633887"></a>
|
||||
<a name="id754064"></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"><</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">></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="id634390"></a>
|
||||
<a name="id754425"></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">&</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>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>basic_regex</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="../ref.html" title="Reference">
|
||||
@ -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="id553616"></a>
|
||||
<a name="id671530"></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"><</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">></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="id559592"></a>
|
||||
<a name="id676186"></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="id561527"></a><p class="title"><b>Table<EFBFBD>1.<2E>basic_regex default construction postconditions</b></p>
|
||||
<a name="id679189"></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="id561926"></a><p class="title"><b>Table<EFBFBD>2.<2E>Postconditions for basic_regex construction</b></p>
|
||||
<a name="id679487"></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="id562472"></a><p class="title"><b>Table<EFBFBD>3.<2E>Postconditions for basic_regex construction</b></p>
|
||||
<a name="id679900"></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="id563006"></a><p class="title"><b>Table<EFBFBD>4.<2E>Postconditions for basic_regex construction</b></p>
|
||||
<a name="id680304"></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="id563641"></a><p class="title"><b>Table<EFBFBD>5.<2E>Postconditions for basic_regex construction</b></p>
|
||||
<a name="id680784"></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="id564115"></a><p class="title"><b>Table<EFBFBD>6.<2E>Postconditions for basic_regex construction</b></p>
|
||||
<a name="id681143"></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="id566191"></a><p class="title"><b>Table<EFBFBD>7.<2E>Postconditions for basic_regex::assign</b></p>
|
||||
<a name="id682659"></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>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Concepts</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="posix.html" title="POSIX Compatible C API's">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>charT Requirements</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../concepts.html" title="Concepts">
|
||||
<link rel="prev" href="../concepts.html" title="Concepts">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Iterator Requirements</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../concepts.html" title="Concepts">
|
||||
<link rel="prev" href="traits_concept.html" title="Traits Class Requirements">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Traits Class Requirements</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../concepts.html" title="Concepts">
|
||||
<link rel="prev" href="charT_concept.html" title="charT Requirements">
|
||||
@ -34,7 +34,7 @@
|
||||
Boost-specific enhanced interface.
|
||||
</p>
|
||||
<a name="boost_regex.ref.concepts.traits_concept.minimal_requirements_"></a><h5>
|
||||
<a name="id661185"></a>
|
||||
<a name="id782143"></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="id661996"></a>
|
||||
<a name="id782758"></a>
|
||||
<a class="link" href="traits_concept.html#boost_regex.ref.concepts.traits_concept.additional_optional_requirements">Additional
|
||||
Optional Requirements</a>
|
||||
</h5>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Deprecated Interfaces</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="concepts/iterator_concepts.html" title="Iterator Requirements">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>High Level Class RegEx (Deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
|
||||
<link rel="prev" href="regex_split.html" title="regex_split (deprecated)">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>regex_format (Deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
|
||||
<link rel="prev" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
|
||||
@ -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="id662740"></a>
|
||||
<a name="id783339"></a>
|
||||
<a class="link" href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm
|
||||
regex_format</a>
|
||||
</h5>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>regex_grep (Deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
|
||||
<link rel="prev" href="regex_format.html" title="regex_format (Deprecated)">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>regex_split (deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
|
||||
<link rel="prev" href="regex_grep.html" title="regex_grep (Deprecated)">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>error_type</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="match_flag_type.html" title="match_flag_type">
|
||||
@ -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="id640585"></a>
|
||||
<a name="id760997"></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="id641149"></a>
|
||||
<a name="id761412"></a>
|
||||
<a class="link" href="error_type.html#boost_regex.ref.error_type.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>match_flag_type</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="syntax_option_type/syntax_option_type_literal.html" title="Options for Literal Strings">
|
||||
@ -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="id639820"></a>
|
||||
<a name="id760446"></a>
|
||||
<a class="link" href="match_flag_type.html#boost_regex.ref.match_flag_type.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>match_results</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="basic_regex.html" title="basic_regex">
|
||||
@ -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="id569578"></a>
|
||||
<a name="id687993"></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"><</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">></span>
|
||||
@ -98,9 +98,33 @@
|
||||
<span class="keyword">bool</span> <a class="link" href="match_results.html#boost_regex.match_results.empty">empty</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="comment">// element access:
|
||||
</span> <span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.length">length</a><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.length">length</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.length">length</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</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">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">></span>
|
||||
<span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.length">length</a><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"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>&</span> <span class="identifier">sub</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.position">position</a><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.position">position</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.position">position</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</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">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">></span>
|
||||
<span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.position">position</a><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"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>&</span> <span class="identifier">sub</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.str">str</a><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="identifier">string_type</span> <a class="link" href="match_results.html#boost_regex.match_results.str">str</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</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">A</span><span class="special">></span>
|
||||
<span class="identifier">string_type</span> <a class="link" href="match_results.html#boost_regex.match_results.str">str</a><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"><</span><span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>&</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">string_type</span> <a class="link" href="match_results.html#boost_regex.match_results.str">str</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</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">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">></span>
|
||||
<span class="identifier">string_type</span> <a class="link" href="match_results.html#boost_regex.match_results.str">str</a><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"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>&</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="identifier">const_reference</span> <a class="link" href="match_results.html#boost_regex.match_results.subscript">operator[]</a><span class="special">(</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="identifier">const_reference</span> <a class="link" href="match_results.html#boost_regex.match_results.subscript">operator[]</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</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">A</span><span class="special">></span>
|
||||
<span class="identifier">const_reference</span> <a class="link" href="match_results.html#boost_regex.match_results.subscript">operator[]</a><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"><</span><span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>&</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">const_reference</span> <a class="link" href="match_results.html#boost_regex.match_results.subscript">operator[]</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</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">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">></span>
|
||||
<span class="identifier">const_reference</span> <a class="link" href="match_results.html#boost_regex.match_results.subscript">operator[]</a><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"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>&</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
|
||||
<span class="identifier">const_reference</span> <a class="link" href="match_results.html#boost_regex.match_results.prefix">prefix</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
|
||||
@ -142,7 +166,7 @@
|
||||
<span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m2</span><span class="special">);</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.match_results.description"></a><h5>
|
||||
<a name="id572482"></a>
|
||||
<a name="id691227"></a>
|
||||
<a class="link" href="match_results.html#boost_regex.ref.match_results.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -375,14 +399,39 @@
|
||||
<a name="boost_regex.match_results.length"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">difference_type</span> <span class="identifier">length</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="identifier">difference_type</span> <span class="identifier">length</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">difference_type</span> <span class="identifier">length</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</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">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">></span>
|
||||
<span class="identifier">difference_type</span> <span class="identifier">length</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"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>&)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns the length of sub-expression
|
||||
<span class="emphasis"><em>sub</em></span>, that is to say: <code class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">sub</span><span class="special">].</span><span class="identifier">length</span><span class="special">()</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
The overloads that accept a string refer to a named sub-expression <span class="emphasis"><em>n</em></span>.
|
||||
In the event that there is no such named sub-expression then returns an empty
|
||||
string.
|
||||
</p>
|
||||
<p>
|
||||
The template overloads of this function, allow the string and/or character
|
||||
type to be different from the character type of the underlying sequence and/or
|
||||
regular expression: in this case the characters will be widened to the underlying
|
||||
character type of the original regular expression. A compiler error will
|
||||
occur if the argument passes a wider character type than the underlying sequence.
|
||||
These overloads allow a normal narrow character C string literal to be used
|
||||
as an argument, even when the underlying character type of the expression
|
||||
being matched may be something more exotic such as a Unicode character type.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.position"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">difference_type</span> <span class="identifier">position</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="identifier">difference_type</span> <span class="identifier">position</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">difference_type</span> <span class="identifier">position</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</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">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">></span>
|
||||
<span class="identifier">difference_type</span> <span class="identifier">position</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"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>&)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns the starting location of
|
||||
@ -391,17 +440,61 @@
|
||||
will return the location of the partial match even though <code class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></code>
|
||||
is false.
|
||||
</p>
|
||||
<p>
|
||||
The overloads that accept a string refer to a named sub-expression <span class="emphasis"><em>n</em></span>.
|
||||
In the event that there is no such named sub-expression then returns an empty
|
||||
string.
|
||||
</p>
|
||||
<p>
|
||||
The template overloads of this function, allow the string and/or character
|
||||
type to be different from the character type of the underlying sequence and/or
|
||||
regular expression: in this case the characters will be widened to the underlying
|
||||
character type of the original regular expression. A compiler error will
|
||||
occur if the argument passes a wider character type than the underlying sequence.
|
||||
These overloads allow a normal narrow character C string literal to be used
|
||||
as an argument, even when the underlying character type of the expression
|
||||
being matched may be something more exotic such as a Unicode character type.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.str"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">string_type</span> <span class="identifier">str</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="identifier">string_type</span> <span class="identifier">str</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</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">A</span><span class="special">></span>
|
||||
<span class="identifier">string_type</span> <span class="identifier">str</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"><</span><span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>&</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">string_type</span> <span class="identifier">str</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</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">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">></span>
|
||||
<span class="identifier">string_type</span> <span class="identifier">str</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"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>&</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns sub-expression <span class="emphasis"><em>sub</em></span>
|
||||
as a string: <code class="computeroutput"><span class="identifier">string_type</span><span class="special">((*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">sub</span><span class="special">])</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
The overloads that accept a string, return the string that matched the named
|
||||
sub-expression <span class="emphasis"><em>n</em></span>. In the event that there is no such
|
||||
named sub-expression then returns an empty string.
|
||||
</p>
|
||||
<p>
|
||||
The template overloads of this function, allow the string and/or character
|
||||
type to be different from the character type of the underlying sequence and/or
|
||||
regular expression: in this case the characters will be widened to the underlying
|
||||
character type of the original regular expression. A compiler error will
|
||||
occur if the argument passes a wider character type than the underlying sequence.
|
||||
These overloads allow a normal narrow character C string literal to be used
|
||||
as an argument, even when the underlying character type of the expression
|
||||
being matched may be something more exotic such as a Unicode character type.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.subscript"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">const_reference</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="identifier">const_reference</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</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">A</span><span class="special">></span>
|
||||
<span class="identifier">const_reference</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>&</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">const_reference</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">template</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">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">></span>
|
||||
<span class="identifier">const_reference</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>&</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns a reference to the <a class="link" href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
|
||||
@ -413,6 +506,22 @@
|
||||
then returns a <a class="link" href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
|
||||
object whose matched member is false.
|
||||
</p>
|
||||
<p>
|
||||
The overloads that accept a string, return a reference to the <a class="link" href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a> object representing the
|
||||
character sequence that matched the named sub-expression <span class="emphasis"><em>n</em></span>.
|
||||
In the event that there is no such named sub-expression then returns a <a class="link" href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
|
||||
object whose matched member is false.
|
||||
</p>
|
||||
<p>
|
||||
The template overloads of this function, allow the string and/or character
|
||||
type to be different from the character type of the underlying sequence and/or
|
||||
regular expression: in this case the characters will be widened to the underlying
|
||||
character type of the original regular expression. A compiler error will
|
||||
occur if the argument passes a wider character type than the underlying sequence.
|
||||
These overloads allow a normal narrow character C string literal to be used
|
||||
as an argument, even when the underlying character type of the expression
|
||||
being matched may be something more exotic such as a Unicode character type.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.prefix"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">const_reference</span> <span class="identifier">prefix</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Interfacing With Non-Standard String Types</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="regex_traits.html" title="regex_traits">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Working With Unicode and ICU String Types</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../non_std_strings.html" title="Interfacing With Non-Standard String Types">
|
||||
<link rel="prev" href="../non_std_strings.html" title="Interfacing With Non-Standard String Types">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Introduction to using Regex with ICU</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
|
||||
<link rel="prev" href="../icu.html" title="Working With Unicode and ICU String Types">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Unicode Regular Expression Algorithms</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
|
||||
<link rel="prev" href="unicode_types.html" title="Unicode regular expression types">
|
||||
@ -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="id643583"></a>
|
||||
<a name="id763376"></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="id644302"></a>
|
||||
<a name="id763891"></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="id644896"></a>
|
||||
<a name="id765992"></a>
|
||||
<a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace">u32regex_replace</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Unicode Aware Regex Iterators</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
|
||||
<link rel="prev" href="unicode_algo.html" title="Unicode Regular Expression Algorithms">
|
||||
@ -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="id645356"></a>
|
||||
<a name="id766310"></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="id647103"></a>
|
||||
<a name="id767579"></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>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Unicode regular expression types</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
|
||||
<link rel="prev" href="intro.html" title="Introduction to using Regex with ICU">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Using Boost Regex With MFC Strings</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../non_std_strings.html" title="Interfacing With Non-Standard String Types">
|
||||
<link rel="prev" href="icu/unicode_iter.html" title="Unicode Aware Regex Iterators">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Overloaded Algorithms For MFC String Types</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="mfc_regex_create.html" title="Regular Expression Creation From an MFC String">
|
||||
@ -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="id652259"></a>
|
||||
<a name="id772430"></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="id653171"></a>
|
||||
<a name="id773088"></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="id653763"></a>
|
||||
<a name="id775582"></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="id654500"></a>
|
||||
<a name="id776118"></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="id654904"></a>
|
||||
<a name="id776408"></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>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Introduction to Boost.Regex and MFC Strings</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Iterating Over the Matches Within An MFC String</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="mfc_algo.html" title="Overloaded Algorithms For MFC String Types">
|
||||
@ -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="id655985"></a>
|
||||
<a name="id777178"></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="id656734"></a>
|
||||
<a name="id778820"></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>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Regular Expression Creation From an MFC String</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="mfc_regex_types.html" title="Regex Types Used With MFC Strings">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Regex Types Used With MFC Strings</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="mfc_intro.html" title="Introduction to Boost.Regex and MFC Strings">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>POSIX Compatible C API's</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="non_std_strings/mfc_strings/mfc_iter.html" title="Iterating Over the Matches Within An MFC String">
|
||||
@ -165,7 +165,7 @@
|
||||
<a name="regcomp"></a><p>
|
||||
</p>
|
||||
<a name="boost_regex.ref.posix.regcomp"></a><h5>
|
||||
<a name="id659651"></a>
|
||||
<a name="id780958"></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="id660295"></a>
|
||||
<a name="id781469"></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="id660478"></a>
|
||||
<a name="id781598"></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="id660619"></a>
|
||||
<a name="id781709"></a>
|
||||
<a class="link" href="posix.html#boost_regex.ref.posix.regfree">regfree</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>regex_iterator</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="regex_replace.html" title="regex_replace">
|
||||
@ -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="id618047"></a>
|
||||
<a name="id739152"></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="id621180"></a>
|
||||
<a name="id742537"></a>
|
||||
<a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>regex_match</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="sub_match.html" title="sub_match">
|
||||
@ -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="id601653"></a>
|
||||
<a name="id722544"></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"><</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">></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="id604831"></a>
|
||||
<a name="id724914"></a>
|
||||
<a class="link" href="regex_match.html#boost_regex.ref.regex_match.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>regex_replace</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="regex_search.html" title="regex_search">
|
||||
@ -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="id612131"></a>
|
||||
<a name="id733770"></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"><</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">></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="id613680"></a>
|
||||
<a name="id734884"></a>
|
||||
<a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>regex_search</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="regex_match.html" title="regex_match">
|
||||
@ -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="id607041"></a>
|
||||
<a name="id726538"></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"><</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">></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="id610306"></a>
|
||||
<a name="id731156"></a>
|
||||
<a class="link" href="regex_search.html#boost_regex.ref.regex_search.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>regex_token_iterator</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="regex_iterator.html" title="regex_iterator">
|
||||
@ -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="id626987"></a>
|
||||
<a name="id748992"></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="id631204"></a>
|
||||
<a name="id752056"></a>
|
||||
<a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>regex_traits</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="error_type.html" title="error_type">
|
||||
@ -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="id641830"></a>
|
||||
<a name="id762181"></a>
|
||||
<a class="link" href="regex_traits.html#boost_regex.ref.regex_traits.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>sub_match</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="match_results.html" title="match_results">
|
||||
@ -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="id586170"></a>
|
||||
<a name="id706400"></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="id586194"></a>
|
||||
<a name="id706413"></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="id587769"></a>
|
||||
<a name="id707514"></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="id599741"></a>
|
||||
<a name="id719507"></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>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>syntax_option_type</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="bad_expression.html" title="bad_expression">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Options for POSIX Basic Regular Expressions</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Options for POSIX Extended Regular Expressions</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_perl.html" title="Options for Perl Regular Expressions">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Options for Literal Strings</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Overview of syntax_option_type</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_synopsis.html" title="syntax_option_type Synopsis">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Options for Perl Regular Expressions</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_overview.html" title="Overview of syntax_option_type">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>syntax_option_type Synopsis</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
|
||||
<link rel="prev" href="../syntax_option_type.html" title="syntax_option_type">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Regular Expression Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="partial_matches.html" title="Partial Matches">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>POSIX Extended Regular Expression Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
|
||||
<link rel="prev" href="perl_syntax.html" title="Perl Regular Expression Syntax">
|
||||
@ -28,7 +28,7 @@
|
||||
Expression Syntax</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.syntax.basic_extended.synopsis"></a><h4>
|
||||
<a name="id541641"></a>
|
||||
<a name="id659360"></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="id541905"></a>
|
||||
<a name="id659539"></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="id541945"></a>
|
||||
<a name="id659560"></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="id542013"></a>
|
||||
<a name="id659605"></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="id542049"></a>
|
||||
<a name="id659627"></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="id542105"></a>
|
||||
<a name="id659661"></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="id542553"></a>
|
||||
<a name="id659967"></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="id542647"></a>
|
||||
<a name="id660031"></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="id542750"></a>
|
||||
<a name="id660098"></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="id542786"></a>
|
||||
<a name="id660118"></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="id542837"></a>
|
||||
<a name="id660149"></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="id542938"></a>
|
||||
<a name="id660211"></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="id543020"></a>
|
||||
<a name="id660265"></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="id543103"></a>
|
||||
<a name="id660316"></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="id543264"></a>
|
||||
<a name="id660418"></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="id543369"></a>
|
||||
<a name="id660476"></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="id543448"></a>
|
||||
<a name="id660529"></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="id543518"></a>
|
||||
<a name="id660572"></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="id543866"></a>
|
||||
<a name="id661216"></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="id544497"></a>
|
||||
<a name="id661704"></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="id544898"></a>
|
||||
<a name="id662011"></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="id545091"></a>
|
||||
<a name="id662167"></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="id545326"></a>
|
||||
<a name="id662352"></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="id545376"></a>
|
||||
<a name="id662380"></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="id545499"></a>
|
||||
<a name="id662460"></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="id545632"></a>
|
||||
<a name="id662562"></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="id545662"></a>
|
||||
<a name="id662579"></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="id545852"></a>
|
||||
<a name="id662712"></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="id545892"></a>
|
||||
<a name="id662734"></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="id545915"></a>
|
||||
<a name="id662747"></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="id546073"></a>
|
||||
<a name="id662849"></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="id546119"></a>
|
||||
<a name="id662874"></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="id546248"></a>
|
||||
<a name="id662952"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.references">References</a>
|
||||
</h4>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>POSIX Basic Regular Expression Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
|
||||
<link rel="prev" href="basic_extended.html" title="POSIX Extended Regular Expression Syntax">
|
||||
@ -28,7 +28,7 @@
|
||||
Expression Syntax</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.syntax.basic_syntax.synopsis"></a><h4>
|
||||
<a name="id546330"></a>
|
||||
<a name="id663001"></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="id546622"></a>
|
||||
<a name="id664085"></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="id546661"></a>
|
||||
<a name="id664106"></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="id546729"></a>
|
||||
<a name="id664151"></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="id546766"></a>
|
||||
<a name="id664171"></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="id546822"></a>
|
||||
<a name="id664202"></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="id547066"></a>
|
||||
<a name="id664367"></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="id547141"></a>
|
||||
<a name="id664416"></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="id547177"></a>
|
||||
<a name="id664436"></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="id547227"></a>
|
||||
<a name="id664468"></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="id547319"></a>
|
||||
<a name="id664524"></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="id547380"></a>
|
||||
<a name="id664562"></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="id547463"></a>
|
||||
<a name="id664614"></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="id547611"></a>
|
||||
<a name="id664705"></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="id547716"></a>
|
||||
<a name="id664763"></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="id547794"></a>
|
||||
<a name="id664816"></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="id547851"></a>
|
||||
<a name="id664849"></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="id547890"></a>
|
||||
<a name="id664871"></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="id547923"></a>
|
||||
<a name="id664891"></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="id548067"></a>
|
||||
<a name="id664986"></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="id548562"></a>
|
||||
<a name="id665404"></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="id548735"></a>
|
||||
<a name="id665510"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.references">References</a>
|
||||
</h4>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Character Class Names</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
|
||||
<link rel="prev" href="basic_syntax.html" title="POSIX Basic Regular Expression Syntax">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Character classes that are supported by Unicode Regular Expressions</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../character_classes.html" title="Character Class Names">
|
||||
<link rel="prev" href="std_char_clases.html" title="Character Classes that are Always Supported">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Character Classes that are Always Supported</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../character_classes.html" title="Character Class Names">
|
||||
<link rel="prev" href="../character_classes.html" title="Character Class Names">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Collating Names</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
|
||||
<link rel="prev" href="character_classes/optional_char_class_names.html" title="Character classes that are supported by Unicode Regular Expressions">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Digraphs</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../collating_names.html" title="Collating Names">
|
||||
<link rel="prev" href="../collating_names.html" title="Collating Names">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Named Unicode Characters</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../collating_names.html" title="Collating Names">
|
||||
<link rel="prev" href="posix_symbolic_names.html" title="POSIX Symbolic Names">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>POSIX Symbolic Names</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../collating_names.html" title="Collating Names">
|
||||
<link rel="prev" href="digraphs.html" title="Digraphs">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>The Leftmost Longest Rule</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
|
||||
<link rel="prev" href="collating_names/named_unicode.html" title="Named Unicode Characters">
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Unicode and Boost.Regex</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="introduction_and_overview.html" title="Introduction and Overview">
|
||||
@ -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="id530083"></a>
|
||||
<a name="id648171"></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="id530267"></a>
|
||||
<a name="id648289"></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>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Boost.Regex</title>
|
||||
<link rel="stylesheet" href="../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<link rel="home" href="index.html" title="Boost.Regex">
|
||||
<link rel="next" href="boost_regex/configuration.html" title="Configuration">
|
||||
</head>
|
||||
@ -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="id473252"></a><p>
|
||||
<a name="id637869"></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: December 23, 2008 at 17:35:37 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: July 29, 2009 at 15:59:46 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
@ -71,9 +71,33 @@ Class template `match_results` is most commonly used as one of the typedefs
|
||||
bool ``[link boost_regex.match_results.empty empty]``() const;
|
||||
// element access:
|
||||
difference_type ``[link boost_regex.match_results.length length]``(int sub = 0) const;
|
||||
difference_type ``[link boost_regex.match_results.length length]``(const char_type* sub) const;
|
||||
template <class charT>
|
||||
difference_type ``[link boost_regex.match_results.length length]``(const charT* sub) const;
|
||||
template <class charT, class Traits, class A>
|
||||
difference_type ``[link boost_regex.match_results.length length]``(const std::basic_string<charT, Traits, A>& sub) const;
|
||||
difference_type ``[link boost_regex.match_results.position position]``(unsigned int sub = 0) const;
|
||||
difference_type ``[link boost_regex.match_results.position position]``(const char_type* sub) const;
|
||||
template <class charT>
|
||||
difference_type ``[link boost_regex.match_results.position position]``(const charT* sub) const;
|
||||
template <class charT, class Traits, class A>
|
||||
difference_type ``[link boost_regex.match_results.position position]``(const std::basic_string<charT, Traits, A>& sub) const;
|
||||
string_type ``[link boost_regex.match_results.str str]``(int sub = 0) const;
|
||||
string_type ``[link boost_regex.match_results.str str]``(const char_type* sub)const;
|
||||
template <class Traits, class A>
|
||||
string_type ``[link boost_regex.match_results.str str]``(const std::basic_string<char_type, Traits, A>& sub)const;
|
||||
template <class charT>
|
||||
string_type ``[link boost_regex.match_results.str str]``(const charT* sub)const;
|
||||
template <class charT, class Traits, class A>
|
||||
string_type ``[link boost_regex.match_results.str str]``(const std::basic_string<charT, Traits, A>& sub)const;
|
||||
const_reference ``[link boost_regex.match_results.subscript operator\[\]]``(int n) const;
|
||||
const_reference ``[link boost_regex.match_results.subscript operator\[\]]``(const char_type* n) const;
|
||||
template <class Traits, class A>
|
||||
const_reference ``[link boost_regex.match_results.subscript operator\[\]]``(const std::basic_string<char_type, Traits, A>& n) const;
|
||||
template <class charT>
|
||||
const_reference ``[link boost_regex.match_results.subscript operator\[\]]``(const charT* n) const;
|
||||
template <class charT, class Traits, class A>
|
||||
const_reference ``[link boost_regex.match_results.subscript operator\[\]]``(const std::basic_string<charT, Traits, A>& n) const;
|
||||
|
||||
const_reference ``[link boost_regex.match_results.prefix prefix]``() const;
|
||||
|
||||
@ -190,30 +214,86 @@ stored in *this.
|
||||
[#boost_regex.match_results.length]
|
||||
|
||||
difference_type length(int sub = 0)const;
|
||||
difference_type length(const char_type* sub)const;
|
||||
template <class charT>
|
||||
difference_type length(const charT* sub)const;
|
||||
template <class charT, class Traits, class A>
|
||||
difference_type length(const std::basic_string<charT, Traits, A>&)const;
|
||||
|
||||
[*Effects]: Returns the length of sub-expression /sub/, that is to say:
|
||||
`(*this)[sub].length()`.
|
||||
|
||||
The overloads that accept a string refer to a named sub-expression /n/.
|
||||
In the event that there is no such named sub-expression then returns an empty string.
|
||||
|
||||
The template overloads of this function, allow the string and\/or character type
|
||||
to be different from the character type of the underlying sequence and\/or regular expression:
|
||||
in this case the characters will be widened to the underlying character type of the original regular expression.
|
||||
A compiler error will occur if the argument passes a wider character type than the underlying sequence.
|
||||
These overloads allow a normal narrow character C string literal to be used as an argument, even when
|
||||
the underlying character type of the expression being matched may be something more exotic such as a
|
||||
Unicode character type.
|
||||
|
||||
[#boost_regex.match_results.position]
|
||||
|
||||
difference_type position(unsigned int sub = 0)const;
|
||||
difference_type position(const char_type* sub)const;
|
||||
template <class charT>
|
||||
difference_type position(const charT* sub)const;
|
||||
template <class charT, class Traits, class A>
|
||||
difference_type position(const std::basic_string<charT, Traits, A>&)const;
|
||||
|
||||
[*Effects]: Returns the starting location of sub-expression /sub/, or -1 if /sub/ was
|
||||
not matched. Note that if this represents a partial match , then `position()`
|
||||
will return the location of the partial match even though `(*this)[0].matched` is false.
|
||||
|
||||
The overloads that accept a string refer to a named sub-expression /n/.
|
||||
In the event that there is no such named sub-expression then returns an empty string.
|
||||
|
||||
The template overloads of this function, allow the string and\/or character type
|
||||
to be different from the character type of the underlying sequence and\/or regular expression:
|
||||
in this case the characters will be widened to the underlying character type of the original regular expression.
|
||||
A compiler error will occur if the argument passes a wider character type than the underlying sequence.
|
||||
These overloads allow a normal narrow character C string literal to be used as an argument, even when
|
||||
the underlying character type of the expression being matched may be something more exotic such as a
|
||||
Unicode character type.
|
||||
|
||||
|
||||
[#boost_regex.match_results.str]
|
||||
|
||||
string_type str(int sub = 0)const;
|
||||
string_type str(const char_type* sub)const;
|
||||
template <class Traits, class A>
|
||||
string_type str(const std::basic_string<char_type, Traits, A>& sub)const;
|
||||
template <class charT>
|
||||
string_type str(const charT* sub)const;
|
||||
template <class charT, class Traits, class A>
|
||||
string_type str(const std::basic_string<charT, Traits, A>& sub)const;
|
||||
|
||||
[*Effects]: Returns sub-expression /sub/ as a string: `string_type((*this)[sub])`.
|
||||
|
||||
The overloads that accept a string, return the string that matched the named sub-expression /n/.
|
||||
In the event that there is no such named sub-expression then returns an empty string.
|
||||
|
||||
The template overloads of this function, allow the string and\/or character type
|
||||
to be different from the character type of the underlying sequence and\/or regular expression:
|
||||
in this case the characters will be widened to the underlying character type of the original regular expression.
|
||||
A compiler error will occur if the argument passes a wider character type than the underlying sequence.
|
||||
These overloads allow a normal narrow character C string literal to be used as an argument, even when
|
||||
the underlying character type of the expression being matched may be something more exotic such as a
|
||||
Unicode character type.
|
||||
|
||||
|
||||
[#boost_regex.match_results.subscript]
|
||||
|
||||
const_reference operator[](int n) const;
|
||||
const_reference operator[](int n) const;
|
||||
const_reference operator[](const char_type* n) const;
|
||||
template <class Traits, class A>
|
||||
const_reference operator[](const std::basic_string<char_type, Traits, A>& n) const;
|
||||
template <class charT>
|
||||
const_reference operator[](const charT* n) const;
|
||||
template <class charT, class Traits, class A>
|
||||
const_reference operator[](const std::basic_string<charT, Traits, A>& n) const;
|
||||
|
||||
[*Effects]: Returns a reference to the [sub_match] object representing the character
|
||||
sequence that matched marked sub-expression /n/. If `n == 0` then returns a
|
||||
@ -222,6 +302,19 @@ matched the whole regular expression. If /n/ is out of range, or if /n/ is an
|
||||
unmatched sub-expression, then returns a [sub_match] object whose matched
|
||||
member is false.
|
||||
|
||||
The overloads that accept a string, return a reference to the [sub_match]
|
||||
object representing the character sequence that matched the named sub-expression /n/.
|
||||
In the event that there is no such named sub-expression then returns a [sub_match] object whose matched
|
||||
member is false.
|
||||
|
||||
The template overloads of this function, allow the string and\/or character type
|
||||
to be different from the character type of the underlying sequence and\/or regular expression:
|
||||
in this case the characters will be widened to the underlying character type of the original regular expression.
|
||||
A compiler error will occur if the argument passes a wider character type than the underlying sequence.
|
||||
These overloads allow a normal narrow character C string literal to be used as an argument, even when
|
||||
the underlying character type of the expression being matched may be something more exotic such as a
|
||||
Unicode character type.
|
||||
|
||||
|
||||
[#boost_regex.match_results.prefix]
|
||||
|
||||
|
@ -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,21 +128,38 @@ 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]
|
||||
|
||||
By default when a repeated patten does not match then the engine will backtrack until
|
||||
a match is found. However, this behaviour can sometime be undesireable so there are
|
||||
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 one or more 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,m}+= Matches the previous atom between n and m times, while giving nothing back.
|
||||
|
||||
[h4 Back references]
|
||||
|
||||
An escape character followed by a digit /n/, where /n/ is in the range 1-9,
|
||||
@ -158,27 +175,42 @@ Will match the string:
|
||||
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]]
|
||||
[[=\g{one}=][Match whatever matched the sub-expression named "one"]]
|
||||
]
|
||||
|
||||
Finally the \k escape can be used to refer to named subexpressions, for example [^\k<two>] will match
|
||||
whatever matched the subexpression named "two".
|
||||
|
||||
[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.
|
||||
|
||||
@ -186,35 +218,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.
|
||||
|
||||
@ -223,11 +255,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
|
||||
@ -250,7 +282,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]
|
||||
|
||||
@ -260,24 +292,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:]
|
||||
@ -296,11 +328,15 @@ The following are supported by default:
|
||||
[[`\s`][`[[:space:]]`]]
|
||||
[[`\u`][`[[:upper:]]`]]
|
||||
[[`\w`][`[[:word:]]`]]
|
||||
[[`\h`][Horizontal whitespace]]
|
||||
[[`\v`][Vertical whitespace]]
|
||||
[[`\D`][`[^[:digit:]]`]]
|
||||
[[`\L`][`[^[:lower:]]`]]
|
||||
[[`\S`][`[^[:space:]]`]]
|
||||
[[`\U`][`[^[:upper:]]`]]
|
||||
[[`\W`][`[^[:word:]]`]]
|
||||
[[`\H`][Not Horizontal whitespace]]
|
||||
[[`\V`][Not Vertical whitespace]]
|
||||
]
|
||||
|
||||
[h5 Character Properties]
|
||||
@ -316,19 +352,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]
|
||||
|
||||
@ -345,30 +381,44 @@ 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]
|
||||
|
||||
@ -377,31 +427,62 @@ 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 Named Subexpressions]
|
||||
|
||||
You can create a named subexpression using:
|
||||
|
||||
(?<NAME>expression)
|
||||
|
||||
Which can be then be refered to by the name /NAME/. Alternatively you can delimit the name
|
||||
using 'NAME' as in:
|
||||
|
||||
(?'NAME'expression)
|
||||
|
||||
These named subexpressions can be refered to in a backreference using either [^\g{NAME}] or [^\k<NAME>]
|
||||
and can also be refered to by name in a [perl_format] format string for search and replace operations, or in the
|
||||
[match_results] member functions.
|
||||
|
||||
[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 Branch reset]
|
||||
|
||||
=(?|pattern)= resets the subexpression count at the start of each "|" alternative within /pattern/.
|
||||
|
||||
The sub-expression count following this construct is that of whichever branch had the largest number of
|
||||
sub-expressions. This construct is useful when you want to capture one of a number of alternative matches
|
||||
in a single sub-expression index.
|
||||
|
||||
In the following example the index of each sub-expression is shown below the expression:
|
||||
|
||||
[pre
|
||||
# before ---------------branch-reset----------- after
|
||||
/ ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x
|
||||
# 1 2 2 3 2 3 4
|
||||
]
|
||||
|
||||
[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,
|
||||
@ -414,43 +495,68 @@ 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
|
||||
whole to match then no match is found at all.
|
||||
|
||||
[h5 Recursive Expressions]
|
||||
|
||||
[^(?['N]) (?-['N]) (?+['N]) (?R) (?0)]
|
||||
|
||||
=(?R)= and =(?0)= recurse to the start of the entire pattern.
|
||||
|
||||
[^(?['N])] executes sub-expression /N/ recursively, for example =(?2)= will recurse to sub-expression 2.
|
||||
|
||||
[^(?-['N])] and [^(?+['N])] are relative recursions, so for example =(?-1)= recurses to the last sub-expression to be declared,
|
||||
and =(?+1)= recurses to the next sub-expression to be declared.
|
||||
|
||||
[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
|
||||
/condition/ may be either: a forward lookahead assert, the index of
|
||||
a marked sub-expression (the condition becomes true if the sub-expression
|
||||
has been matched).
|
||||
has been matched), or an index of a recursion (the condition become true if we are executing
|
||||
directly inside the specified recursion).
|
||||
|
||||
Here is a summary of the possible predicates:
|
||||
|
||||
* [^(?(?\=assert)yes-pattern|no-pattern)] Executes /yes-pattern/ if the forward look-ahead assert matches, otherwise
|
||||
executes /no-pattern/.
|
||||
* =(?(?!assert)yes-pattern|no-pattern)= Executes /yes-pattern/ if the forward look-ahead assert does not match, otherwise
|
||||
executes /no-pattern/.
|
||||
* =(?(R)yes-pattern|no-pattern)= Executes /yes-pattern/ if we are executing inside a recursion, otherwise
|
||||
executes /no-pattern/.
|
||||
* [^(?(R['N])yes-pattern|no-pattern)] Executes /yes-pattern/ if we are executing inside a recursion to sub-expression /N/, otherwise
|
||||
executes /no-pattern/.
|
||||
* [^(?(DEFINE)never-exectuted-pattern)] Defines a block of code that is never executed and matches no characters:
|
||||
this is usually used to define one or more named sub-expressions which are refered to from elsewhere in the pattern.
|
||||
|
||||
[h4 Operator precedence]
|
||||
|
||||
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 |
|
||||
@ -469,42 +575,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]
|
||||
|
||||
|
@ -844,6 +844,42 @@ struct BoostRegexConcept
|
||||
m_string = m_char + m_sub;
|
||||
ignore_unused_variable_warning(m_string);
|
||||
|
||||
// Named sub-expressions:
|
||||
m_sub = m_cresults[&m_char];
|
||||
ignore_unused_variable_warning(m_sub);
|
||||
m_sub = m_cresults[m_string];
|
||||
ignore_unused_variable_warning(m_sub);
|
||||
m_sub = m_cresults[""];
|
||||
ignore_unused_variable_warning(m_sub);
|
||||
m_sub = m_cresults[std::string("")];
|
||||
ignore_unused_variable_warning(m_sub);
|
||||
m_string = m_cresults.str(&m_char);
|
||||
ignore_unused_variable_warning(m_string);
|
||||
m_string = m_cresults.str(m_string);
|
||||
ignore_unused_variable_warning(m_string);
|
||||
m_string = m_cresults.str("");
|
||||
ignore_unused_variable_warning(m_string);
|
||||
m_string = m_cresults.str(std::string(""));
|
||||
ignore_unused_variable_warning(m_string);
|
||||
|
||||
typename match_results_type::difference_type diff;
|
||||
diff = m_cresults.length(&m_char);
|
||||
ignore_unused_variable_warning(diff);
|
||||
diff = m_cresults.length(m_string);
|
||||
ignore_unused_variable_warning(diff);
|
||||
diff = m_cresults.length("");
|
||||
ignore_unused_variable_warning(diff);
|
||||
diff = m_cresults.length(std::string(""));
|
||||
ignore_unused_variable_warning(diff);
|
||||
diff = m_cresults.position(&m_char);
|
||||
ignore_unused_variable_warning(diff);
|
||||
diff = m_cresults.position(m_string);
|
||||
ignore_unused_variable_warning(diff);
|
||||
diff = m_cresults.position("");
|
||||
ignore_unused_variable_warning(diff);
|
||||
diff = m_cresults.position(std::string(""));
|
||||
ignore_unused_variable_warning(diff);
|
||||
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
m_stream << m_sub;
|
||||
m_stream << m_cresults;
|
||||
|
@ -164,7 +164,7 @@
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 4251 4231 4660)
|
||||
# endif
|
||||
# ifdef _DLL
|
||||
# if defined(_DLL) && defined(BOOST_MSVC) && (BOOST_MSVC < 1600)
|
||||
# include <string>
|
||||
extern template class __declspec(dllimport) std::basic_string<unsigned short>;
|
||||
# endif
|
||||
|
@ -184,7 +184,9 @@ private:
|
||||
offset_underscore = U_CHAR_CATEGORY_COUNT+3,
|
||||
offset_unicode = U_CHAR_CATEGORY_COUNT+4,
|
||||
offset_any = U_CHAR_CATEGORY_COUNT+5,
|
||||
offset_ascii = U_CHAR_CATEGORY_COUNT+6
|
||||
offset_ascii = U_CHAR_CATEGORY_COUNT+6,
|
||||
offset_horizontal = U_CHAR_CATEGORY_COUNT+7,
|
||||
offset_vertical = U_CHAR_CATEGORY_COUNT+8
|
||||
};
|
||||
|
||||
//
|
||||
@ -197,6 +199,8 @@ private:
|
||||
static const char_class_type mask_unicode;
|
||||
static const char_class_type mask_any;
|
||||
static const char_class_type mask_ascii;
|
||||
static const char_class_type mask_horizontal;
|
||||
static const char_class_type mask_vertical;
|
||||
|
||||
static char_class_type lookup_icu_mask(const ::UChar32* p1, const ::UChar32* p2);
|
||||
|
||||
@ -311,12 +315,12 @@ inline u32regex do_make_u32regex(InputIterator i,
|
||||
boost::regex_constants::syntax_option_type opt,
|
||||
const boost::mpl::int_<4>*)
|
||||
{
|
||||
typedef std::vector<UCHAR32> vector_type;
|
||||
typedef std::vector<UChar32> vector_type;
|
||||
vector_type v;
|
||||
while(i != j)
|
||||
{
|
||||
v.push_back((UCHAR32)(*i));
|
||||
++a;
|
||||
v.push_back((UChar32)(*i));
|
||||
++i;
|
||||
}
|
||||
if(v.size())
|
||||
return u32regex(&*v.begin(), v.size(), opt);
|
||||
|
@ -19,6 +19,9 @@
|
||||
#ifndef BOOST_REGEX_V4_BASIC_REGEX_HPP
|
||||
#define BOOST_REGEX_V4_BASIC_REGEX_HPP
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/functional/hash.hpp>
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4103)
|
||||
@ -44,12 +47,160 @@ namespace re_detail{
|
||||
template <class charT, class traits>
|
||||
class basic_regex_parser;
|
||||
|
||||
template <class I>
|
||||
void bubble_down_one(I first, I last)
|
||||
{
|
||||
if(first != last)
|
||||
{
|
||||
I next = last - 1;
|
||||
while((next != first) && !(*(next-1) < *next))
|
||||
{
|
||||
(next-1)->swap(*next);
|
||||
--next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Class named_subexpressions
|
||||
// Contains information about named subexpressions within the regex.
|
||||
//
|
||||
template <class charT>
|
||||
class named_subexpressions_base
|
||||
{
|
||||
public:
|
||||
virtual int get_id(const charT* i, const charT* j)const = 0;
|
||||
virtual int get_id(std::size_t hash)const = 0;
|
||||
#ifdef __GNUC__
|
||||
// warning supression:
|
||||
virtual ~named_subexpressions_base(){}
|
||||
#endif
|
||||
};
|
||||
|
||||
template <class Iterator>
|
||||
inline std::size_t hash_value_from_capture_name(Iterator i, Iterator j)
|
||||
{
|
||||
std::size_t r = boost::hash_range(i, j);
|
||||
r %= ((std::numeric_limits<int>::max)() - 10001);
|
||||
r += 10000;
|
||||
return r;
|
||||
}
|
||||
|
||||
template <class charT>
|
||||
class named_subexpressions : public named_subexpressions_base<charT>
|
||||
{
|
||||
struct name
|
||||
{
|
||||
name(const charT* i, const charT* j, int idx)
|
||||
: /*n(i, j), */ index(idx)
|
||||
{
|
||||
hash = hash_value_from_capture_name(i, j);
|
||||
}
|
||||
name(std::size_t h, int idx)
|
||||
: index(idx), hash(h)
|
||||
{
|
||||
}
|
||||
//std::vector<charT> n;
|
||||
int index;
|
||||
std::size_t hash;
|
||||
bool operator < (const name& other)const
|
||||
{
|
||||
return hash < other.hash; //std::lexicographical_compare(n.begin(), n.end(), other.n.begin(), other.n.end());
|
||||
}
|
||||
bool operator == (const name& other)const
|
||||
{
|
||||
return hash == other.hash; //n == other.n;
|
||||
}
|
||||
void swap(name& other)
|
||||
{
|
||||
//n.swap(other.n);
|
||||
std::swap(index, other.index);
|
||||
std::swap(hash, other.hash);
|
||||
}
|
||||
};
|
||||
public:
|
||||
named_subexpressions(){}
|
||||
void set_name(const charT* i, const charT* j, int index)
|
||||
{
|
||||
m_sub_names.push_back(name(i, j, index));
|
||||
bubble_down_one(m_sub_names.begin(), m_sub_names.end());
|
||||
}
|
||||
int get_id(const charT* i, const charT* j)const
|
||||
{
|
||||
name t(i, j, 0);
|
||||
typename std::vector<name>::const_iterator pos = std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t);
|
||||
if((pos != m_sub_names.end()) && (*pos == t))
|
||||
{
|
||||
return pos->index;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
int get_id(std::size_t h)const
|
||||
{
|
||||
name t(h, 0);
|
||||
typename std::vector<name>::const_iterator pos = std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t);
|
||||
if((pos != m_sub_names.end()) && (*pos == t))
|
||||
{
|
||||
return pos->index;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
private:
|
||||
std::vector<name> m_sub_names;
|
||||
};
|
||||
|
||||
template <class charT, class Other>
|
||||
class named_subexpressions_converter : public named_subexpressions_base<charT>
|
||||
{
|
||||
boost::shared_ptr<named_subexpressions<Other> > m_converter;
|
||||
public:
|
||||
named_subexpressions_converter(boost::shared_ptr<named_subexpressions<Other> > s)
|
||||
: m_converter(s) {}
|
||||
int get_id(const charT* i, const charT* j)const
|
||||
{
|
||||
if(i == j)
|
||||
return -1;
|
||||
std::vector<Other> v;
|
||||
while(i != j)
|
||||
{
|
||||
v.push_back(*i);
|
||||
++i;
|
||||
}
|
||||
return m_converter->get_id(&v[0], &v[0] + v.size());
|
||||
}
|
||||
int get_id(std::size_t h)const
|
||||
{
|
||||
return m_converter->get_id(h);
|
||||
}
|
||||
};
|
||||
|
||||
template <class To>
|
||||
inline boost::shared_ptr<named_subexpressions_base<To> > convert_to_named_subs_imp(
|
||||
boost::shared_ptr<named_subexpressions<To> > s,
|
||||
boost::integral_constant<bool,true> const&)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
template <class To, class From>
|
||||
inline boost::shared_ptr<named_subexpressions_base<To> > convert_to_named_subs_imp(
|
||||
boost::shared_ptr<named_subexpressions<From> > s,
|
||||
boost::integral_constant<bool,false> const&)
|
||||
{
|
||||
return boost::shared_ptr<named_subexpressions_converter<To, From> >(new named_subexpressions_converter<To, From>(s));
|
||||
}
|
||||
template <class To, class From>
|
||||
inline boost::shared_ptr<named_subexpressions_base<To> > convert_to_named_subs(
|
||||
boost::shared_ptr<named_subexpressions<From> > s)
|
||||
{
|
||||
typedef typename boost::is_same<To, From>::type tag_type;
|
||||
return convert_to_named_subs_imp<To>(s, tag_type());
|
||||
}
|
||||
//
|
||||
// class regex_data:
|
||||
// represents the data we wish to expose to the matching algorithms.
|
||||
//
|
||||
template <class charT, class traits>
|
||||
struct regex_data
|
||||
struct regex_data : public named_subexpressions<charT>
|
||||
{
|
||||
typedef regex_constants::syntax_option_type flag_type;
|
||||
typedef std::size_t size_type;
|
||||
@ -77,6 +228,7 @@ struct regex_data
|
||||
std::vector<
|
||||
std::pair<
|
||||
std::size_t, std::size_t> > m_subs; // Position of sub-expressions within the *string*.
|
||||
bool m_has_recursions; // whether we have recursive expressions;
|
||||
};
|
||||
//
|
||||
// class basic_regex_implementation
|
||||
@ -520,6 +672,10 @@ public:
|
||||
BOOST_ASSERT(0 != m_pimpl.get());
|
||||
return m_pimpl->get_data();
|
||||
}
|
||||
boost::shared_ptr<re_detail::named_subexpressions<charT> > get_named_subs()const
|
||||
{
|
||||
return m_pimpl;
|
||||
}
|
||||
|
||||
private:
|
||||
shared_ptr<re_detail::basic_regex_implementation<charT, traits> > m_pimpl;
|
||||
|
@ -240,6 +240,7 @@ protected:
|
||||
bool m_has_backrefs; // true if there are actually any backrefs
|
||||
unsigned m_backrefs; // bitmask of permitted backrefs
|
||||
boost::uintmax_t m_bad_repeats; // bitmask of repeats we can't deduce a startmap for;
|
||||
bool m_has_recursions; // set when we have recursive expresisons to fixup
|
||||
typename traits::char_class_type m_word_mask; // mask used to determine if a character is a word character
|
||||
typename traits::char_class_type m_mask_space; // mask used to determine if a character is a word character
|
||||
typename traits::char_class_type m_lower_mask; // mask used to determine if a character is a lowercase character
|
||||
@ -250,6 +251,7 @@ private:
|
||||
basic_regex_creator(const basic_regex_creator&);
|
||||
|
||||
void fixup_pointers(re_syntax_base* state);
|
||||
void fixup_recursions(re_syntax_base* state);
|
||||
void create_startmaps(re_syntax_base* state);
|
||||
int calculate_backstep(re_syntax_base* state);
|
||||
void create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask);
|
||||
@ -263,7 +265,7 @@ private:
|
||||
|
||||
template <class charT, class traits>
|
||||
basic_regex_creator<charT, traits>::basic_regex_creator(regex_data<charT, traits>* data)
|
||||
: m_pdata(data), m_traits(*(data->m_ptraits)), m_last_state(0), m_repeater_id(0), m_has_backrefs(false), m_backrefs(0)
|
||||
: m_pdata(data), m_traits(*(data->m_ptraits)), m_last_state(0), m_repeater_id(0), m_has_backrefs(false), m_backrefs(0), m_has_recursions(false)
|
||||
{
|
||||
m_pdata->m_data.clear();
|
||||
m_pdata->m_status = ::boost::regex_constants::error_ok;
|
||||
@ -692,6 +694,13 @@ void basic_regex_creator<charT, traits>::finalize(const charT* p1, const charT*
|
||||
m_pdata->m_first_state = static_cast<re_syntax_base*>(m_pdata->m_data.data());
|
||||
// fixup pointers in the machine:
|
||||
fixup_pointers(m_pdata->m_first_state);
|
||||
if(m_has_recursions)
|
||||
{
|
||||
m_pdata->m_has_recursions = true;
|
||||
fixup_recursions(m_pdata->m_first_state);
|
||||
}
|
||||
else
|
||||
m_pdata->m_has_recursions = false;
|
||||
// create nested startmaps:
|
||||
create_startmaps(m_pdata->m_first_state);
|
||||
// create main startmap:
|
||||
@ -713,6 +722,13 @@ void basic_regex_creator<charT, traits>::fixup_pointers(re_syntax_base* state)
|
||||
{
|
||||
switch(state->type)
|
||||
{
|
||||
case syntax_element_recurse:
|
||||
m_has_recursions = true;
|
||||
if(state->next.i)
|
||||
state->next.p = getaddress(state->next.i, state);
|
||||
else
|
||||
state->next.p = 0;
|
||||
break;
|
||||
case syntax_element_rep:
|
||||
case syntax_element_dot_rep:
|
||||
case syntax_element_char_rep:
|
||||
@ -738,6 +754,93 @@ void basic_regex_creator<charT, traits>::fixup_pointers(re_syntax_base* state)
|
||||
}
|
||||
}
|
||||
|
||||
template <class charT, class traits>
|
||||
void basic_regex_creator<charT, traits>::fixup_recursions(re_syntax_base* state)
|
||||
{
|
||||
re_syntax_base* base = state;
|
||||
while(state)
|
||||
{
|
||||
switch(state->type)
|
||||
{
|
||||
case syntax_element_assert_backref:
|
||||
{
|
||||
// just check that the index is valid:
|
||||
int id = static_cast<const re_brace*>(state)->index;
|
||||
if(id < 0)
|
||||
{
|
||||
id = -id-1;
|
||||
if(id >= 10000)
|
||||
{
|
||||
id = m_pdata->get_id(id);
|
||||
if(id <= 0)
|
||||
{
|
||||
// check of sub-expression that doesn't exist:
|
||||
if(0 == this->m_pdata->m_status) // update the error code if not already set
|
||||
this->m_pdata->m_status = boost::regex_constants::error_bad_pattern;
|
||||
//
|
||||
// clear the expression, we should be empty:
|
||||
//
|
||||
this->m_pdata->m_expression = 0;
|
||||
this->m_pdata->m_expression_len = 0;
|
||||
//
|
||||
// and throw if required:
|
||||
//
|
||||
if(0 == (this->flags() & regex_constants::no_except))
|
||||
{
|
||||
std::string message = this->m_pdata->m_ptraits->error_string(boost::regex_constants::error_bad_pattern);
|
||||
boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
|
||||
e.raise();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case syntax_element_recurse:
|
||||
{
|
||||
bool ok = false;
|
||||
re_syntax_base* p = base;
|
||||
int id = static_cast<re_jump*>(state)->alt.i;
|
||||
if(id > 10000)
|
||||
id = m_pdata->get_id(id);
|
||||
while(p)
|
||||
{
|
||||
if((p->type == syntax_element_startmark) && (static_cast<re_brace*>(p)->index == id))
|
||||
{
|
||||
static_cast<re_jump*>(state)->alt.p = p;
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
p = p->next.p;
|
||||
}
|
||||
if(!ok)
|
||||
{
|
||||
// recursion to sub-expression that doesn't exist:
|
||||
if(0 == this->m_pdata->m_status) // update the error code if not already set
|
||||
this->m_pdata->m_status = boost::regex_constants::error_bad_pattern;
|
||||
//
|
||||
// clear the expression, we should be empty:
|
||||
//
|
||||
this->m_pdata->m_expression = 0;
|
||||
this->m_pdata->m_expression_len = 0;
|
||||
//
|
||||
// and throw if required:
|
||||
//
|
||||
if(0 == (this->flags() & regex_constants::no_except))
|
||||
{
|
||||
std::string message = this->m_pdata->m_ptraits->error_string(boost::regex_constants::error_bad_pattern);
|
||||
boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
|
||||
e.raise();
|
||||
}
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
state = state->next.p;
|
||||
}
|
||||
}
|
||||
|
||||
template <class charT, class traits>
|
||||
void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state)
|
||||
{
|
||||
@ -953,6 +1056,7 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
|
||||
create_startmap(state->next.p, 0, pnull, mask);
|
||||
return;
|
||||
}
|
||||
case syntax_element_recurse:
|
||||
case syntax_element_backref:
|
||||
// can be null, and any character can match:
|
||||
if(pnull)
|
||||
|
@ -78,6 +78,8 @@ private:
|
||||
const charT* m_end; // the end of the string being parsed
|
||||
const charT* m_position; // our current parser position
|
||||
unsigned m_mark_count; // how many sub-expressions we have
|
||||
int m_mark_reset; // used to indicate that we're inside a (?|...) block.
|
||||
unsigned m_max_mark; // largest mark count seen inside a (?|...) block.
|
||||
std::ptrdiff_t m_paren_start; // where the last seen ')' began (where repeats are inserted).
|
||||
std::ptrdiff_t m_alt_insert_point; // where to insert the next alternative
|
||||
bool m_has_case_change; // true if somewhere in the current block the case has changed
|
||||
@ -96,7 +98,7 @@ private:
|
||||
|
||||
template <class charT, class traits>
|
||||
basic_regex_parser<charT, traits>::basic_regex_parser(regex_data<charT, traits>* data)
|
||||
: basic_regex_creator<charT, traits>(data), m_mark_count(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false)
|
||||
: basic_regex_creator<charT, traits>(data), m_mark_count(0), m_mark_reset(-1), m_max_mark(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -123,8 +125,16 @@ void basic_regex_parser<charT, traits>::parse(const charT* p1, const charT* p2,
|
||||
switch(l_flags & regbase::main_option_type)
|
||||
{
|
||||
case regbase::perl_syntax_group:
|
||||
m_parser_proc = &basic_regex_parser<charT, traits>::parse_extended;
|
||||
break;
|
||||
{
|
||||
m_parser_proc = &basic_regex_parser<charT, traits>::parse_extended;
|
||||
//
|
||||
// Add a leading paren with index zero to give recursions a target:
|
||||
//
|
||||
re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
|
||||
br->index = 0;
|
||||
br->icase = this->flags() & regbase::icase;
|
||||
break;
|
||||
}
|
||||
case regbase::basic_syntax_group:
|
||||
m_parser_proc = &basic_regex_parser<charT, traits>::parse_basic;
|
||||
break;
|
||||
@ -375,11 +385,17 @@ bool basic_regex_parser<charT, traits>::parse_open_paren()
|
||||
if(0 == (this->flags() & regbase::nosubs))
|
||||
{
|
||||
markid = ++m_mark_count;
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
if(this->flags() & regbase::save_subexpression_location)
|
||||
this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>(std::distance(m_base, m_position) - 1, 0));
|
||||
#else
|
||||
if(this->flags() & regbase::save_subexpression_location)
|
||||
this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>((m_position - m_base) - 1, 0));
|
||||
#endif
|
||||
}
|
||||
re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
|
||||
pb->index = markid;
|
||||
pb->icase = this->flags() & regbase::icase;
|
||||
std::ptrdiff_t last_paren_start = this->getoffset(pb);
|
||||
// back up insertion point for alternations, and set new point:
|
||||
std::ptrdiff_t last_alt_point = m_alt_insert_point;
|
||||
@ -392,6 +408,11 @@ bool basic_regex_parser<charT, traits>::parse_open_paren()
|
||||
bool old_case_change = m_has_case_change;
|
||||
m_has_case_change = false; // no changes to this scope as yet...
|
||||
//
|
||||
// Back up branch reset data in case we have a nested (?|...)
|
||||
//
|
||||
int mark_reset = m_mark_reset;
|
||||
m_mark_reset = -1;
|
||||
//
|
||||
// now recursively add more states, this will terminate when we get to a
|
||||
// matching ')' :
|
||||
//
|
||||
@ -416,6 +437,10 @@ bool basic_regex_parser<charT, traits>::parse_open_paren()
|
||||
this->flags(opts);
|
||||
m_has_case_change = old_case_change;
|
||||
//
|
||||
// restore branch reset:
|
||||
//
|
||||
m_mark_reset = mark_reset;
|
||||
//
|
||||
// we either have a ')' or we have run out of characters prematurely:
|
||||
//
|
||||
if(m_position == m_end)
|
||||
@ -424,14 +449,20 @@ bool basic_regex_parser<charT, traits>::parse_open_paren()
|
||||
return false;
|
||||
}
|
||||
BOOST_ASSERT(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark);
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
if(markid && (this->flags() & regbase::save_subexpression_location))
|
||||
this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position);
|
||||
#else
|
||||
if(markid && (this->flags() & regbase::save_subexpression_location))
|
||||
this->m_pdata->m_subs.at(markid - 1).second = (m_position - m_base);
|
||||
#endif
|
||||
++m_position;
|
||||
//
|
||||
// append closing parenthesis state:
|
||||
//
|
||||
pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
|
||||
pb->index = markid;
|
||||
pb->icase = this->flags() & regbase::icase;
|
||||
this->m_paren_start = last_paren_start;
|
||||
//
|
||||
// restore the alternate insertion point:
|
||||
@ -600,6 +631,7 @@ bool basic_regex_parser<charT, traits>::parse_extended_escape()
|
||||
// fall through:
|
||||
case regex_constants::escape_type_class:
|
||||
{
|
||||
escape_type_class_jump:
|
||||
typedef typename traits::char_class_type mask_type;
|
||||
mask_type m = this->m_traits.lookup_classname(m_position, m_position+1);
|
||||
if(m != 0)
|
||||
@ -709,7 +741,104 @@ bool basic_regex_parser<charT, traits>::parse_extended_escape()
|
||||
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;
|
||||
pb->icase = this->flags() & regbase::icase;
|
||||
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(i < 0)
|
||||
{
|
||||
// Check for a named capture:
|
||||
const charT* base = m_position;
|
||||
while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
|
||||
++m_position;
|
||||
i = this->m_pdata->get_id(base, m_position);
|
||||
pc = m_position;
|
||||
}
|
||||
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;
|
||||
pb->icase = this->flags() & regbase::icase;
|
||||
}
|
||||
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;
|
||||
// fallthrough:
|
||||
default:
|
||||
this->append_literal(unescape_character());
|
||||
break;
|
||||
@ -737,6 +866,7 @@ template <class charT, class traits>
|
||||
bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_t high)
|
||||
{
|
||||
bool greedy = true;
|
||||
bool pocessive = false;
|
||||
std::size_t insert_point;
|
||||
//
|
||||
// when we get to here we may have a non-greedy ? mark still to come:
|
||||
@ -748,12 +878,19 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
|
||||
)
|
||||
)
|
||||
{
|
||||
// OK we have a perl regex, check for a '?':
|
||||
// OK we have a perl or emacs regex, check for a '?':
|
||||
if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question)
|
||||
{
|
||||
greedy = false;
|
||||
++m_position;
|
||||
}
|
||||
// for perl regexes only check for pocessive ++ repeats.
|
||||
if((0 == (this->flags() & regbase::main_option_type))
|
||||
&& (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus))
|
||||
{
|
||||
pocessive = true;
|
||||
++m_position;
|
||||
}
|
||||
}
|
||||
if(0 == this->m_last_state)
|
||||
{
|
||||
@ -822,6 +959,22 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
|
||||
// now fill in the alt jump for the repeat:
|
||||
rep = static_cast<re_repeat*>(this->getaddress(rep_off));
|
||||
rep->alt.i = this->m_pdata->m_data.size() - rep_off;
|
||||
//
|
||||
// If the repeat is pocessive then bracket the repeat with a (?>...)
|
||||
// independent sub-expression construct:
|
||||
//
|
||||
if(pocessive)
|
||||
{
|
||||
re_brace* pb = static_cast<re_brace*>(this->insert_state(insert_point, syntax_element_startmark, sizeof(re_brace)));
|
||||
pb->index = -3;
|
||||
pb->icase = this->flags() & regbase::icase;
|
||||
re_jump* jmp = static_cast<re_jump*>(this->insert_state(insert_point + sizeof(re_brace), syntax_element_jump, sizeof(re_jump)));
|
||||
this->m_pdata->m_data.align();
|
||||
jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp);
|
||||
pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
|
||||
pb->index = -3;
|
||||
pb->icase = this->flags() & regbase::icase;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -944,6 +1097,14 @@ bool basic_regex_parser<charT, traits>::parse_alt()
|
||||
fail(regex_constants::error_empty, this->m_position - this->m_base);
|
||||
return false;
|
||||
}
|
||||
//
|
||||
// Reset mark count if required:
|
||||
//
|
||||
if(m_max_mark < m_mark_count)
|
||||
m_max_mark = m_mark_count;
|
||||
if(m_mark_reset >= 0)
|
||||
m_mark_count = m_mark_reset;
|
||||
|
||||
++m_position;
|
||||
//
|
||||
// we need to append a trailing jump:
|
||||
@ -1462,7 +1623,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);
|
||||
@ -1568,6 +1729,7 @@ bool basic_regex_parser<charT, traits>::parse_backref()
|
||||
m_position = pc;
|
||||
re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_backref, sizeof(re_brace)));
|
||||
pb->index = i;
|
||||
pb->icase = this->flags() & regbase::icase;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1655,6 +1817,7 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
|
||||
int markid = 0;
|
||||
std::ptrdiff_t jump_offset = 0;
|
||||
re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
|
||||
pb->icase = this->flags() & regbase::icase;
|
||||
std::ptrdiff_t last_paren_start = this->getoffset(pb);
|
||||
// back up insertion point for alternations, and set new point:
|
||||
std::ptrdiff_t last_alt_point = m_alt_insert_point;
|
||||
@ -1665,11 +1828,18 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
|
||||
regex_constants::syntax_option_type old_flags = this->flags();
|
||||
bool old_case_change = m_has_case_change;
|
||||
m_has_case_change = false;
|
||||
charT name_delim;
|
||||
int mark_reset = m_mark_reset;
|
||||
m_mark_reset = -1;
|
||||
int v;
|
||||
//
|
||||
// select the actual extension used:
|
||||
//
|
||||
switch(this->m_traits.syntax_type(*m_position))
|
||||
{
|
||||
case regex_constants::syntax_or:
|
||||
m_mark_reset = m_mark_count;
|
||||
// fall through:
|
||||
case regex_constants::syntax_colon:
|
||||
//
|
||||
// a non-capturing mark:
|
||||
@ -1677,6 +1847,57 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
|
||||
pb->index = markid = 0;
|
||||
++m_position;
|
||||
break;
|
||||
case regex_constants::syntax_digit:
|
||||
{
|
||||
//
|
||||
// a recursive subexpression:
|
||||
//
|
||||
v = this->m_traits.toi(m_position, m_end, 10);
|
||||
if((v < 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
|
||||
{
|
||||
fail(regex_constants::error_backref, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
insert_recursion:
|
||||
pb->index = markid = 0;
|
||||
static_cast<re_jump*>(this->append_state(syntax_element_recurse, sizeof(re_jump)))->alt.i = v;
|
||||
static_cast<re_case*>(
|
||||
this->append_state(syntax_element_toggle_case, sizeof(re_case))
|
||||
)->icase = this->flags() & regbase::icase;
|
||||
break;
|
||||
}
|
||||
case regex_constants::syntax_plus:
|
||||
//
|
||||
// A forward-relative recursive subexpression:
|
||||
//
|
||||
++m_position;
|
||||
v = this->m_traits.toi(m_position, m_end, 10);
|
||||
if((v <= 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
|
||||
{
|
||||
fail(regex_constants::error_backref, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
v += m_mark_count;
|
||||
goto insert_recursion;
|
||||
case regex_constants::syntax_dash:
|
||||
//
|
||||
// Possibly a backward-relative recursive subexpression:
|
||||
//
|
||||
++m_position;
|
||||
v = this->m_traits.toi(m_position, m_end, 10);
|
||||
if(v <= 0)
|
||||
{
|
||||
--m_position;
|
||||
// Oops not a relative recursion at all, but a (?-imsx) group:
|
||||
goto option_group_jump;
|
||||
}
|
||||
v = m_mark_count + 1 - v;
|
||||
if(v <= 0)
|
||||
{
|
||||
fail(regex_constants::error_backref, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
goto insert_recursion;
|
||||
case regex_constants::syntax_equal:
|
||||
pb->index = markid = -1;
|
||||
++m_position;
|
||||
@ -1706,8 +1927,10 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
|
||||
pb->index = markid = -1;
|
||||
else
|
||||
{
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
// Probably a named capture which also starts (?< :
|
||||
name_delim = '>';
|
||||
--m_position;
|
||||
goto named_capture_jump;
|
||||
}
|
||||
++m_position;
|
||||
jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump)));
|
||||
@ -1736,7 +1959,95 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
|
||||
return false;
|
||||
}
|
||||
int v = this->m_traits.toi(m_position, m_end, 10);
|
||||
if(v > 0)
|
||||
if(*m_position == charT('R'))
|
||||
{
|
||||
if(++m_position == m_end)
|
||||
{
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
if(*m_position == charT('&'))
|
||||
{
|
||||
const charT* base = ++m_position;
|
||||
while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
|
||||
++m_position;
|
||||
if(m_position == m_end)
|
||||
{
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
v = -static_cast<int>(hash_value_from_capture_name(base, m_position));
|
||||
}
|
||||
else
|
||||
{
|
||||
v = -this->m_traits.toi(m_position, m_end, 10);
|
||||
}
|
||||
re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
|
||||
br->index = v < 0 ? (v - 1) : 0;
|
||||
if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
|
||||
{
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
if(++m_position == m_end)
|
||||
{
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if((*m_position == charT('\'')) || (*m_position == charT('<')))
|
||||
{
|
||||
const charT* base = ++m_position;
|
||||
while((m_position != m_end) && (*m_position != charT('>')) && (*m_position != charT('\'')))
|
||||
++m_position;
|
||||
if(m_position == m_end)
|
||||
{
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
v = static_cast<int>(hash_value_from_capture_name(base, m_position));
|
||||
re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
|
||||
br->index = v;
|
||||
if((*m_position != charT('>')) && (*m_position != charT('\'')) || (++m_position == m_end))
|
||||
{
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
|
||||
{
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
if(++m_position == m_end)
|
||||
{
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if(*m_position == charT('D'))
|
||||
{
|
||||
const char* def = "DEFINE";
|
||||
while(*def && (m_position != m_end) && (*m_position == charT(*def)))
|
||||
++m_position, ++def;
|
||||
if((m_position == m_end) || *def)
|
||||
{
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
|
||||
br->index = 9999; // special magic value!
|
||||
if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
|
||||
{
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
if(++m_position == m_end)
|
||||
{
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if(v > 0)
|
||||
{
|
||||
re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
|
||||
br->index = v;
|
||||
@ -1784,7 +2095,7 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
|
||||
if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal)
|
||||
&& (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not))
|
||||
{
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
fail(regex_constants::error_paren, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
m_position -= 2;
|
||||
@ -1795,10 +2106,93 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
|
||||
case regex_constants::syntax_close_mark:
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
case regex_constants::escape_type_end_buffer:
|
||||
{
|
||||
name_delim = *m_position;
|
||||
named_capture_jump:
|
||||
markid = 0;
|
||||
if(0 == (this->flags() & regbase::nosubs))
|
||||
{
|
||||
markid = ++m_mark_count;
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
if(this->flags() & regbase::save_subexpression_location)
|
||||
this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>(std::distance(m_base, m_position) - 2, 0));
|
||||
#else
|
||||
if(this->flags() & regbase::save_subexpression_location)
|
||||
this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>((m_position - m_base) - 2, 0));
|
||||
#endif
|
||||
}
|
||||
pb->index = markid;
|
||||
const charT* base = ++m_position;
|
||||
if(m_position == m_end)
|
||||
{
|
||||
fail(regex_constants::error_paren, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
while((m_position != m_end) && (*m_position != name_delim))
|
||||
++m_position;
|
||||
if(m_position == m_end)
|
||||
{
|
||||
fail(regex_constants::error_paren, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
this->m_pdata->set_name(base, m_position, markid);
|
||||
++m_position;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if(*m_position == charT('R'))
|
||||
{
|
||||
++m_position;
|
||||
v = 0;
|
||||
if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
|
||||
{
|
||||
fail(regex_constants::error_backref, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
goto insert_recursion;
|
||||
}
|
||||
if(*m_position == charT('&'))
|
||||
{
|
||||
++m_position;
|
||||
const charT* base = m_position;
|
||||
while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
|
||||
++m_position;
|
||||
if(m_position == m_end)
|
||||
{
|
||||
fail(regex_constants::error_backref, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
v = static_cast<int>(hash_value_from_capture_name(base, m_position));
|
||||
goto insert_recursion;
|
||||
}
|
||||
if(*m_position == charT('P'))
|
||||
{
|
||||
++m_position;
|
||||
if(m_position == m_end)
|
||||
{
|
||||
fail(regex_constants::error_backref, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
if(*m_position == charT('>'))
|
||||
{
|
||||
++m_position;
|
||||
const charT* base = m_position;
|
||||
while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
|
||||
++m_position;
|
||||
if(m_position == m_end)
|
||||
{
|
||||
fail(regex_constants::error_backref, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
v = static_cast<int>(hash_value_from_capture_name(base, m_position));
|
||||
goto insert_recursion;
|
||||
}
|
||||
}
|
||||
//
|
||||
// lets assume that we have a (?imsx) group and try and parse it:
|
||||
//
|
||||
option_group_jump:
|
||||
regex_constants::syntax_option_type opts = parse_options();
|
||||
if(m_position == m_end)
|
||||
return false;
|
||||
@ -1897,9 +2291,20 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
|
||||
}
|
||||
else if(this->getaddress(static_cast<re_alt*>(b)->alt.i, b)->type == syntax_element_alt)
|
||||
{
|
||||
// Can't have seen more than one alternative:
|
||||
fail(regex_constants::error_bad_pattern, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// We must *not* have seen an alternative inside a (DEFINE) block:
|
||||
b = this->getaddress(b->next.i, b);
|
||||
if((b->type == syntax_element_assert_backref) && (static_cast<re_brace*>(b)->index == 9999))
|
||||
{
|
||||
fail(regex_constants::error_bad_pattern, m_position - m_base);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// check for invalid repetition of next state:
|
||||
b = this->getaddress(expected_alt_point);
|
||||
b = this->getaddress(static_cast<re_alt*>(b)->next.i, b);
|
||||
@ -1915,6 +2320,7 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
|
||||
//
|
||||
pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
|
||||
pb->index = markid;
|
||||
pb->icase = this->flags() & regbase::icase;
|
||||
this->m_paren_start = last_paren_start;
|
||||
//
|
||||
// restore the alternate insertion point:
|
||||
@ -1924,6 +2330,31 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
|
||||
// and the case change data:
|
||||
//
|
||||
m_has_case_change = old_case_change;
|
||||
//
|
||||
// And the mark_reset data:
|
||||
//
|
||||
if(m_max_mark > m_mark_count)
|
||||
{
|
||||
m_mark_count = m_max_mark;
|
||||
}
|
||||
m_mark_reset = mark_reset;
|
||||
|
||||
|
||||
if(markid > 0)
|
||||
{
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
if(this->flags() & regbase::save_subexpression_location)
|
||||
this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position) - 1;
|
||||
#else
|
||||
if(this->flags() & regbase::save_subexpression_location)
|
||||
this->m_pdata->m_subs.at(markid - 1).second = (m_position - m_base) - 1;
|
||||
#endif
|
||||
//
|
||||
// allow backrefs to this mark:
|
||||
//
|
||||
if((markid > 0) && (markid < (int)(sizeof(unsigned) * CHAR_BIT)))
|
||||
this->m_backrefs |= 1u << (markid - 1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -394,7 +394,9 @@ enum
|
||||
char_class_graph=char_class_alnum|char_class_punct,
|
||||
char_class_blank=1<<9,
|
||||
char_class_word=1<<10,
|
||||
char_class_unicode=1<<11
|
||||
char_class_unicode=1<<11,
|
||||
char_class_horizontal_space=1<<12,
|
||||
char_class_vertical_space=1<<13
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -413,6 +415,8 @@ public:
|
||||
BOOST_STATIC_CONSTANT(char_class_type, mask_blank = 1u << 24);
|
||||
BOOST_STATIC_CONSTANT(char_class_type, mask_word = 1u << 25);
|
||||
BOOST_STATIC_CONSTANT(char_class_type, mask_unicode = 1u << 26);
|
||||
BOOST_STATIC_CONSTANT(char_class_type, mask_horizontal = 1u << 27);
|
||||
BOOST_STATIC_CONSTANT(char_class_type, mask_vertical = 1u << 28);
|
||||
#endif
|
||||
|
||||
typedef std::basic_string<charT> string_type;
|
||||
@ -477,6 +481,10 @@ template <class charT>
|
||||
typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex_traits_implementation<charT>::mask_word;
|
||||
template <class charT>
|
||||
typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex_traits_implementation<charT>::mask_unicode;
|
||||
template <class charT>
|
||||
typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex_traits_implementation<charT>::mask_vertical;
|
||||
template <class charT>
|
||||
typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex_traits_implementation<charT>::mask_horizontal;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -688,18 +696,20 @@ void cpp_regex_traits_implementation<charT>::init()
|
||||
// Custom class names:
|
||||
//
|
||||
#ifndef BOOST_REGEX_BUGGY_CTYPE_FACET
|
||||
static const char_class_type masks[14] =
|
||||
static const char_class_type masks[16] =
|
||||
{
|
||||
std::ctype<charT>::alnum,
|
||||
std::ctype<charT>::alpha,
|
||||
std::ctype<charT>::cntrl,
|
||||
std::ctype<charT>::digit,
|
||||
std::ctype<charT>::graph,
|
||||
cpp_regex_traits_implementation<charT>::mask_horizontal,
|
||||
std::ctype<charT>::lower,
|
||||
std::ctype<charT>::print,
|
||||
std::ctype<charT>::punct,
|
||||
std::ctype<charT>::space,
|
||||
std::ctype<charT>::upper,
|
||||
cpp_regex_traits_implementation<charT>::mask_vertical,
|
||||
std::ctype<charT>::xdigit,
|
||||
cpp_regex_traits_implementation<charT>::mask_blank,
|
||||
cpp_regex_traits_implementation<charT>::mask_word,
|
||||
@ -713,11 +723,13 @@ void cpp_regex_traits_implementation<charT>::init()
|
||||
::boost::re_detail::char_class_cntrl,
|
||||
::boost::re_detail::char_class_digit,
|
||||
::boost::re_detail::char_class_graph,
|
||||
::boost::re_detail::char_class_horizontal_space,
|
||||
::boost::re_detail::char_class_lower,
|
||||
::boost::re_detail::char_class_print,
|
||||
::boost::re_detail::char_class_punct,
|
||||
::boost::re_detail::char_class_space,
|
||||
::boost::re_detail::char_class_upper,
|
||||
::boost::re_detail::char_class_vertical_space,
|
||||
::boost::re_detail::char_class_xdigit,
|
||||
::boost::re_detail::char_class_blank,
|
||||
::boost::re_detail::char_class_word,
|
||||
@ -744,7 +756,7 @@ typename cpp_regex_traits_implementation<charT>::char_class_type
|
||||
cpp_regex_traits_implementation<charT>::lookup_classname_imp(const charT* p1, const charT* p2) const
|
||||
{
|
||||
#ifndef BOOST_REGEX_BUGGY_CTYPE_FACET
|
||||
static const char_class_type masks[20] =
|
||||
static const char_class_type masks[22] =
|
||||
{
|
||||
0,
|
||||
std::ctype<char>::alnum,
|
||||
@ -754,6 +766,7 @@ typename cpp_regex_traits_implementation<charT>::char_class_type
|
||||
std::ctype<char>::digit,
|
||||
std::ctype<char>::digit,
|
||||
std::ctype<char>::graph,
|
||||
cpp_regex_traits_implementation<charT>::mask_horizontal,
|
||||
std::ctype<char>::lower,
|
||||
std::ctype<char>::lower,
|
||||
std::ctype<char>::print,
|
||||
@ -763,12 +776,13 @@ typename cpp_regex_traits_implementation<charT>::char_class_type
|
||||
std::ctype<char>::upper,
|
||||
cpp_regex_traits_implementation<charT>::mask_unicode,
|
||||
std::ctype<char>::upper,
|
||||
cpp_regex_traits_implementation<charT>::mask_vertical,
|
||||
std::ctype<char>::alnum | cpp_regex_traits_implementation<charT>::mask_word,
|
||||
std::ctype<char>::alnum | cpp_regex_traits_implementation<charT>::mask_word,
|
||||
std::ctype<char>::xdigit,
|
||||
};
|
||||
#else
|
||||
static const char_class_type masks[20] =
|
||||
static const char_class_type masks[22] =
|
||||
{
|
||||
0,
|
||||
::boost::re_detail::char_class_alnum,
|
||||
@ -778,6 +792,7 @@ typename cpp_regex_traits_implementation<charT>::char_class_type
|
||||
::boost::re_detail::char_class_digit,
|
||||
::boost::re_detail::char_class_digit,
|
||||
::boost::re_detail::char_class_graph,
|
||||
::boost::re_detail::char_class_horizontal_space,
|
||||
::boost::re_detail::char_class_lower,
|
||||
::boost::re_detail::char_class_lower,
|
||||
::boost::re_detail::char_class_print,
|
||||
@ -787,6 +802,7 @@ typename cpp_regex_traits_implementation<charT>::char_class_type
|
||||
::boost::re_detail::char_class_upper,
|
||||
::boost::re_detail::char_class_unicode,
|
||||
::boost::re_detail::char_class_upper,
|
||||
::boost::re_detail::char_class_vertical_space,
|
||||
::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word,
|
||||
::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word,
|
||||
::boost::re_detail::char_class_xdigit,
|
||||
@ -820,7 +836,9 @@ bool cpp_regex_traits_implementation<charT>::isctype(const charT c, char_class_t
|
||||
|| ((mask & ::boost::re_detail::char_class_xdigit) && (m_pctype->is(std::ctype<charT>::xdigit, c)))
|
||||
|| ((mask & ::boost::re_detail::char_class_blank) && (m_pctype->is(std::ctype<charT>::space, c)) && !::boost::re_detail::is_separator(c))
|
||||
|| ((mask & ::boost::re_detail::char_class_word) && (c == '_'))
|
||||
|| ((mask & ::boost::re_detail::char_class_unicode) && ::boost::re_detail::is_extended(c));
|
||||
|| ((mask & ::boost::re_detail::char_class_unicode) && ::boost::re_detail::is_extended(c))
|
||||
|| ((mask & ::boost::re_detail::char_class_vertical) && (is_separator(c) || (c == '\v')))
|
||||
|| ((mask & ::boost::re_detail::char_class_horizontal) && m_pctype->is(std::ctype<charT>::space, c) && !(is_separator(c) || (c == '\v')));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -930,6 +948,12 @@ public:
|
||||
&& m_pimpl->m_pctype->is(std::ctype<charT>::space, c)
|
||||
&& !re_detail::is_separator(c))
|
||||
return true;
|
||||
else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_vertical)
|
||||
&& (::boost::re_detail::is_separator(c) || (c == '\v')))
|
||||
return true;
|
||||
else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_horizontal)
|
||||
&& this->isctype(c, std::ctype<charT>::space) && !this->isctype(c, re_detail::cpp_regex_traits_implementation<charT>::mask_vertical))
|
||||
return true;
|
||||
return false;
|
||||
#else
|
||||
return m_pimpl->isctype(c, f);
|
||||
|
@ -31,10 +31,14 @@ namespace detail{
|
||||
template <class I>
|
||||
struct is_random_imp
|
||||
{
|
||||
#ifndef BOOST_NO_STD_ITERATOR_TRAITS
|
||||
private:
|
||||
typedef typename std::iterator_traits<I>::iterator_category cat;
|
||||
public:
|
||||
BOOST_STATIC_CONSTANT(bool, value = (::boost::is_convertible<cat*, std::random_access_iterator_tag*>::value));
|
||||
#else
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
#endif
|
||||
};
|
||||
|
||||
template <class I>
|
||||
|
@ -36,6 +36,13 @@ namespace boost{
|
||||
#pragma warning(disable : 4251 4231 4660)
|
||||
#endif
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
template <class charT>
|
||||
class named_subexpressions;
|
||||
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator>
|
||||
class match_results
|
||||
{
|
||||
@ -62,13 +69,14 @@ public:
|
||||
typedef typename re_detail::regex_iterator_traits<
|
||||
BidiIterator>::value_type char_type;
|
||||
typedef std::basic_string<char_type> string_type;
|
||||
typedef re_detail::named_subexpressions_base<char_type> named_sub_type;
|
||||
|
||||
// construct/copy/destroy:
|
||||
explicit match_results(const Allocator& a = Allocator())
|
||||
#ifndef BOOST_NO_STD_ALLOCATOR
|
||||
: m_subs(a), m_base() {}
|
||||
: m_subs(a), m_base(), m_last_closed_paren(0) {}
|
||||
#else
|
||||
: m_subs(), m_base() { (void)a; }
|
||||
: m_subs(), m_base(), m_last_closed_paren(0) { (void)a; }
|
||||
#endif
|
||||
match_results(const match_results& m)
|
||||
: m_subs(m.m_subs), m_base(m.m_base) {}
|
||||
@ -95,6 +103,24 @@ public:
|
||||
return m_subs[sub].length();
|
||||
return 0;
|
||||
}
|
||||
difference_type length(const char_type* sub) const
|
||||
{
|
||||
const char_type* end = sub;
|
||||
while(*end) ++end;
|
||||
return length(named_subexpression_index(sub, end));
|
||||
}
|
||||
template <class charT>
|
||||
difference_type length(const charT* sub) const
|
||||
{
|
||||
const charT* end = sub;
|
||||
while(*end) ++end;
|
||||
return length(named_subexpression_index(sub, end));
|
||||
}
|
||||
template <class charT, class Traits, class A>
|
||||
difference_type length(const std::basic_string<charT, Traits, A>& sub) const
|
||||
{
|
||||
return length(sub.c_str());
|
||||
}
|
||||
difference_type position(size_type sub = 0) const
|
||||
{
|
||||
sub += 2;
|
||||
@ -108,6 +134,24 @@ public:
|
||||
}
|
||||
return ~static_cast<difference_type>(0);
|
||||
}
|
||||
difference_type position(const char_type* sub) const
|
||||
{
|
||||
const char_type* end = sub;
|
||||
while(*end) ++end;
|
||||
return position(named_subexpression_index(sub, end));
|
||||
}
|
||||
template <class charT>
|
||||
difference_type position(const charT* sub) const
|
||||
{
|
||||
const charT* end = sub;
|
||||
while(*end) ++end;
|
||||
return position(named_subexpression_index(sub, end));
|
||||
}
|
||||
template <class charT, class Traits, class A>
|
||||
difference_type position(const std::basic_string<charT, Traits, A>& sub) const
|
||||
{
|
||||
return position(sub.c_str());
|
||||
}
|
||||
string_type str(int sub = 0) const
|
||||
{
|
||||
sub += 2;
|
||||
@ -122,6 +166,25 @@ public:
|
||||
}
|
||||
return result;
|
||||
}
|
||||
string_type str(const char_type* sub) const
|
||||
{
|
||||
return (*this)[sub].str();
|
||||
}
|
||||
template <class Traits, class A>
|
||||
string_type str(const std::basic_string<char_type, Traits, A>& sub) const
|
||||
{
|
||||
return (*this)[sub].str();
|
||||
}
|
||||
template <class charT>
|
||||
string_type str(const charT* sub) const
|
||||
{
|
||||
return (*this)[sub].str();
|
||||
}
|
||||
template <class charT, class Traits, class A>
|
||||
string_type str(const std::basic_string<charT, Traits, A>& sub) const
|
||||
{
|
||||
return (*this)[sub].str();
|
||||
}
|
||||
const_reference operator[](int sub) const
|
||||
{
|
||||
sub += 2;
|
||||
@ -131,6 +194,75 @@ public:
|
||||
}
|
||||
return m_null;
|
||||
}
|
||||
//
|
||||
// Named sub-expressions:
|
||||
//
|
||||
const_reference named_subexpression(const char_type* i, const char_type* j) const
|
||||
{
|
||||
int index = m_named_subs->get_id(i, j);
|
||||
return index > 0 ? (*this)[index] : m_null;
|
||||
}
|
||||
template <class charT>
|
||||
const_reference named_subexpression(const charT* i, const charT* j) const
|
||||
{
|
||||
BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
|
||||
if(i == j)
|
||||
return m_null;
|
||||
std::vector<char_type> s;
|
||||
while(i != j)
|
||||
s.insert(s.end(), *i++);
|
||||
return named_subexpression(&*s.begin(), &*s.begin() + s.size());
|
||||
}
|
||||
int named_subexpression_index(const char_type* i, const char_type* j) const
|
||||
{
|
||||
int index = m_named_subs->get_id(i, j);
|
||||
return index > 0 ? index : -20;
|
||||
}
|
||||
template <class charT>
|
||||
int named_subexpression_index(const charT* i, const charT* j) const
|
||||
{
|
||||
BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
|
||||
if(i == j)
|
||||
return -20;
|
||||
std::vector<char_type> s;
|
||||
while(i != j)
|
||||
s.insert(s.end(), *i++);
|
||||
return named_subexpression_index(&*s.begin(), &*s.begin() + s.size());
|
||||
}
|
||||
template <class Traits, class A>
|
||||
const_reference operator[](const std::basic_string<char_type, Traits, A>& s) const
|
||||
{
|
||||
return named_subexpression(s.c_str(), s.c_str() + s.size());
|
||||
}
|
||||
const_reference operator[](const char_type* p) const
|
||||
{
|
||||
const char_type* e = p;
|
||||
while(*e) ++e;
|
||||
return named_subexpression(p, e);
|
||||
}
|
||||
|
||||
template <class charT>
|
||||
const_reference operator[](const charT* p) const
|
||||
{
|
||||
BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
|
||||
if(*p == 0)
|
||||
return m_null;
|
||||
std::vector<char_type> s;
|
||||
while(*p)
|
||||
s.insert(s.end(), *p++);
|
||||
return named_subexpression(&*s.begin(), &*s.begin() + s.size());
|
||||
}
|
||||
template <class charT, class Traits, class A>
|
||||
const_reference operator[](const std::basic_string<charT, Traits, A>& ns) const
|
||||
{
|
||||
BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
|
||||
if(ns.empty())
|
||||
return m_null;
|
||||
std::vector<char_type> s;
|
||||
for(unsigned i = 0; i < ns.size(); ++i)
|
||||
s.insert(s.end(), ns[i]);
|
||||
return named_subexpression(&*s.begin(), &*s.begin() + s.size());
|
||||
}
|
||||
|
||||
const_reference prefix() const
|
||||
{
|
||||
@ -186,6 +318,10 @@ public:
|
||||
::boost::re_detail::regex_format_imp(i, *this, fmt.data(), fmt.data() + fmt.size(), flags, re.get_traits());
|
||||
return result;
|
||||
}
|
||||
const_reference get_last_closed_paren()const
|
||||
{
|
||||
return m_last_closed_paren == 0 ? m_null : (*this)[m_last_closed_paren];
|
||||
}
|
||||
|
||||
allocator_type get_allocator() const
|
||||
{
|
||||
@ -230,13 +366,15 @@ 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)
|
||||
{
|
||||
if(pos)
|
||||
m_last_closed_paren = pos;
|
||||
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);
|
||||
@ -261,6 +399,7 @@ public:
|
||||
m_subs.insert(m_subs.end(), n+2-len, v);
|
||||
}
|
||||
m_subs[1].first = i;
|
||||
m_last_closed_paren = 0;
|
||||
}
|
||||
void BOOST_REGEX_CALL set_base(BidiIterator pos)
|
||||
{
|
||||
@ -284,21 +423,34 @@ 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);
|
||||
}
|
||||
void BOOST_REGEX_CALL maybe_assign(const match_results<BidiIterator, Allocator>& m);
|
||||
|
||||
void BOOST_REGEX_CALL set_named_subs(boost::shared_ptr<named_sub_type> subs)
|
||||
{
|
||||
m_named_subs = subs;
|
||||
}
|
||||
|
||||
private:
|
||||
vector_type m_subs; // subexpressions
|
||||
BidiIterator m_base; // where the search started from
|
||||
sub_match<BidiIterator> m_null; // a null match
|
||||
boost::shared_ptr<named_sub_type> m_named_subs;
|
||||
int m_last_closed_paren;
|
||||
};
|
||||
|
||||
template <class BidiIterator, class Allocator>
|
||||
|
@ -285,7 +285,8 @@ public:
|
||||
}
|
||||
~repeater_count()
|
||||
{
|
||||
*stack = next;
|
||||
if(next)
|
||||
*stack = next;
|
||||
}
|
||||
std::size_t get_count() { return count; }
|
||||
int get_id() { return state_id; }
|
||||
@ -325,6 +326,17 @@ enum saved_state_type
|
||||
saved_state_count = 14
|
||||
};
|
||||
|
||||
template <class Results>
|
||||
struct recursion_info
|
||||
{
|
||||
typedef typename Results::value_type value_type;
|
||||
typedef typename value_type::iterator iterator;
|
||||
int id;
|
||||
const re_syntax_base* preturn_address;
|
||||
Results results;
|
||||
repeater_count<iterator>* repeater_stack;
|
||||
};
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4251 4231 4660)
|
||||
@ -340,6 +352,7 @@ public:
|
||||
typedef std::size_t traits_size_type;
|
||||
typedef typename is_byte<char_type>::width_type width_type;
|
||||
typedef typename regex_iterator_traits<BidiIterator>::difference_type difference_type;
|
||||
typedef match_results<BidiIterator, Allocator> results_type;
|
||||
|
||||
perl_matcher(BidiIterator first, BidiIterator end,
|
||||
match_results<BidiIterator, Allocator>& what,
|
||||
@ -348,7 +361,7 @@ public:
|
||||
BidiIterator l_base)
|
||||
: m_result(what), base(first), last(end),
|
||||
position(first), backstop(l_base), re(e), traits_inst(e.get_traits()),
|
||||
m_independent(false), next_count(&rep_obj), rep_obj(&next_count)
|
||||
m_independent(false), next_count(&rep_obj), rep_obj(&next_count), recursion_stack_position(0)
|
||||
{
|
||||
construct_init(e, f);
|
||||
}
|
||||
@ -403,12 +416,17 @@ private:
|
||||
bool match_char_repeat();
|
||||
bool match_dot_repeat_fast();
|
||||
bool match_dot_repeat_slow();
|
||||
bool match_dot_repeat_dispatch()
|
||||
{
|
||||
return ::boost::is_random_access_iterator<BidiIterator>::value ? match_dot_repeat_fast() : match_dot_repeat_slow();
|
||||
}
|
||||
bool match_backstep();
|
||||
bool match_assert_backref();
|
||||
bool match_toggle_case();
|
||||
#ifdef BOOST_REGEX_RECURSIVE
|
||||
bool backtrack_till_match(std::size_t count);
|
||||
#endif
|
||||
bool match_recursion();
|
||||
|
||||
// find procs stored in s_find_vtable:
|
||||
bool find_restart_any();
|
||||
@ -464,6 +482,9 @@ private:
|
||||
typename traits::char_class_type m_word_mask;
|
||||
// the bitmask to use when determining whether a match_any matches a newline or not:
|
||||
unsigned char match_any_mask;
|
||||
// recursion information:
|
||||
recursion_info<results_type> recursion_stack[50];
|
||||
unsigned recursion_stack_position;
|
||||
|
||||
#ifdef BOOST_REGEX_NON_RECURSIVE
|
||||
//
|
||||
@ -487,6 +508,8 @@ private:
|
||||
bool unwind_short_set_repeat(bool);
|
||||
bool unwind_long_set_repeat(bool);
|
||||
bool unwind_non_greedy_repeat(bool);
|
||||
bool unwind_recursion(bool);
|
||||
bool unwind_recursion_pop(bool);
|
||||
void destroy_single_repeat();
|
||||
void push_matched_paren(int index, const sub_match<BidiIterator>& sub);
|
||||
void push_recursion_stopper();
|
||||
@ -495,7 +518,8 @@ private:
|
||||
void push_repeater_count(int i, repeater_count<BidiIterator>** s);
|
||||
void push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id);
|
||||
void push_non_greedy_repeat(const re_syntax_base* ps);
|
||||
|
||||
void push_recursion(int id, const re_syntax_base* p, results_type* presults);
|
||||
void push_recursion_pop();
|
||||
|
||||
// pointer to base of stack:
|
||||
saved_state* m_stack_base;
|
||||
|
@ -200,12 +200,13 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_imp()
|
||||
m_match_flags |= regex_constants::match_all;
|
||||
m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), search_base, last);
|
||||
m_presult->set_base(base);
|
||||
m_presult->set_named_subs(re_detail::convert_to_named_subs<typename match_results<BidiIterator>::char_type>(this->re.get_named_subs()));
|
||||
if(m_match_flags & match_posix)
|
||||
m_result = *m_presult;
|
||||
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)
|
||||
}
|
||||
@ -261,6 +262,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::find_imp()
|
||||
pstate = re.get_first_state();
|
||||
m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), base, last);
|
||||
m_presult->set_base(base);
|
||||
m_presult->set_named_subs(re_detail::convert_to_named_subs<typename match_results<BidiIterator>::char_type>(this->re.get_named_subs()));
|
||||
m_match_flags |= regex_constants::match_init;
|
||||
}
|
||||
else
|
||||
@ -343,25 +345,6 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_prefix()
|
||||
return m_has_found_match;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_endmark()
|
||||
{
|
||||
int index = static_cast<const re_brace*>(pstate)->index;
|
||||
if(index > 0)
|
||||
{
|
||||
if((m_match_flags & match_nosubs) == 0)
|
||||
m_presult->set_second(position, index);
|
||||
}
|
||||
else if((index < 0) && (index != -4))
|
||||
{
|
||||
// matched forward lookahead:
|
||||
pstate = 0;
|
||||
return true;
|
||||
}
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_literal()
|
||||
{
|
||||
@ -462,35 +445,6 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_wild()
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_match()
|
||||
{
|
||||
if((m_match_flags & match_not_null) && (position == (*m_presult)[0].first))
|
||||
return false;
|
||||
if((m_match_flags & match_all) && (position != last))
|
||||
return false;
|
||||
if((m_match_flags & regex_constants::match_not_initial_null) && (position == search_base))
|
||||
return false;
|
||||
m_presult->set_second(position);
|
||||
pstate = 0;
|
||||
m_has_found_match = true;
|
||||
if((m_match_flags & match_posix) == match_posix)
|
||||
{
|
||||
m_result.maybe_assign(*m_presult);
|
||||
if((m_match_flags & match_any) == 0)
|
||||
return false;
|
||||
}
|
||||
#ifdef BOOST_REGEX_MATCH_EXTRA
|
||||
if(match_extra & m_match_flags)
|
||||
{
|
||||
for(unsigned i = 0; i < m_presult->size(); ++i)
|
||||
if((*m_presult)[i].matched)
|
||||
((*m_presult)[i]).get_captures().push_back((*m_presult)[i]);
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary()
|
||||
{
|
||||
@ -758,8 +712,32 @@ template <class BidiIterator, class Allocator, class traits>
|
||||
inline bool perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref()
|
||||
{
|
||||
// return true if marked sub-expression N has been matched:
|
||||
bool result = (*m_presult)[static_cast<const re_brace*>(pstate)->index].matched;
|
||||
pstate = pstate->next.p;
|
||||
int index = static_cast<const re_brace*>(pstate)->index;
|
||||
bool result;
|
||||
if(index == 9999)
|
||||
{
|
||||
// Magic value for a (DEFINE) block:
|
||||
return false;
|
||||
}
|
||||
else if(index > 0)
|
||||
{
|
||||
// Check if index is a hash value:
|
||||
if(index >= 10000)
|
||||
index = re.get_data().get_id(index);
|
||||
// Have we matched subexpression "index"?
|
||||
result = (*m_presult)[index].matched;
|
||||
pstate = pstate->next.p;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Have we recursed into subexpression "index"?
|
||||
// If index == 0 then check for any recursion at all, otherwise for recursion to -index-1.
|
||||
int id = -index-1;
|
||||
if(id >= 10000)
|
||||
id = re.get_data().get_id(id);
|
||||
result = recursion_stack_position && ((recursion_stack[recursion_stack_position-1].id == id) || (index == 0));
|
||||
pstate = pstate->next.p;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -127,10 +127,21 @@ struct saved_single_repeat : public saved_state
|
||||
: saved_state(arg_id), count(c), rep(r), last_position(lp){}
|
||||
};
|
||||
|
||||
template <class Results>
|
||||
struct saved_recursion : public saved_state
|
||||
{
|
||||
saved_recursion(int id, const re_syntax_base* p, Results* pr)
|
||||
: saved_state(14), recursion_id(id), preturn_address(p), results(*pr)
|
||||
{}
|
||||
int recursion_id;
|
||||
const re_syntax_base* preturn_address;
|
||||
Results results;
|
||||
};
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
|
||||
{
|
||||
static matcher_proc_type const s_match_vtable[29] =
|
||||
static matcher_proc_type const s_match_vtable[30] =
|
||||
{
|
||||
(&perl_matcher<BidiIterator, Allocator, traits>::match_startmark),
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_endmark,
|
||||
@ -154,13 +165,18 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_combining,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_soft_buffer_end,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_restart_continue,
|
||||
(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
|
||||
// Although this next line *should* be evaluated at compile time, in practice
|
||||
// some compilers (VC++) emit run-time initialisation which breaks thread
|
||||
// safety, so use a dispatch function instead:
|
||||
//(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_dispatch,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_backstep,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_recursion,
|
||||
};
|
||||
|
||||
push_recursion_stopper();
|
||||
@ -209,7 +225,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)
|
||||
@ -312,10 +328,26 @@ inline void perl_matcher<BidiIterator, Allocator, traits>::push_single_repeat(st
|
||||
m_backup_state = pmp;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion(int id, const re_syntax_base* p, results_type* presults)
|
||||
{
|
||||
saved_recursion<results_type>* pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
|
||||
--pmp;
|
||||
if(pmp < m_stack_base)
|
||||
{
|
||||
extend_stack();
|
||||
pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
|
||||
--pmp;
|
||||
}
|
||||
(void) new (pmp)saved_recursion<results_type>(id, p, presults);
|
||||
m_backup_state = pmp;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_startmark()
|
||||
{
|
||||
int index = static_cast<const re_brace*>(pstate)->index;
|
||||
icase = static_cast<const re_brace*>(pstate)->icase;
|
||||
switch(index)
|
||||
{
|
||||
case 0:
|
||||
@ -400,6 +432,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);
|
||||
@ -848,6 +887,100 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_recursion()
|
||||
{
|
||||
BOOST_ASSERT(pstate->type == syntax_element_recurse);
|
||||
//
|
||||
// Backup call stack:
|
||||
//
|
||||
push_recursion_pop();
|
||||
//
|
||||
// Set new call stack:
|
||||
//
|
||||
if(recursion_stack_position >= static_cast<int>(sizeof(recursion_stack)/sizeof(recursion_stack[0])))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
recursion_stack[recursion_stack_position].preturn_address = pstate->next.p;
|
||||
recursion_stack[recursion_stack_position].results = *m_presult;
|
||||
pstate = static_cast<const re_jump*>(pstate)->alt.p;
|
||||
recursion_stack[recursion_stack_position].id = static_cast<const re_brace*>(pstate)->index;
|
||||
++recursion_stack_position;
|
||||
//BOOST_ASSERT(recursion_stack[recursion_stack_position-1].id);
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_endmark()
|
||||
{
|
||||
int index = static_cast<const re_brace*>(pstate)->index;
|
||||
icase = static_cast<const re_brace*>(pstate)->icase;
|
||||
if(index > 0)
|
||||
{
|
||||
if((m_match_flags & match_nosubs) == 0)
|
||||
{
|
||||
m_presult->set_second(position, index);
|
||||
}
|
||||
if(recursion_stack_position)
|
||||
{
|
||||
if(index == recursion_stack[recursion_stack_position-1].id)
|
||||
{
|
||||
--recursion_stack_position;
|
||||
pstate = recursion_stack[recursion_stack_position].preturn_address;
|
||||
*m_presult = recursion_stack[recursion_stack_position].results;
|
||||
push_recursion(recursion_stack[recursion_stack_position].id, recursion_stack[recursion_stack_position].preturn_address, &recursion_stack[recursion_stack_position].results);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if((index < 0) && (index != -4))
|
||||
{
|
||||
// matched forward lookahead:
|
||||
pstate = 0;
|
||||
return true;
|
||||
}
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_match()
|
||||
{
|
||||
if(recursion_stack_position)
|
||||
{
|
||||
BOOST_ASSERT(0 == recursion_stack[recursion_stack_position-1].id);
|
||||
--recursion_stack_position;
|
||||
pstate = recursion_stack[recursion_stack_position].preturn_address;
|
||||
*m_presult = recursion_stack[recursion_stack_position].results;
|
||||
push_recursion(recursion_stack[recursion_stack_position].id, recursion_stack[recursion_stack_position].preturn_address, &recursion_stack[recursion_stack_position].results);
|
||||
return true;
|
||||
}
|
||||
if((m_match_flags & match_not_null) && (position == (*m_presult)[0].first))
|
||||
return false;
|
||||
if((m_match_flags & match_all) && (position != last))
|
||||
return false;
|
||||
if((m_match_flags & regex_constants::match_not_initial_null) && (position == search_base))
|
||||
return false;
|
||||
m_presult->set_second(position);
|
||||
pstate = 0;
|
||||
m_has_found_match = true;
|
||||
if((m_match_flags & match_posix) == match_posix)
|
||||
{
|
||||
m_result.maybe_assign(*m_presult);
|
||||
if((m_match_flags & match_any) == 0)
|
||||
return false;
|
||||
}
|
||||
#ifdef BOOST_REGEX_MATCH_EXTRA
|
||||
if(match_extra & m_match_flags)
|
||||
{
|
||||
for(unsigned i = 0; i < m_presult->size(); ++i)
|
||||
if((*m_presult)[i].matched)
|
||||
((*m_presult)[i]).get_captures().push_back((*m_presult)[i]);
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Unwind and associated proceedures follow, these perform what normal stack
|
||||
@ -858,7 +991,7 @@ unwinding does in the recursive implementation.
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::unwind(bool have_match)
|
||||
{
|
||||
static unwind_proc_type const s_unwind_table[14] =
|
||||
static unwind_proc_type const s_unwind_table[18] =
|
||||
{
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::unwind_end,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::unwind_paren,
|
||||
@ -874,6 +1007,8 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind(bool have_match)
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::unwind_short_set_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::unwind_non_greedy_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop,
|
||||
};
|
||||
|
||||
m_recursive_result = have_match;
|
||||
@ -907,8 +1042,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
|
||||
//
|
||||
@ -1377,6 +1512,106 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_non_greedy_repeat(boo
|
||||
return r;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion(bool r)
|
||||
{
|
||||
saved_recursion<results_type>* pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
|
||||
if(!r)
|
||||
{
|
||||
recursion_stack[recursion_stack_position].id = pmp->recursion_id;
|
||||
recursion_stack[recursion_stack_position].preturn_address = pmp->preturn_address;
|
||||
recursion_stack[recursion_stack_position].results = pmp->results;
|
||||
++recursion_stack_position;
|
||||
}
|
||||
boost::re_detail::inplace_destroy(pmp++);
|
||||
m_backup_state = pmp;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop(bool r)
|
||||
{
|
||||
saved_state* pmp = static_cast<saved_state*>(m_backup_state);
|
||||
if(!r)
|
||||
{
|
||||
--recursion_stack_position;
|
||||
}
|
||||
boost::re_detail::inplace_destroy(pmp++);
|
||||
m_backup_state = pmp;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
void perl_matcher<BidiIterator, Allocator, traits>::push_recursion_pop()
|
||||
{
|
||||
saved_state* pmp = static_cast<saved_state*>(m_backup_state);
|
||||
--pmp;
|
||||
if(pmp < m_stack_base)
|
||||
{
|
||||
extend_stack();
|
||||
pmp = static_cast<saved_state*>(m_backup_state);
|
||||
--pmp;
|
||||
}
|
||||
(void) new (pmp)saved_state(15);
|
||||
m_backup_state = pmp;
|
||||
}
|
||||
/*
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::unwind_parenthesis_pop(bool r)
|
||||
{
|
||||
saved_state* pmp = static_cast<saved_state*>(m_backup_state);
|
||||
if(!r)
|
||||
{
|
||||
--parenthesis_stack_position;
|
||||
}
|
||||
boost::re_detail::inplace_destroy(pmp++);
|
||||
m_backup_state = pmp;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
void perl_matcher<BidiIterator, Allocator, traits>::push_parenthesis_pop()
|
||||
{
|
||||
saved_state* pmp = static_cast<saved_state*>(m_backup_state);
|
||||
--pmp;
|
||||
if(pmp < m_stack_base)
|
||||
{
|
||||
extend_stack();
|
||||
pmp = static_cast<saved_state*>(m_backup_state);
|
||||
--pmp;
|
||||
}
|
||||
(void) new (pmp)saved_state(16);
|
||||
m_backup_state = pmp;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::unwind_parenthesis_push(bool r)
|
||||
{
|
||||
saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
|
||||
if(!r)
|
||||
{
|
||||
parenthesis_stack[parenthesis_stack_position++] = pmp->position;
|
||||
}
|
||||
boost::re_detail::inplace_destroy(pmp++);
|
||||
m_backup_state = pmp;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
inline void perl_matcher<BidiIterator, Allocator, traits>::push_parenthesis_push(BidiIterator p)
|
||||
{
|
||||
saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
|
||||
--pmp;
|
||||
if(pmp < m_stack_base)
|
||||
{
|
||||
extend_stack();
|
||||
pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
|
||||
--pmp;
|
||||
}
|
||||
(void) new (pmp)saved_position<BidiIterator>(0, p, 17);
|
||||
m_backup_state = pmp;
|
||||
}
|
||||
*/
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user