forked from boostorg/regex
Add checked constructors to the Unicode iterators that need them.
Update icu support code to use the new checking-constructors. Update tests to check the full Unicode character range (as of Unicode V6). Add minimal docs describing the iterators. [SVN r73271]
This commit is contained in:
@ -3,10 +3,10 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Background Information</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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)">
|
||||
<link rel="prev" href="ref/internal_details/uni_iter.html" title="Unicode Iterators">
|
||||
<link rel="next" href="background_information/headers.html" title="Headers">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@ -20,9 +20,9 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="ref/deprecated_interfaces/old_regex.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="background_information/headers.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="ref/internal_details/uni_iter.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="background_information/headers.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.background_information"></a><a class="link" href="background_information.html" title="Background Information">Background Information</a>
|
||||
</h2></div></div></div>
|
||||
@ -54,7 +54,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="ref/deprecated_interfaces/old_regex.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="background_information/headers.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="ref/internal_details/uni_iter.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="background_information/headers.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Acknowledgements</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="redist.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="history.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.acknowledgements"></a><a class="link" href="acknowledgements.html" title="Acknowledgements">Acknowledgements</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Test and Example Programs</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,13 +22,13 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="thread_safety.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="futher.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.examples"></a><a class="link" href="examples.html" title="Test and Example Programs">Test and
|
||||
Example Programs</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.background_information.examples.test_programs"></a><h5>
|
||||
<a name="id1150627"></a>
|
||||
<a name="boost_regex.background_information.examples.test_programs-heading"></a>
|
||||
<a class="link" href="examples.html#boost_regex.background_information.examples.test_programs">Test
|
||||
Programs</a>
|
||||
</h5>
|
||||
@ -45,71 +45,71 @@
|
||||
<p>
|
||||
Files:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/main.cpp" target="_top">main.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/basic_tests.cpp" target="_top">basic_tests.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_alt.cpp" target="_top">test_alt.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_anchors.cpp" target="_top">test_anchors.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_asserts.cpp" target="_top">test_asserts.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_backrefs.cpp" target="_top">test_backrefs.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_deprecated.cpp" target="_top">test_deprecated.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_emacs.cpp" target="_top">test_emacs.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_escapes.cpp" target="_top">test_escapes.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_grep.cpp" target="_top">test_grep.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_icu.cpp" target="_top">test_icu.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_locale.cpp" target="_top">test_locale.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_mfc.cpp" target="_top">test_mfc.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_non_greedy_repeats.cpp" target="_top">test_non_greedy_repeats.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_operators.cpp" target="_top">test_operators.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_overloads.cpp" target="_top">test_overloads.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_perl_ex.cpp" target="_top">test_perl_ex.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_replace.cpp" target="_top">test_replace.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_sets.cpp" target="_top">test_sets.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_simple_repeats.cpp" target="_top">test_simple_repeats.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_tricky_cases.cpp" target="_top">test_tricky_cases.cpp</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../../test/regress/test_unicode.cpp" target="_top">test_unicode.cpp</a>
|
||||
</li>
|
||||
</ul></div>
|
||||
@ -151,7 +151,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="id1151010"></a>
|
||||
<a name="boost_regex.background_information.examples.example_programs-heading"></a>
|
||||
<a class="link" href="examples.html#boost_regex.background_information.examples.example_programs">Example
|
||||
programs</a>
|
||||
</h5>
|
||||
@ -177,7 +177,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="id1151068"></a>
|
||||
<a name="boost_regex.background_information.examples.code_snippets-heading"></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=US-ASCII">
|
||||
<title>FAQ</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="futher.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="performance.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.faq"></a><a class="link" href="faq.html" title="FAQ">FAQ</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>References and Further Information</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="examples.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="faq.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.futher"></a><a class="link" href="futher.html" title="References and Further Information">References
|
||||
and Further Information</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Headers</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../background_information.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="locale.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.headers"></a><a class="link" href="headers.html" title="Headers">Headers</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>History</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -21,7 +21,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="acknowledgements.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<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>
|
||||
@ -36,7 +36,7 @@
|
||||
All issues including closed ones can be viewed <a href="https://svn.boost.org/trac/boost/query?status=assigned&status=closed&status=new&status=reopened&component=regex&order=priority&col=id&col=summary&col=status&col=type&col=milestone&col=component" target="_top">here</a>.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.history.boost_1_47"></a><h5>
|
||||
<a name="id1153011"></a>
|
||||
<a name="boost_regex.background_information.history.boost_1_47-heading"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_47">Boost
|
||||
1.47</a>
|
||||
</h5>
|
||||
@ -49,7 +49,7 @@
|
||||
<a href="https://svn.boost.org/trac/boost/ticket/5504" target="_top">#5504</a>.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.history.boost_1_44"></a><h5>
|
||||
<a name="id1153057"></a>
|
||||
<a name="boost_regex.background_information.history.boost_1_44-heading"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_44">Boost
|
||||
1.44</a>
|
||||
</h5>
|
||||
@ -68,22 +68,22 @@
|
||||
<a href="https://svn.boost.org/trac/boost/ticket/3890" target="_top">#3890</a>
|
||||
</p>
|
||||
<a name="boost_regex.background_information.history.boost_1_42"></a><h5>
|
||||
<a name="id1153131"></a>
|
||||
<a name="boost_regex.background_information.history.boost_1_42-heading"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_42">Boost
|
||||
1.42</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
Added support for Functors rather than strings as format expressions.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Improved error reporting when throwing exceptions to include better more
|
||||
relevant information.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Improved performance and reduced stack usage of recursive expressions.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Fixed tickets <a href="https://svn.boost.org/trac/boost/ticket/2802" target="_top">#2802</a>,
|
||||
<a href="https://svn.boost.org/trac/boost/ticket/3425" target="_top">#3425</a>,
|
||||
<a href="https://svn.boost.org/trac/boost/ticket/3507" target="_top">#3507</a>,
|
||||
@ -97,21 +97,21 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_40"></a><h5>
|
||||
<a name="id1153225"></a>
|
||||
<a name="boost_regex.background_information.history.boost_1_40-heading"></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>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
|
||||
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="id1153249"></a>
|
||||
<a name="boost_regex.background_information.history.boost_1_38-heading"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_38">Boost
|
||||
1.38</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
<span class="bold"><strong>Breaking change</strong></span>: empty expressions,
|
||||
and empty alternatives are now allowed when using the Perl regular expression
|
||||
syntax. This change has been added for Perl compatibility, when the new
|
||||
@ -119,124 +119,124 @@
|
||||
<span class="emphasis"><em>no_empty_expressions</em></span> is set then the old behaviour
|
||||
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>
|
||||
<li class="listitem">
|
||||
Added support for Perl style ${n} expressions in format strings (issue
|
||||
<a href="https://svn.boost.org/trac/boost/ticket/2556" target="_top">#2556</a>).
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Added support for accessing the location of sub-expressions within the
|
||||
regular expression string (issue <a href="https://svn.boost.org/trac/boost/ticket/2269" target="_top">#2269</a>).
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Fixed compiler compatibility issues <a href="https://svn.boost.org/trac/boost/ticket/2244" target="_top">#2244</a>,
|
||||
<a href="https://svn.boost.org/trac/boost/ticket/2514" target="_top">#2514</a>,
|
||||
and <a href="https://svn.boost.org/trac/boost/ticket/2244" target="_top">#2458</a>.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_34"></a><h5>
|
||||
<a name="id1153341"></a>
|
||||
<a name="boost_regex.background_information.history.boost_1_34-heading"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_34">Boost
|
||||
1.34</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
Fix for non-greedy repeats and partial matches not working correctly
|
||||
in some cases.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Fix for non-greedy repeats on VC++ not working in some cases (bug report
|
||||
1515830).
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Changed match_results::position() to return a valid result when *this
|
||||
represents a partial match.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Fixed the grep and egrep options so that the newline character gets treated
|
||||
the same as |.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_33_1"></a><h5>
|
||||
<a name="id1153387"></a>
|
||||
<a name="boost_regex.background_information.history.boost_1_33_1-heading"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_1">Boost
|
||||
1.33.1</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
Fixed broken makefiles.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Fixed configuration setup to allow building with VC7.1 - STLport-4.6.2
|
||||
when using /Zc:wchar_t.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Moved declarations class-inline in static_mutex.hpp so that SGI Irix
|
||||
compiler can cope.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Added needed standard library #includes to fileiter.hpp, regex_workaround.hpp
|
||||
and cpp_regex_traits.hpp.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Fixed a bug where non-greedy repeats could in certain strange curcumstances
|
||||
repeat more times than their maximum value.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Fixed the value returned by basic_regex<>::empty() from a default
|
||||
constructed object.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Changed the deffinition of regex_error to make it backwards compatible
|
||||
with Boost-1.32.0.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Disabled external templates for Intel C++ 8.0 and earlier - otherwise
|
||||
unresolved references can occur.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Rewritten extern template code for gcc so that only specific member functions
|
||||
are exported: otherwise strange unresolved references can occur when
|
||||
linking and mixing debug and non-debug code.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Initialise all the data members of the unicode_iterators: this keeps
|
||||
gcc from issuing needless warnings.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Ported the ICU integration code to VC6 and VC7.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Ensured code is STLport debug mode clean.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Fixed lookbehind assertions so that fixed length repeats are permitted,
|
||||
and so that regex iteration allows lookbehind to look back before the
|
||||
current search range (into the last match).
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Fixed strange bug with non-greedy repeats inside forward lookahead assertions.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Enabled negated character classes inside character sets.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Fixed regression so that [a-z-] is a valid expression again.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Fixed bug that allowed some invalid expressions to be accepted.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_33_0"></a><h5>
|
||||
<a name="id1153526"></a>
|
||||
<a name="boost_regex.background_information.history.boost_1_33_0-heading"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_0">Boost
|
||||
1.33.0</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
Completely rewritten expression parsing code, and traits class support;
|
||||
now conforms to the standardization proposal.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Breaking Change: The syntax options that can be passed to basic_regex
|
||||
constructors have been rationalized. The default option (perl) now has
|
||||
a value of zero, and it is now clearly documented which options apply
|
||||
@ -245,35 +245,35 @@
|
||||
is the possibility that existing code may fail to compile: however equivalent
|
||||
functionality should still be available.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Breaking Change: POSIX-extended and POSIX-basic regular expressions now
|
||||
enforce the letter of the POSIX standard much more closely than before.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Added support for (?imsx-imsx) constructs.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Added support for lookbehind expressions (?<=positive-lookbehind)
|
||||
and (?<!negative-lookbehind).
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Added support for conditional expressions (?(assertion)true-expresion|false-expression).
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Added MFC/ATL string wrappers.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Added Unicode support; based on ICU.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Changed newline support to recognise \f as a line separator (all character
|
||||
types), and \x85 as a line separator for wide characters / Unicode only.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Added a new format flag format_literal that treats the replace string
|
||||
as a literal, rather than a Perl or Sed style format string.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Errors are now reported by throwing exceptions of type regex_error. The
|
||||
types used previously - bad_expression and bad_pattern - are now just
|
||||
typedefs for regex_error. Type regex_error has a couple of new members:
|
||||
@ -282,44 +282,44 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_32_1"></a><h5>
|
||||
<a name="id1153623"></a>
|
||||
<a name="boost_regex.background_information.history.boost_1_32_1-heading"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_32_1">Boost
|
||||
1.32.1</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc"><li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
|
||||
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="id1153647"></a>
|
||||
<a name="boost_regex.background_information.history.boost_1_31_0-heading"></a>
|
||||
<a class="link" href="history.html#boost_regex.background_information.history.boost_1_31_0">Boost
|
||||
1.31.0</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
Completely rewritten pattern matching code - it is now up to 10 times
|
||||
faster than before.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Reorganized documentation.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Deprecated all interfaces that are not part of the regular expression
|
||||
standardization proposal.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Added regex_iterator and regex_token_iterator .
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Added support for Perl style independent sub-expressions.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Added non-member operators to the sub_match class, so that you can compare
|
||||
sub_match's with strings, or add them to a string to produce a new string.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Added experimental support for extended capture information.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Changed the match flags so that they are a distinct type (not an integer),
|
||||
if you try to pass the match flags as an integer rather than match_flag_type
|
||||
to the regex algorithms then you will now get a compiler error.
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Localization</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="headers.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="thread_safety.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.locale"></a><a class="link" href="locale.html" title="Localization">Localization</a>
|
||||
</h3></div></div></div>
|
||||
@ -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="id1144995"></a>
|
||||
<a name="boost_regex.background_information.locale.win32_localization_model_-heading"></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="id1145150"></a>
|
||||
<a name="boost_regex.background_information.locale.c_localization_model_-heading"></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="id1145218"></a>
|
||||
<a name="boost_regex.background_information.locale.c___localization_model_-heading"></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="id1146723"></a>
|
||||
<a name="boost_regex.background_information.locale.providing_a_message_catalogue-heading"></a>
|
||||
<a class="link" href="locale.html#boost_regex.background_information.locale.providing_a_message_catalogue">Providing
|
||||
a message catalogue</a>
|
||||
</h5>
|
||||
@ -1303,9 +1303,6 @@
|
||||
"Unmatched \{"
|
||||
</p>
|
||||
</td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@ -1323,9 +1320,6 @@
|
||||
"Invalid content of \{\}"
|
||||
</p>
|
||||
</td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@ -1343,9 +1337,6 @@
|
||||
"Invalid range end"
|
||||
</p>
|
||||
</td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@ -1363,9 +1354,6 @@
|
||||
"Memory exhausted"
|
||||
</p>
|
||||
</td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@ -1383,9 +1371,6 @@
|
||||
"Invalid preceding regular expression"
|
||||
</p>
|
||||
</td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@ -1403,9 +1388,6 @@
|
||||
"Premature end of regular expression"
|
||||
</p>
|
||||
</td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@ -1423,9 +1405,6 @@
|
||||
"Regular expression too big"
|
||||
</p>
|
||||
</td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@ -1443,9 +1422,6 @@
|
||||
"Unmatched ) or \)"
|
||||
</p>
|
||||
</td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@ -1463,9 +1439,6 @@
|
||||
"Empty expression"
|
||||
</p>
|
||||
</td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@ -1483,9 +1456,6 @@
|
||||
"Unknown error"
|
||||
</p>
|
||||
</td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
<td class="auto-generated"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Performance</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="faq.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="standards.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.performance"></a><a class="link" href="performance.html" title="Performance">Performance</a>
|
||||
</h3></div></div></div>
|
||||
@ -33,12 +33,12 @@
|
||||
synchronisation), but not by much. The following pages compare Boost.Regex
|
||||
with various other regular expression libraries for the following compilers:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
<a href="../../../vc71-performance.html" target="_top">Visual Studio.Net 2003 (recursive
|
||||
Boost.Regex implementation)</a>.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a href="../../../gcc-performance.html" target="_top">Gcc 3.2 (cygwin) (non-recursive
|
||||
Boost.Regex implementation)</a>.
|
||||
</li>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Redistributables</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="standards.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.redist"></a><a class="link" href="redist.html" title="Redistributables">Redistributables</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Standards Conformance</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,13 +22,13 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="performance.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="redist.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.standards"></a><a class="link" href="standards.html" title="Standards Conformance">Standards
|
||||
Conformance</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.background_information.standards.c__"></a><h5>
|
||||
<a name="id1151704"></a>
|
||||
<a name="boost_regex.background_information.standards.c__-heading"></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="id1151726"></a>
|
||||
<a name="boost_regex.background_information.standards.ecmascript___javascript-heading"></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="id1151746"></a>
|
||||
<a name="boost_regex.background_information.standards.perl-heading"></a>
|
||||
<a class="link" href="standards.html#boost_regex.background_information.standards.perl">Perl</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -73,7 +73,7 @@
|
||||
the Unicode requirements below.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.standards.posix"></a><h5>
|
||||
<a name="id1151786"></a>
|
||||
<a name="boost_regex.background_information.standards.posix-heading"></a>
|
||||
<a class="link" href="standards.html#boost_regex.background_information.standards.posix">POSIX</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -93,7 +93,7 @@
|
||||
a custom traits class.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.standards.unicode"></a><h5>
|
||||
<a name="id1151810"></a>
|
||||
<a name="boost_regex.background_information.standards.unicode-heading"></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=US-ASCII">
|
||||
<title>Thread Safety</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="locale.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="examples.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.thread_safety"></a><a class="link" href="thread_safety.html" title="Thread Safety">Thread
|
||||
Safety</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Understanding Marked Sub-Expressions and Captures</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="unicode.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="partial_matches.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.captures"></a><a class="link" href="captures.html" title="Understanding Marked Sub-Expressions and Captures">Understanding Marked Sub-Expressions
|
||||
and Captures</a>
|
||||
@ -35,7 +35,7 @@
|
||||
accessed.
|
||||
</p>
|
||||
<a name="boost_regex.captures.marked_sub_expressions"></a><h5>
|
||||
<a name="id990376"></a>
|
||||
<a name="boost_regex.captures.marked_sub_expressions-heading"></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="id990846"></a>
|
||||
<a name="boost_regex.captures.unmatched_sub_expressions-heading"></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="id990885"></a>
|
||||
<a name="boost_regex.captures.repeated_captures-heading"></a>
|
||||
<a class="link" href="captures.html#boost_regex.captures.repeated_captures">Repeated Captures</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -355,13 +355,13 @@ Text: "now is the time for all good men to come to the aid of the party"
|
||||
don't use it), and a much bigger impact if you do use it, therefore to use
|
||||
this feature you need to:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
Define BOOST_REGEX_MATCH_EXTRA for all translation units including the
|
||||
library source (the best way to do this is to uncomment this define in
|
||||
boost/regex/user.hpp and then rebuild everything.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Pass the match_extra flag to the particular algorithms where you actually
|
||||
need the captures information (regex_search, regex_match, or regex_iterator).
|
||||
</li>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Configuration</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../index.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="configuration/compiler.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.configuration"></a><a class="link" href="configuration.html" title="Configuration">Configuration</a>
|
||||
</h2></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Algorithm Selection</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="linkage.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../configuration.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tuning.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.configuration.algorithm"></a><a class="link" href="algorithm.html" title="Algorithm Selection">Algorithm Selection</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Compiler Setup</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../configuration.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../configuration.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="locale.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.configuration.compiler"></a><a class="link" href="compiler.html" title="Compiler Setup">Compiler Setup</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Linkage Options</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="locale.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../configuration.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="algorithm.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.configuration.linkage"></a><a class="link" href="linkage.html" title="Linkage Options">Linkage Options</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Locale and traits class selection</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="compiler.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../configuration.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="linkage.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.configuration.locale"></a><a class="link" href="locale.html" title="Locale and traits class selection">Locale and traits class
|
||||
selection</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Algorithm Tuning</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="algorithm.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../configuration.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../install.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.configuration.tuning"></a><a class="link" href="tuning.html" title="Algorithm Tuning">Algorithm Tuning</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Search and Replace Format String Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="syntax/leftmost_longest_rule.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="format/sed_format.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.format"></a><a class="link" href="format.html" title="Search and Replace Format String Syntax">Search and Replace Format String Syntax</a>
|
||||
</h2></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Boost-Extended Format String Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="perl_format.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../format.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../ref.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.format.boost_format_syntax"></a><a class="link" href="boost_format_syntax.html" title="Boost-Extended Format String Syntax">Boost-Extended
|
||||
Format String Syntax</a>
|
||||
@ -32,7 +32,7 @@
|
||||
'$', '\', '(', ')', '?', and ':'.
|
||||
</p>
|
||||
<a name="boost_regex.format.boost_format_syntax.grouping"></a><h5>
|
||||
<a name="id1011805"></a>
|
||||
<a name="boost_regex.format.boost_format_syntax.grouping-heading"></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="id1011822"></a>
|
||||
<a name="boost_regex.format.boost_format_syntax.conditionals-heading"></a>
|
||||
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.conditionals">Conditionals</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -79,7 +79,7 @@
|
||||
?{NAME}true-expression:false-expression
|
||||
</p>
|
||||
<a name="boost_regex.format.boost_format_syntax.placeholder_sequences"></a><h5>
|
||||
<a name="id1011875"></a>
|
||||
<a name="boost_regex.format.boost_format_syntax.placeholder_sequences-heading"></a>
|
||||
<a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.placeholder_sequences">Placeholder
|
||||
Sequences</a>
|
||||
</h5>
|
||||
@ -319,7 +319,7 @@
|
||||
as a literal.
|
||||
</p>
|
||||
<a name="boost_regex.format.boost_format_syntax.escape_sequences"></a><h5>
|
||||
<a name="id1012242"></a>
|
||||
<a name="boost_regex.format.boost_format_syntax.escape_sequences-heading"></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=US-ASCII">
|
||||
<title>Perl Format String Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="sed_format.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../format.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost_format_syntax.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.format.perl_format"></a><a class="link" href="perl_format.html" title="Perl Format String Syntax">Perl Format String Syntax</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Sed Format String Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../format.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../format.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="perl_format.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.format.sed_format"></a><a class="link" href="sed_format.html" title="Sed Format String Syntax">Sed Format String Syntax</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Building and Installing the Library</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="configuration/tuning.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="introduction_and_overview.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.install"></a><a class="link" href="install.html" title="Building and Installing the Library">Building and Installing the Library</a>
|
||||
</h2></div></div></div>
|
||||
@ -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="id985242"></a>
|
||||
<a name="boost_regex.install.building_with_bjam-heading"></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="id985266"></a>
|
||||
<a name="boost_regex.install.building_with_unicode_and_icu_support-heading"></a>
|
||||
<a class="link" href="install.html#boost_regex.install.building_with_unicode_and_icu_support">Building
|
||||
With Unicode and ICU Support</a>
|
||||
</h5>
|
||||
@ -111,9 +111,8 @@
|
||||
the library rather than the default ICU binary names.
|
||||
</p>
|
||||
<p>
|
||||
You might also need to use the options "cxxflags<code class="literal">-option"
|
||||
and "linkflags</code>-option" to set compiler and linker specific
|
||||
options.
|
||||
You might also need to use the options "cxxflags=-option" and "linkflags=-option"
|
||||
to set compiler and linker specific options.
|
||||
</p>
|
||||
<div class="important"><table border="0" summary="Important">
|
||||
<tr>
|
||||
@ -158,22 +157,22 @@
|
||||
header-include and linker-search paths).
|
||||
</p>
|
||||
<a name="boost_regex.install.building_via_makefiles"></a><h5>
|
||||
<a name="id985488"></a>
|
||||
<a name="boost_regex.install.building_via_makefiles-heading"></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="id985501"></a>
|
||||
<a name="boost_regex.install.borland_c___builder_-heading"></a>
|
||||
<a class="link" href="install.html#boost_regex.install.borland_c___builder_">Borland C++ Builder:</a>
|
||||
</h6>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
Open up a console window and change to the <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">>\</span><span class="identifier">libs</span><span class="special">\</span><span class="identifier">regex</span><span class="special">\</span><span class="identifier">build</span></code> directory.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Select the appropriate makefile (bcb4.mak for C++ Builder 4, bcb5.mak for
|
||||
C++ Builder 5, and bcb6.mak for C++ Builder 6).
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Invoke the makefile (pass the full path to your version of make if you
|
||||
have more than one version installed, the makefile relies on the path to
|
||||
make to obtain your C++ Builder installation directory and tools) for example:
|
||||
@ -227,7 +226,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="id985751"></a>
|
||||
<a name="boost_regex.install.microsoft_visual_c___6__7__7_1_and_8-heading"></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>
|
||||
@ -285,8 +284,8 @@
|
||||
There are several important caveats to remember when using Boost.Regex with
|
||||
Microsoft's Compiler:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
There have been some reports of compiler-optimization bugs affecting this
|
||||
library, (particularly with VC6 versions prior to service patch 5) the
|
||||
workaround is to build the library using /Oityb1 rather than /O2. That
|
||||
@ -296,26 +295,26 @@
|
||||
so it's probably worthwhile applying this workaround in normal practice
|
||||
in any case.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
If you have replaced the C++ standard library that comes with VC6, then
|
||||
when you build the library you must ensure that the environment variables
|
||||
"INCLUDE" and "LIB" have been updated to reflect the
|
||||
include and library paths for the new library - see vcvars32.bat (part
|
||||
of your Visual Studio installation) for more details.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
If you are building with the full STLPort v4.x, then use the vc6-stlport.mak
|
||||
file provided and set the environment variable STLPORT_PATH to point to
|
||||
the location of your STLPort installation (Note that the full STLPort libraries
|
||||
appear not to support single-thread static builds).
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
If you are building your application with /Zc:wchar_t then you will need
|
||||
to modify the makefile to add /Zc:wchar_t before building the library.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.install.gcc_2_95_and_later_"></a><h6>
|
||||
<a name="id985964"></a>
|
||||
<a name="boost_regex.install.gcc_2_95_and_later_-heading"></a>
|
||||
<a class="link" href="install.html#boost_regex.install.gcc_2_95_and_later_">GCC(2.95 and later)</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -364,7 +363,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="id986090"></a>
|
||||
<a name="boost_regex.install.sun_workshop_6_1-heading"></a>
|
||||
<a class="link" href="install.html#boost_regex.install.sun_workshop_6_1">Sun Workshop 6.1</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -404,12 +403,12 @@
|
||||
This makefile does not set any architecture specific options like -xarch=v9,
|
||||
you can set these by defining the appropriate macros, for example:
|
||||
</p>
|
||||
<pre class="programlisting">dmake CXXFLAGS="-xarch<code class="literal">v9" LDFLAGS</code>"-xarch<code class="literal">v9" LIBSUFFIX</code>"_v9" -f sunpro.mak</pre>
|
||||
<pre class="programlisting">dmake CXXFLAGS="-xarch=v9" LDFLAGS="-xarch=v9" LIBSUFFIX="_v9" -f sunpro.mak</pre>
|
||||
<p>
|
||||
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="id986234"></a>
|
||||
<a name="boost_regex.install.makefiles_for_other_compilers-heading"></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=US-ASCII">
|
||||
<title>Introduction and Overview</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="install.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="unicode.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.introduction_and_overview"></a><a class="link" href="introduction_and_overview.html" title="Introduction and Overview">Introduction and
|
||||
Overview</a>
|
||||
@ -113,8 +113,8 @@
|
||||
and replace operation is performed with the algorithm <a class="link" href="ref/regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a>, for our credit card
|
||||
example we can write two algorithms like this to provide the format conversions:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">// match any format with the regular expression:
|
||||
</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z"</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="comment">// match any format with the regular expression:</span>
|
||||
<span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z"</span><span class="special">);</span>
|
||||
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">machine_format</span><span class="special">(</span><span class="string">"\\1\\2\\3\\4"</span><span class="special">);</span>
|
||||
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">human_format</span><span class="special">(</span><span class="string">"\\1-\\2-\\3-\\4"</span><span class="special">);</span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Partial Matches</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="captures.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="syntax.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.partial_matches"></a><a class="link" href="partial_matches.html" title="Partial Matches">Partial Matches</a>
|
||||
</h2></div></div></div>
|
||||
@ -164,14 +164,14 @@
|
||||
Be aware that using partial matches can sometimes result in somewhat imperfect
|
||||
behavior:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
There are some expressions, such as ".*abc" that will always
|
||||
produce a partial match. This problem can be reduced by careful construction
|
||||
of the regular expressions used, or by setting flags like match_not_dot_newline
|
||||
so that expressions like .* can't match past line boundaries.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Boost.Regex currently prefers leftmost matches to full matches, so for
|
||||
example matching "abc|b" against "ab" produces a partial
|
||||
match against the "ab" rather than a full match against "b".
|
||||
@ -198,24 +198,24 @@
|
||||
|
||||
<span class="keyword">bool</span> <span class="identifier">is_possible_card_number</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">input</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">//
|
||||
</span> <span class="comment">// return false for partial match, true for full match, or throw for
|
||||
</span> <span class="comment">// impossible match based on what we have so far...
|
||||
</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">::</span><span class="identifier">const_iterator</span><span class="special">></span> <span class="identifier">what</span><span class="special">;</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// return false for partial match, true for full match, or throw for</span>
|
||||
<span class="comment">// impossible match based on what we have so far...</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">::</span><span class="identifier">const_iterator</span><span class="special">></span> <span class="identifier">what</span><span class="special">;</span>
|
||||
<span class="keyword">if</span><span class="special">(</span><span class="number">0</span> <span class="special">==</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">input</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_default</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_partial</span><span class="special">))</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// the input so far could not possibly be valid so reject it:
|
||||
</span> <span class="keyword">throw</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span><span class="special">(</span>
|
||||
<span class="comment">// the input so far could not possibly be valid so reject it:</span>
|
||||
<span class="keyword">throw</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span><span class="special">(</span>
|
||||
<span class="string">"Invalid data entered - this could not possibly be a valid card number"</span><span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
<span class="comment">// OK so far so good, but have we finished?
|
||||
</span> <span class="keyword">if</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span><span class="special">)</span>
|
||||
<span class="comment">// OK so far so good, but have we finished?</span>
|
||||
<span class="keyword">if</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// excellent, we have a result:
|
||||
</span> <span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span>
|
||||
<span class="comment">// excellent, we have a result:</span>
|
||||
<span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
<span class="comment">// what we have so far is only a partial match...
|
||||
</span> <span class="keyword">return</span> <span class="keyword">false</span><span class="special">;</span>
|
||||
<span class="comment">// what we have so far is only a partial match...</span>
|
||||
<span class="keyword">return</span> <span class="keyword">false</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<p>
|
||||
@ -231,37 +231,37 @@
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<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>
|
||||
|
||||
<span class="comment">// match some kind of html tag:
|
||||
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"<[^>]*>"</span><span class="special">);</span>
|
||||
<span class="comment">// count how many:
|
||||
</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">tags</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
|
||||
<span class="comment">// match some kind of html tag:</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"<[^>]*>"</span><span class="special">);</span>
|
||||
<span class="comment">// count how many:</span>
|
||||
<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">tags</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
|
||||
|
||||
<span class="keyword">void</span> <span class="identifier">search</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&</span> <span class="identifier">is</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// buffer we'll be searching in:
|
||||
</span> <span class="keyword">char</span> <span class="identifier">buf</span><span class="special">[</span><span class="number">4096</span><span class="special">];</span>
|
||||
<span class="comment">// saved position of end of partial match:
|
||||
</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">next_pos</span> <span class="special">=</span> <span class="identifier">buf</span> <span class="special">+</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">buf</span><span class="special">);</span>
|
||||
<span class="comment">// flag to indicate whether there is more input to come:
|
||||
</span> <span class="keyword">bool</span> <span class="identifier">have_more</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">;</span>
|
||||
<span class="comment">// buffer we'll be searching in:</span>
|
||||
<span class="keyword">char</span> <span class="identifier">buf</span><span class="special">[</span><span class="number">4096</span><span class="special">];</span>
|
||||
<span class="comment">// saved position of end of partial match:</span>
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">next_pos</span> <span class="special">=</span> <span class="identifier">buf</span> <span class="special">+</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">buf</span><span class="special">);</span>
|
||||
<span class="comment">// flag to indicate whether there is more input to come:</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">have_more</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">;</span>
|
||||
|
||||
<span class="keyword">while</span><span class="special">(</span><span class="identifier">have_more</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// how much do we copy forward from last try:
|
||||
</span> <span class="keyword">unsigned</span> <span class="identifier">leftover</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">buf</span> <span class="special">+</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">buf</span><span class="special">))</span> <span class="special">-</span> <span class="identifier">next_pos</span><span class="special">;</span>
|
||||
<span class="comment">// and how much is left to fill:
|
||||
</span> <span class="keyword">unsigned</span> <span class="identifier">size</span> <span class="special">=</span> <span class="identifier">next_pos</span> <span class="special">-</span> <span class="identifier">buf</span><span class="special">;</span>
|
||||
<span class="comment">// copy forward whatever we have left:
|
||||
</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">memmove</span><span class="special">(</span><span class="identifier">buf</span><span class="special">,</span> <span class="identifier">next_pos</span><span class="special">,</span> <span class="identifier">leftover</span><span class="special">);</span>
|
||||
<span class="comment">// fill the rest from the stream:
|
||||
</span> <span class="identifier">is</span><span class="special">.</span><span class="identifier">read</span><span class="special">(</span><span class="identifier">buf</span> <span class="special">+</span> <span class="identifier">leftover</span><span class="special">,</span> <span class="identifier">size</span><span class="special">);</span>
|
||||
<span class="comment">// how much do we copy forward from last try:</span>
|
||||
<span class="keyword">unsigned</span> <span class="identifier">leftover</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">buf</span> <span class="special">+</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">buf</span><span class="special">))</span> <span class="special">-</span> <span class="identifier">next_pos</span><span class="special">;</span>
|
||||
<span class="comment">// and how much is left to fill:</span>
|
||||
<span class="keyword">unsigned</span> <span class="identifier">size</span> <span class="special">=</span> <span class="identifier">next_pos</span> <span class="special">-</span> <span class="identifier">buf</span><span class="special">;</span>
|
||||
<span class="comment">// copy forward whatever we have left:</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">memmove</span><span class="special">(</span><span class="identifier">buf</span><span class="special">,</span> <span class="identifier">next_pos</span><span class="special">,</span> <span class="identifier">leftover</span><span class="special">);</span>
|
||||
<span class="comment">// fill the rest from the stream:</span>
|
||||
<span class="identifier">is</span><span class="special">.</span><span class="identifier">read</span><span class="special">(</span><span class="identifier">buf</span> <span class="special">+</span> <span class="identifier">leftover</span><span class="special">,</span> <span class="identifier">size</span><span class="special">);</span>
|
||||
<span class="keyword">unsigned</span> <span class="identifier">read</span> <span class="special">=</span> <span class="identifier">is</span><span class="special">.</span><span class="identifier">gcount</span><span class="special">();</span>
|
||||
<span class="comment">// check to see if we've run out of text:
|
||||
</span> <span class="identifier">have_more</span> <span class="special">=</span> <span class="identifier">read</span> <span class="special">==</span> <span class="identifier">size</span><span class="special">;</span>
|
||||
<span class="comment">// reset next_pos:
|
||||
</span> <span class="identifier">next_pos</span> <span class="special">=</span> <span class="identifier">buf</span> <span class="special">+</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">buf</span><span class="special">);</span>
|
||||
<span class="comment">// and then iterate:
|
||||
</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">cregex_iterator</span> <span class="identifier">a</span><span class="special">(</span>
|
||||
<span class="comment">// check to see if we've run out of text:</span>
|
||||
<span class="identifier">have_more</span> <span class="special">=</span> <span class="identifier">read</span> <span class="special">==</span> <span class="identifier">size</span><span class="special">;</span>
|
||||
<span class="comment">// reset next_pos:</span>
|
||||
<span class="identifier">next_pos</span> <span class="special">=</span> <span class="identifier">buf</span> <span class="special">+</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">buf</span><span class="special">);</span>
|
||||
<span class="comment">// and then iterate:</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">cregex_iterator</span> <span class="identifier">a</span><span class="special">(</span>
|
||||
<span class="identifier">buf</span><span class="special">,</span>
|
||||
<span class="identifier">buf</span> <span class="special">+</span> <span class="identifier">read</span> <span class="special">+</span> <span class="identifier">leftover</span><span class="special">,</span>
|
||||
<span class="identifier">e</span><span class="special">,</span>
|
||||
@ -272,18 +272,18 @@
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">if</span><span class="special">((*</span><span class="identifier">a</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span> <span class="special">==</span> <span class="keyword">false</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// Partial match, save position and break:
|
||||
</span> <span class="identifier">next_pos</span> <span class="special">=</span> <span class="special">(*</span><span class="identifier">a</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span><span class="special">;</span>
|
||||
<span class="comment">// Partial match, save position and break:</span>
|
||||
<span class="identifier">next_pos</span> <span class="special">=</span> <span class="special">(*</span><span class="identifier">a</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span><span class="special">;</span>
|
||||
<span class="keyword">break</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
<span class="keyword">else</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// full match:
|
||||
</span> <span class="special">++</span><span class="identifier">tags</span><span class="special">;</span>
|
||||
<span class="comment">// full match:</span>
|
||||
<span class="special">++</span><span class="identifier">tags</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
|
||||
<span class="comment">// move to next match:
|
||||
</span> <span class="special">++</span><span class="identifier">a</span><span class="special">;</span>
|
||||
<span class="comment">// move to next match:</span>
|
||||
<span class="special">++</span><span class="identifier">a</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
<span class="special">}</span>
|
||||
<span class="special">}</span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="format/boost_format_syntax.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="ref/basic_regex.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.ref"></a><a class="link" href="ref.html" title="Reference">Reference</a>
|
||||
</h2></div></div></div>
|
||||
@ -104,6 +104,9 @@
|
||||
<dt><span class="section"><a href="ref/deprecated_interfaces/old_regex.html">High
|
||||
Level Class RegEx (Deprecated)</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="ref/internal_details.html">Internal Details</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="ref/internal_details/uni_iter.html">Unicode
|
||||
Iterators</a></span></dt></dl></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>bad_expression</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,12 +22,12 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="regex_token_iterator.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="syntax_option_type.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<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="id1097894"></a>
|
||||
<a name="boost_regex.ref.bad_expression.synopsis-heading"></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>
|
||||
@ -48,13 +48,13 @@
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <span class="identifier">position</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="keyword">typedef</span> <span class="identifier">regex_error</span> <span class="identifier">bad_pattern</span><span class="special">;</span> <span class="comment">// for backwards compatibility
|
||||
</span><span class="keyword">typedef</span> <span class="identifier">regex_error</span> <span class="identifier">bad_expression</span><span class="special">;</span> <span class="comment">// for backwards compatibility
|
||||
</span>
|
||||
<span class="special">}</span> <span class="comment">// namespace boost
|
||||
</span></pre>
|
||||
<span class="keyword">typedef</span> <span class="identifier">regex_error</span> <span class="identifier">bad_pattern</span><span class="special">;</span> <span class="comment">// for backwards compatibility</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">regex_error</span> <span class="identifier">bad_expression</span><span class="special">;</span> <span class="comment">// for backwards compatibility</span>
|
||||
|
||||
<span class="special">}</span> <span class="comment">// namespace boost</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.bad_expression.description"></a><h5>
|
||||
<a name="id1098255"></a>
|
||||
<a name="boost_regex.ref.bad_expression.description-heading"></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=US-ASCII">
|
||||
<title>basic_regex</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,12 +22,12 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../ref.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="match_results.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<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="id1012603"></a>
|
||||
<a name="boost_regex.ref.basic_regex.synopsis-heading"></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>
|
||||
@ -37,14 +37,14 @@
|
||||
encapsulates regular expression parsing and compilation. The class takes
|
||||
two template parameters:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
<code class="computeroutput"><span class="identifier">charT</span></code>: determines the
|
||||
character type, i.e. either <code class="computeroutput"><span class="keyword">char</span></code>
|
||||
or <code class="computeroutput"><span class="keyword">wchar_t</span></code>; see <a class="link" href="concepts/charT_concept.html" title="charT Requirements">charT
|
||||
concept</a>.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<code class="computeroutput"><span class="identifier">traits</span></code>: determines the
|
||||
behavior of the character type, for example which character class names
|
||||
are recognized. A default traits class is provided: <code class="computeroutput"><span class="identifier">regex_traits</span><span class="special"><</span><span class="identifier">charT</span><span class="special">></span></code>. See also <a class="link" href="concepts/traits_concept.html" title="Traits Class Requirements">traits
|
||||
@ -77,8 +77,8 @@
|
||||
<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="identifier">regex_traits</span><span class="special"><</span><span class="identifier">charT</span><span class="special">></span> <span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">basic_regex</span> <span class="special">{</span>
|
||||
<span class="keyword">public</span><span class="special">:</span>
|
||||
<span class="comment">// types:
|
||||
</span> <span class="keyword">typedef</span> <span class="identifier">charT</span> <span class="identifier">value_type</span><span class="special">;</span>
|
||||
<span class="comment">// types:</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">charT</span> <span class="identifier">value_type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">implementation</span><span class="special">-</span><span class="identifier">specific</span> <span class="identifier">const_iterator</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">const_iterator</span> <span class="identifier">iterator</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">charT</span><span class="special">&</span> <span class="identifier">reference</span><span class="special">;</span>
|
||||
@ -88,9 +88,9 @@
|
||||
<span class="keyword">typedef</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">flag_type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">locale_type</span> <span class="identifier">locale_type</span><span class="special">;</span>
|
||||
|
||||
<span class="comment">// constants:
|
||||
</span> <span class="comment">// main option selection:
|
||||
</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">normal</span>
|
||||
<span class="comment">// constants:</span>
|
||||
<span class="comment">// main option selection:</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">normal</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">normal</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">ECMAScript</span>
|
||||
<span class="special">=</span> <span class="identifier">normal</span><span class="special">;</span>
|
||||
@ -115,8 +115,8 @@
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">literal</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">literal</span><span class="special">;</span>
|
||||
|
||||
<span class="comment">// modifiers specific to perl expressions:
|
||||
</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">no_mod_m</span>
|
||||
<span class="comment">// modifiers specific to perl expressions:</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">no_mod_m</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">no_mod_m</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">no_mod_s</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">no_mod_s</span><span class="special">;</span>
|
||||
@ -125,8 +125,8 @@
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">mod_x</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">mod_x</span><span class="special">;</span>
|
||||
|
||||
<span class="comment">// modifiers specific to POSIX basic expressions:
|
||||
</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">bk_plus_qm</span>
|
||||
<span class="comment">// modifiers specific to POSIX basic expressions:</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">bk_plus_qm</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">bk_plus_qm</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">bk_vbar</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">bk_vbar</span>
|
||||
@ -135,8 +135,8 @@
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">no_intervals</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">no_intervals</span>
|
||||
|
||||
<span class="comment">// common modifiers:
|
||||
</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">nosubs</span>
|
||||
<span class="comment">// common modifiers:</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">nosubs</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">nosubs</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">optimize</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">optimize</span><span class="special">;</span>
|
||||
@ -147,8 +147,8 @@
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">no_except</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">newline_alt</span><span class="special">;</span>
|
||||
|
||||
<span class="comment">// construct/copy/destroy:
|
||||
</span> <span class="keyword">explicit</span> <a class="link" href="basic_regex.html#boost_regex.basic_regex.construct1">basic_regex</a> <span class="special">();</span>
|
||||
<span class="comment">// construct/copy/destroy:</span>
|
||||
<span class="keyword">explicit</span> <a class="link" href="basic_regex.html#boost_regex.basic_regex.construct1">basic_regex</a> <span class="special">();</span>
|
||||
<span class="keyword">explicit</span> <a class="link" href="basic_regex.html#boost_regex.basic_regex.construct2">basic_regex</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">normal</span><span class="special">);</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.construct3">basic_regex</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">p1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">p2</span><span class="special">,</span>
|
||||
<span class="identifier">flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">normal</span><span class="special">);</span>
|
||||
@ -169,18 +169,18 @@
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">></span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.opeq3">basic_regex& operator=</a> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">>&</span> <span class="identifier">p</span><span class="special">);</span>
|
||||
<span class="comment">// iterators:
|
||||
</span> <a class="link" href="basic_regex.html#boost_regex.basic_regex.subexpression">std::pair<const_iterator, const_iterator> subexpression</a><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="comment">// iterators: </span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.subexpression">std::pair<const_iterator, const_iterator> subexpression</a><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.begin">const_iterator begin</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.end">const_iterator end</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="comment">// capacity:
|
||||
</span> <a class="link" href="basic_regex.html#boost_regex.basic_regex.size">size_type size</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="comment">// capacity: </span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.size">size_type size</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.max_size">size_type max_size</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.empty">bool empty</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.mark_count">size_type mark_count</a><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="comment">//
|
||||
</span> <span class="comment">// modifiers:
|
||||
</span> <a class="link" href="basic_regex.html#boost_regex.basic_regex.assign1">basic_regex& assign</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&</span> <span class="identifier">that</span><span class="special">);</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// modifiers: </span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.assign1">basic_regex& assign</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&</span> <span class="identifier">that</span><span class="special">);</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.assign2">basic_regex& assign</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">ptr</span><span class="special">,</span>
|
||||
<span class="identifier">flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">normal</span><span class="special">);</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.assign3">basic_regex& assign</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">ptr</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">len</span><span class="special">,</span> <span class="identifier">flag_type</span> <span class="identifier">f</span><span class="special">);</span>
|
||||
@ -193,16 +193,16 @@
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.assign5">basic_regex& assign</a><span class="special">(</span><span class="identifier">InputIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">InputIterator</span> <span class="identifier">last</span><span class="special">,</span>
|
||||
<span class="identifier">flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">normal</span><span class="special">);</span>
|
||||
|
||||
<span class="comment">// const operations:
|
||||
</span> <a class="link" href="basic_regex.html#boost_regex.basic_regex.flags">flag_type flags</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="comment">// const operations:</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.flags">flag_type flags</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.status">int status</a><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.str">basic_string<charT> str</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.compare">int compare</a><span class="special">(</span><span class="identifier">basic_regex</span><span class="special">&)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="comment">// locale:
|
||||
</span> <a class="link" href="basic_regex.html#boost_regex.basic_regex.imbue">locale_type imbue</a><span class="special">(</span><span class="identifier">locale_type</span> <span class="identifier">loc</span><span class="special">);</span>
|
||||
<span class="comment">// locale:</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.imbue">locale_type imbue</a><span class="special">(</span><span class="identifier">locale_type</span> <span class="identifier">loc</span><span class="special">);</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.getloc">locale_type getloc</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="comment">// swap
|
||||
</span> <a class="link" href="basic_regex.html#boost_regex.basic_regex.swap">void swap</a><span class="special">(</span><span class="identifier">basic_regex</span><span class="special">&)</span> <span class="keyword">throw</span><span class="special">();</span>
|
||||
<span class="comment">// swap</span>
|
||||
<a class="link" href="basic_regex.html#boost_regex.basic_regex.swap">void swap</a><span class="special">(</span><span class="identifier">basic_regex</span><span class="special">&)</span> <span class="keyword">throw</span><span class="special">();</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>
|
||||
@ -241,18 +241,18 @@
|
||||
<span class="keyword">typedef</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">regex</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="keyword">wchar_t</span><span class="special">></span> <span class="identifier">wregex</span><span class="special">;</span>
|
||||
|
||||
<span class="special">}</span> <span class="comment">// namespace boost
|
||||
</span></pre>
|
||||
<span class="special">}</span> <span class="comment">// namespace boost</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.basic_regex.description"></a><h5>
|
||||
<a name="id1017421"></a>
|
||||
<a name="boost_regex.ref.basic_regex.description-heading"></a>
|
||||
<a class="link" href="basic_regex.html#boost_regex.ref.basic_regex.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
Class <code class="computeroutput"><span class="identifier">basic_regex</span></code> has the
|
||||
following public members:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">// main option selection:
|
||||
</span><span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">normal</span>
|
||||
<pre class="programlisting"><span class="comment">// main option selection:</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">normal</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">normal</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">ECMAScript</span>
|
||||
<span class="special">=</span> <span class="identifier">normal</span><span class="special">;</span>
|
||||
@ -277,8 +277,8 @@
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">literal</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">literal</span><span class="special">;</span>
|
||||
|
||||
<span class="comment">// modifiers specific to perl expressions:
|
||||
</span><span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">no_mod_m</span>
|
||||
<span class="comment">// modifiers specific to perl expressions:</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">no_mod_m</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">no_mod_m</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">no_mod_s</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">no_mod_s</span><span class="special">;</span>
|
||||
@ -287,8 +287,8 @@
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">mod_x</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">mod_x</span><span class="special">;</span>
|
||||
|
||||
<span class="comment">// modifiers specific to POSIX basic expressions:
|
||||
</span><span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">bk_plus_qm</span>
|
||||
<span class="comment">// modifiers specific to POSIX basic expressions:</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">bk_plus_qm</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">bk_plus_qm</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">bk_vbar</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">bk_vbar</span>
|
||||
@ -297,8 +297,8 @@
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">no_intervals</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">no_intervals</span>
|
||||
|
||||
<span class="comment">// common modifiers:
|
||||
</span><span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">nosubs</span>
|
||||
<span class="comment">// common modifiers:</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">nosubs</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">nosubs</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">regex_constants</span><span class="special">::</span> <a class="link" href="syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> <span class="identifier">optimize</span>
|
||||
<span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">optimize</span><span class="special">;</span>
|
||||
@ -325,7 +325,7 @@
|
||||
<code class="computeroutput"><span class="identifier">basic_regex</span></code>.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1020421"></a><p class="title"><b>Table 1. basic_regex default construction postconditions</b></p>
|
||||
<a name="id1071160"></a><p class="title"><b>Table 1. basic_regex default construction postconditions</b></p>
|
||||
<div class="table-contents"><table class="table" summary="basic_regex default construction postconditions">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -403,7 +403,7 @@
|
||||
flags</a> specified in <span class="emphasis"><em>f</em></span>.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1020720"></a><p class="title"><b>Table 2. Postconditions for basic_regex construction</b></p>
|
||||
<a name="id1071458"></a><p class="title"><b>Table 2. Postconditions for basic_regex construction</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -506,7 +506,7 @@
|
||||
specified in <span class="emphasis"><em>f</em></span>.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1021136"></a><p class="title"><b>Table 3. Postconditions for basic_regex construction</b></p>
|
||||
<a name="id1071875"></a><p class="title"><b>Table 3. Postconditions for basic_regex construction</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -608,7 +608,7 @@
|
||||
according the option flags specified in <span class="emphasis"><em>f</em></span>.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1021544"></a><p class="title"><b>Table 4. Postconditions for basic_regex construction</b></p>
|
||||
<a name="id1072283"></a><p class="title"><b>Table 4. Postconditions for basic_regex construction</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -716,7 +716,7 @@
|
||||
flags</a> specified in <span class="emphasis"><em>f</em></span>.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1022021"></a><p class="title"><b>Table 5. Postconditions for basic_regex construction</b></p>
|
||||
<a name="id1072760"></a><p class="title"><b>Table 5. Postconditions for basic_regex construction</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -816,7 +816,7 @@
|
||||
flags</a> specified in <span class="emphasis"><em>f</em></span>.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1022384"></a><p class="title"><b>Table 6. Postconditions for basic_regex construction</b></p>
|
||||
<a name="id1073122"></a><p class="title"><b>Table 6. Postconditions for basic_regex construction</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -1002,7 +1002,7 @@
|
||||
in <span class="emphasis"><em>f</em></span>.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1023856"></a><p class="title"><b>Table 7. Postconditions for basic_regex::assign</b></p>
|
||||
<a name="id1075141"></a><p class="title"><b>Table 7. 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=US-ASCII">
|
||||
<title>Concepts</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="posix.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concepts/charT_concept.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.concepts"></a><a class="link" href="concepts.html" title="Concepts">Concepts</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>charT Requirements</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../concepts.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="traits_concept.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.concepts.charT_concept"></a><a class="link" href="charT_concept.html" title="charT Requirements">charT Requirements</a>
|
||||
</h4></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Iterator Requirements</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="traits_concept.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../deprecated_interfaces.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.concepts.iterator_concepts"></a><a class="link" href="iterator_concepts.html" title="Iterator Requirements">Iterator
|
||||
Requirements</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Traits Class Requirements</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="charT_concept.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="iterator_concepts.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.concepts.traits_concept"></a><a class="link" href="traits_concept.html" title="Traits Class Requirements">Traits Class
|
||||
Requirements</a>
|
||||
@ -34,7 +34,7 @@
|
||||
Boost-specific enhanced interface.
|
||||
</p>
|
||||
<a name="boost_regex.ref.concepts.traits_concept.minimal_requirements_"></a><h5>
|
||||
<a name="id1124350"></a>
|
||||
<a name="boost_regex.ref.concepts.traits_concept.minimal_requirements_-heading"></a>
|
||||
<a class="link" href="traits_concept.html#boost_regex.ref.concepts.traits_concept.minimal_requirements_">Minimal
|
||||
requirements.</a>
|
||||
</h5>
|
||||
@ -378,7 +378,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="boost_regex.ref.concepts.traits_concept.additional_optional_requirements"></a><h5>
|
||||
<a name="id1127224"></a>
|
||||
<a name="boost_regex.ref.concepts.traits_concept.additional_optional_requirements-heading"></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=US-ASCII">
|
||||
<title>Deprecated Interfaces</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="concepts/iterator_concepts.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deprecated_interfaces/regex_format.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.deprecated_interfaces"></a><a class="link" href="deprecated_interfaces.html" title="Deprecated Interfaces">Deprecated Interfaces</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,11 +3,11 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>High Level Class RegEx (Deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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)">
|
||||
<link rel="next" href="../../background_information.html" title="Background Information">
|
||||
<link rel="next" href="../internal_details.html" title="Internal Details">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@ -20,9 +20,9 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="regex_split.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../deprecated_interfaces.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../background_information.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="regex_split.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../deprecated_interfaces.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../internal_details.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.deprecated_interfaces.old_regex"></a><a class="link" href="old_regex.html" title="High Level Class RegEx (Deprecated)">High
|
||||
Level Class RegEx (Deprecated)</a>
|
||||
@ -59,10 +59,10 @@
|
||||
<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">SetExpression</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">icase</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">);</span>
|
||||
<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">SetExpression</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">icase</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">);</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Expression</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="comment">//
|
||||
</span> <span class="comment">// now matching operators:
|
||||
</span> <span class="comment">//
|
||||
</span> <span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// now matching operators: </span>
|
||||
<span class="comment">// </span>
|
||||
<span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">Search</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">Search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
@ -96,10 +96,10 @@
|
||||
<span class="keyword">unsigned</span> <span class="identifier">Split</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">,</span>
|
||||
<span class="keyword">unsigned</span> <span class="identifier">max_count</span> <span class="special">=</span> <span class="special">~</span><span class="number">0</span><span class="special">);</span>
|
||||
<span class="comment">//
|
||||
</span> <span class="comment">// now operators for returning what matched in more detail:
|
||||
</span> <span class="comment">//
|
||||
</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">Position</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="comment">// </span>
|
||||
<span class="comment">// now operators for returning what matched in more detail: </span>
|
||||
<span class="comment">// </span>
|
||||
<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">Position</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">Length</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">Matched</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">Line</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
@ -827,7 +827,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="regex_split.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../deprecated_interfaces.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../background_information.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="regex_split.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../deprecated_interfaces.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../internal_details.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>regex_format (Deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../deprecated_interfaces.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../deprecated_interfaces.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="regex_grep.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_format"></a><a class="link" href="regex_format.html" title="regex_format (Deprecated)">regex_format
|
||||
(Deprecated)</a>
|
||||
@ -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="id1127772"></a>
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format-heading"></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=US-ASCII">
|
||||
<title>regex_grep (Deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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)">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="regex_format.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../deprecated_interfaces.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="regex_split.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_grep"></a><a class="link" href="regex_grep.html" title="regex_grep (Deprecated)">regex_grep
|
||||
(Deprecated)</a>
|
||||
@ -135,33 +135,33 @@
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">map</span><span class="special">></span>
|
||||
<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>
|
||||
|
||||
<span class="comment">// IndexClasses:
|
||||
</span><span class="comment">// takes the contents of a file in the form of a string
|
||||
</span><span class="comment">// and searches for all the C++ class definitions, storing
|
||||
</span><span class="comment">// their locations in a map of strings/int's
|
||||
</span><span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="special">></span> <span class="identifier">map_type</span><span class="special">;</span>
|
||||
<span class="comment">// IndexClasses: </span>
|
||||
<span class="comment">// takes the contents of a file in the form of a string </span>
|
||||
<span class="comment">// and searches for all the C++ class definitions, storing </span>
|
||||
<span class="comment">// their locations in a map of strings/int's </span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="special">></span> <span class="identifier">map_type</span><span class="special">;</span>
|
||||
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">re</span> <span class="special">=</span>
|
||||
<span class="comment">// possibly leading whitespace:
|
||||
</span> <span class="string">"^[[:space:]]*"</span>
|
||||
<span class="comment">// possible template declaration:
|
||||
</span> <span class="string">"(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"</span>
|
||||
<span class="comment">// class or struct:
|
||||
</span> <span class="string">"(class|struct)[[:space:]]*"</span>
|
||||
<span class="comment">// leading declspec macros etc:
|
||||
</span> <span class="string">"("</span>
|
||||
<span class="comment">// possibly leading whitespace: </span>
|
||||
<span class="string">"^[[:space:]]*"</span>
|
||||
<span class="comment">// possible template declaration:</span>
|
||||
<span class="string">"(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"</span>
|
||||
<span class="comment">// class or struct:</span>
|
||||
<span class="string">"(class|struct)[[:space:]]*"</span>
|
||||
<span class="comment">// leading declspec macros etc:</span>
|
||||
<span class="string">"("</span>
|
||||
<span class="string">"\\<\\w+\\>"</span>
|
||||
<span class="string">"("</span>
|
||||
<span class="string">"[[:blank:]]*\\([^)]*\\)"</span>
|
||||
<span class="string">")?"</span>
|
||||
<span class="string">"[[:space:]]*"</span>
|
||||
<span class="string">")*"</span>
|
||||
<span class="comment">// the class name
|
||||
</span> <span class="string">"(\\<\\w*\\>)[[:space:]]*"</span>
|
||||
<span class="comment">// template specialisation parameters
|
||||
</span> <span class="string">"(<[^;:{]+>)?[[:space:]]*"</span>
|
||||
<span class="comment">// terminate in { or :
|
||||
</span> <span class="string">"(\\{|:[^;\\{()]*\\{)"</span><span class="special">;</span>
|
||||
<span class="comment">// the class name</span>
|
||||
<span class="string">"(\\<\\w*\\>)[[:space:]]*"</span>
|
||||
<span class="comment">// template specialisation parameters</span>
|
||||
<span class="string">"(<[^;:{]+>)?[[:space:]]*"</span>
|
||||
<span class="comment">// terminate in { or :</span>
|
||||
<span class="string">"(\\{|:[^;\\{()]*\\{)"</span><span class="special">;</span>
|
||||
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">expression</span><span class="special">(</span><span class="identifier">re</span><span class="special">);</span>
|
||||
<span class="keyword">class</span> <span class="identifier">IndexClassesPred</span>
|
||||
@ -172,11 +172,11 @@
|
||||
<span class="identifier">IndexClassesPred</span><span class="special">(</span><span class="identifier">map_type</span><span class="special">&</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">::</span><span class="identifier">const_iterator</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">:</span> <span class="identifier">m</span><span class="special">(</span><span class="identifier">a</span><span class="special">),</span> <span class="identifier">base</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span> <span class="special">{}</span>
|
||||
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">smatch</span><span class="special">&</span> <span class="identifier">what</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// what[0] contains the whole string
|
||||
</span> <span class="comment">// what[5] contains the class name.
|
||||
</span> <span class="comment">// what[6] contains the template specialisation if any.
|
||||
</span> <span class="comment">// add class name and position to map:
|
||||
</span> <span class="identifier">m</span><span class="special">[</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">second</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">second</span><span class="special">)]</span> <span class="special">=</span>
|
||||
<span class="comment">// what[0] contains the whole string </span>
|
||||
<span class="comment">// what[5] contains the class name. </span>
|
||||
<span class="comment">// what[6] contains the template specialisation if any. </span>
|
||||
<span class="comment">// add class name and position to map: </span>
|
||||
<span class="identifier">m</span><span class="special">[</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">second</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">second</span><span class="special">)]</span> <span class="special">=</span>
|
||||
<span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span> <span class="special">-</span> <span class="identifier">base</span><span class="special">;</span>
|
||||
<span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
@ -197,33 +197,33 @@
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">map</span><span class="special">></span>
|
||||
<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>
|
||||
|
||||
<span class="comment">// purpose:
|
||||
</span><span class="comment">// takes the contents of a file in the form of a string
|
||||
</span><span class="comment">// and searches for all the C++ class definitions, storing
|
||||
</span><span class="comment">// their locations in a map of strings/int's
|
||||
</span><span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="special">></span> <span class="identifier">map_type</span><span class="special">;</span>
|
||||
<span class="comment">// purpose: </span>
|
||||
<span class="comment">// takes the contents of a file in the form of a string </span>
|
||||
<span class="comment">// and searches for all the C++ class definitions, storing </span>
|
||||
<span class="comment">// their locations in a map of strings/int's </span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="special">></span> <span class="identifier">map_type</span><span class="special">;</span>
|
||||
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">re</span> <span class="special">=</span>
|
||||
<span class="comment">// possibly leading whitespace:
|
||||
</span> <span class="string">"^[[:space:]]*"</span>
|
||||
<span class="comment">// possible template declaration:
|
||||
</span> <span class="string">"(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"</span>
|
||||
<span class="comment">// class or struct:
|
||||
</span> <span class="string">"(class|struct)[[:space:]]*"</span>
|
||||
<span class="comment">// leading declspec macros etc:
|
||||
</span> <span class="string">"("</span>
|
||||
<span class="comment">// possibly leading whitespace: </span>
|
||||
<span class="string">"^[[:space:]]*"</span>
|
||||
<span class="comment">// possible template declaration:</span>
|
||||
<span class="string">"(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"</span>
|
||||
<span class="comment">// class or struct:</span>
|
||||
<span class="string">"(class|struct)[[:space:]]*"</span>
|
||||
<span class="comment">// leading declspec macros etc:</span>
|
||||
<span class="string">"("</span>
|
||||
<span class="string">"\\<\\w+\\>"</span>
|
||||
<span class="string">"("</span>
|
||||
<span class="string">"[[:blank:]]*\\([^)]*\\)"</span>
|
||||
<span class="string">")?"</span>
|
||||
<span class="string">"[[:space:]]*"</span>
|
||||
<span class="string">")*"</span>
|
||||
<span class="comment">// the class name
|
||||
</span> <span class="string">"(\\<\\w*\\>)[[:space:]]*"</span>
|
||||
<span class="comment">// template specialisation parameters
|
||||
</span> <span class="string">"(<[^;:{]+>)?[[:space:]]*"</span>
|
||||
<span class="comment">// terminate in { or :
|
||||
</span> <span class="string">"(\\{|:[^;\\{()]*\\{)"</span><span class="special">;</span>
|
||||
<span class="comment">// the class name</span>
|
||||
<span class="string">"(\\<\\w*\\>)[[:space:]]*"</span>
|
||||
<span class="comment">// template specialisation parameters</span>
|
||||
<span class="string">"(<[^;:{]+>)?[[:space:]]*"</span>
|
||||
<span class="comment">// terminate in { or :</span>
|
||||
<span class="string">"(\\{|:[^;\\{()]*\\{)"</span><span class="special">;</span>
|
||||
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">expression</span><span class="special">(</span><span class="identifier">re</span><span class="special">);</span>
|
||||
<span class="identifier">map_type</span> <span class="identifier">class_index</span><span class="special">;</span>
|
||||
@ -231,11 +231,11 @@
|
||||
|
||||
<span class="keyword">bool</span> <span class="identifier">grep_callback</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">smatch</span><span class="special">&</span> <span class="identifier">what</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// what[0] contains the whole string
|
||||
</span> <span class="comment">// what[5] contains the class name.
|
||||
</span> <span class="comment">// what[6] contains the template specialisation if any.
|
||||
</span> <span class="comment">// add class name and position to map:
|
||||
</span> <span class="identifier">class_index</span><span class="special">[</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">second</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">second</span><span class="special">)]</span> <span class="special">=</span>
|
||||
<span class="comment">// what[0] contains the whole string </span>
|
||||
<span class="comment">// what[5] contains the class name. </span>
|
||||
<span class="comment">// what[6] contains the template specialisation if any. </span>
|
||||
<span class="comment">// add class name and position to map: </span>
|
||||
<span class="identifier">class_index</span><span class="special">[</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">second</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">second</span><span class="special">)]</span> <span class="special">=</span>
|
||||
<span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span> <span class="special">-</span> <span class="identifier">base</span><span class="special">;</span>
|
||||
<span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
@ -257,11 +257,11 @@
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">map</span><span class="special">></span>
|
||||
<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>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">functional</span><span class="special">></span>
|
||||
<span class="comment">// purpose:
|
||||
</span><span class="comment">// takes the contents of a file in the form of a string
|
||||
</span><span class="comment">// and searches for all the C++ class definitions, storing
|
||||
</span><span class="comment">// their locations in a map of strings/int's
|
||||
</span>
|
||||
<span class="comment">// purpose: </span>
|
||||
<span class="comment">// takes the contents of a file in the form of a string </span>
|
||||
<span class="comment">// and searches for all the C++ class definitions, storing </span>
|
||||
<span class="comment">// their locations in a map of strings/int's </span>
|
||||
|
||||
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="special">></span> <span class="identifier">map_type</span><span class="special">;</span>
|
||||
<span class="keyword">class</span> <span class="identifier">class_index</span>
|
||||
<span class="special">{</span>
|
||||
@ -281,11 +281,11 @@
|
||||
<span class="special">};</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">class_index</span><span class="special">::</span><span class="identifier">grep_callback</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">smatch</span> <span class="identifier">what</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// what[0] contains the whole string
|
||||
</span> <span class="comment">// what[5] contains the class name.
|
||||
</span> <span class="comment">// what[6] contains the template specialisation if any.
|
||||
</span> <span class="comment">// add class name and position to map:
|
||||
</span> <span class="identifier">index</span><span class="special">[</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">second</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">second</span><span class="special">)]</span> <span class="special">=</span>
|
||||
<span class="comment">// what[0] contains the whole string </span>
|
||||
<span class="comment">// what[5] contains the class name. </span>
|
||||
<span class="comment">// what[6] contains the template specialisation if any. </span>
|
||||
<span class="comment">// add class name and position to map: </span>
|
||||
<span class="identifier">index</span><span class="special">[</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">second</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">second</span><span class="special">)]</span> <span class="special">=</span>
|
||||
<span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span> <span class="special">-</span> <span class="identifier">base</span><span class="special">;</span>
|
||||
<span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
@ -310,11 +310,11 @@
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">map</span><span class="special">></span>
|
||||
<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>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">functional</span><span class="special">></span>
|
||||
<span class="comment">// purpose:
|
||||
</span><span class="comment">// takes the contents of a file in the form of a string
|
||||
</span><span class="comment">// and searches for all the C++ class definitions, storing
|
||||
</span><span class="comment">// their locations in a map of strings/int's
|
||||
</span>
|
||||
<span class="comment">// purpose: </span>
|
||||
<span class="comment">// takes the contents of a file in the form of a string </span>
|
||||
<span class="comment">// and searches for all the C++ class definitions, storing </span>
|
||||
<span class="comment">// their locations in a map of strings/int's </span>
|
||||
|
||||
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="special">></span> <span class="identifier">map_type</span><span class="special">;</span>
|
||||
<span class="keyword">class</span> <span class="identifier">class_index</span>
|
||||
<span class="special">{</span>
|
||||
@ -337,11 +337,11 @@
|
||||
|
||||
<span class="keyword">bool</span> <span class="identifier">class_index</span><span class="special">::</span><span class="identifier">grep_callback</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">arg_type</span><span class="special">&</span> <span class="identifier">what</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// what[0] contains the whole string
|
||||
</span><span class="comment">// what[5] contains the class name.
|
||||
</span><span class="comment">// what[6] contains the template specialisation if any.
|
||||
</span><span class="comment">// add class name and position to map:
|
||||
</span><span class="identifier">index</span><span class="special">[</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">second</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">second</span><span class="special">)]</span> <span class="special">=</span>
|
||||
<span class="comment">// what[0] contains the whole string </span>
|
||||
<span class="comment">// what[5] contains the class name. </span>
|
||||
<span class="comment">// what[6] contains the template specialisation if any. </span>
|
||||
<span class="comment">// add class name and position to map: </span>
|
||||
<span class="identifier">index</span><span class="special">[</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">second</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">second</span><span class="special">)]</span> <span class="special">=</span>
|
||||
<span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span> <span class="special">-</span> <span class="identifier">base</span><span class="special">;</span>
|
||||
<span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>regex_split (deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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)">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="regex_grep.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../deprecated_interfaces.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="old_regex.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_split"></a><a class="link" href="regex_split.html" title="regex_split (deprecated)">regex_split
|
||||
(deprecated)</a>
|
||||
@ -108,16 +108,16 @@
|
||||
<span class="keyword">void</span> <span class="identifier">load_file</span><span class="special">(</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">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&</span> <span class="identifier">is</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">s</span><span class="special">.</span><span class="identifier">erase</span><span class="special">();</span>
|
||||
<span class="comment">//
|
||||
</span> <span class="comment">// attempt to grow string buffer to match file size,
|
||||
</span> <span class="comment">// this doesn't always work...
|
||||
</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">reserve</span><span class="special">(</span><span class="identifier">is</span><span class="special">.</span><span class="identifier">rdbuf</span><span class="special">()-&</span><span class="identifier">gtin_avail</span><span class="special">());</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// attempt to grow string buffer to match file size,</span>
|
||||
<span class="comment">// this doesn't always work...</span>
|
||||
<span class="identifier">s</span><span class="special">.</span><span class="identifier">reserve</span><span class="special">(</span><span class="identifier">is</span><span class="special">.</span><span class="identifier">rdbuf</span><span class="special">()-&</span><span class="identifier">gtin_avail</span><span class="special">());</span>
|
||||
<span class="keyword">char</span> <span class="identifier">c</span><span class="special">;</span>
|
||||
<span class="keyword">while</span><span class="special">(</span><span class="identifier">is</span><span class="special">.</span><span class="identifier">get</span><span class="special">(</span><span class="identifier">c</span><span class="special">))</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// use logarithmic growth stategy, in case
|
||||
</span> <span class="comment">// in_avail (above) returned zero:
|
||||
</span> <span class="keyword">if</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">capacity</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">size</span><span class="special">())</span>
|
||||
<span class="comment">// use logarithmic growth stategy, in case</span>
|
||||
<span class="comment">// in_avail (above) returned zero:</span>
|
||||
<span class="keyword">if</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">capacity</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">size</span><span class="special">())</span>
|
||||
<span class="identifier">s</span><span class="special">.</span><span class="identifier">reserve</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">capacity</span><span class="special">()</span> <span class="special">*</span> <span class="number">3</span><span class="special">);</span>
|
||||
<span class="identifier">s</span><span class="special">.</span><span class="identifier">append</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="identifier">c</span><span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>error_type</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,12 +22,12 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="match_flag_type.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="regex_traits.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<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="id1105011"></a>
|
||||
<a name="boost_regex.ref.error_type.synopsis-heading"></a>
|
||||
<a class="link" href="error_type.html#boost_regex.ref.error_type.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -53,11 +53,11 @@
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">error_type</span> <span class="identifier">error_stack</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">error_type</span> <span class="identifier">error_bad_pattern</span><span class="special">;</span>
|
||||
|
||||
<span class="special">}</span> <span class="comment">// namespace regex_constants
|
||||
</span><span class="special">}</span> <span class="comment">// namespace boost
|
||||
</span></pre>
|
||||
<span class="special">}</span> <span class="comment">// namespace regex_constants</span>
|
||||
<span class="special">}</span> <span class="comment">// namespace boost</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.error_type.description"></a><h5>
|
||||
<a name="id1105426"></a>
|
||||
<a name="boost_regex.ref.error_type.description-heading"></a>
|
||||
<a class="link" href="error_type.html#boost_regex.ref.error_type.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
45
doc/html/boost_regex/ref/internal_details.html
Normal file
45
doc/html/boost_regex/ref/internal_details.html
Normal file
@ -0,0 +1,45 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Internal Details</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="deprecated_interfaces/old_regex.html" title="High Level Class RegEx (Deprecated)">
|
||||
<link rel="next" href="internal_details/uni_iter.html" title="Unicode Iterators">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="deprecated_interfaces/old_regex.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="internal_details/uni_iter.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.internal_details"></a><a class="link" href="internal_details.html" title="Internal Details">Internal Details</a>
|
||||
</h3></div></div></div>
|
||||
<div class="toc"><dl><dt><span class="section"><a href="internal_details/uni_iter.html">Unicode
|
||||
Iterators</a></span></dt></dl></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 1998-2010 John Maddock<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>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="deprecated_interfaces/old_regex.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="internal_details/uni_iter.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
183
doc/html/boost_regex/ref/internal_details/uni_iter.html
Normal file
183
doc/html/boost_regex/ref/internal_details/uni_iter.html
Normal file
@ -0,0 +1,183 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Unicode Iterators</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../internal_details.html" title="Internal Details">
|
||||
<link rel="prev" href="../internal_details.html" title="Internal Details">
|
||||
<link rel="next" href="../../background_information.html" title="Background Information">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../internal_details.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../internal_details.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../background_information.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.internal_details.uni_iter"></a><a class="link" href="uni_iter.html" title="Unicode Iterators">Unicode
|
||||
Iterators</a>
|
||||
</h4></div></div></div>
|
||||
<a name="boost_regex.ref.internal_details.uni_iter.synopsis"></a><h5>
|
||||
<a name="boost_regex.ref.internal_details.uni_iter.synopsis-heading"></a>
|
||||
<a class="link" href="uni_iter.html#boost_regex.ref.internal_details.uni_iter.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<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">pending</span><span class="special">/</span><span class="identifier">unicode_iterator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BaseIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U16Type</span> <span class="special">=</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint16_t</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">u32_to_u16_iterator</span><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BaseIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U32Type</span> <span class="special">=</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint32_t</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">u16_to_u32_iterator</span><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BaseIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U8Type</span> <span class="special">=</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint8_t</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">u32_to_u8_iterator</span><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BaseIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U32Type</span> <span class="special">=</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint32_t</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">u8_to_u32_iterator</span><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BaseIterator</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">utf16_output_iterator</span><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BaseIterator</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">utf8_output_iterator</span><span class="special">;</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.internal_details.uni_iter.description"></a><h5>
|
||||
<a name="boost_regex.ref.internal_details.uni_iter.description-heading"></a>
|
||||
<a class="link" href="uni_iter.html#boost_regex.ref.internal_details.uni_iter.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
This header contains a selection of iterator adaptors that make a sequence
|
||||
of characters in one encoding "look like" a read-only sequence
|
||||
of characters in another encoding.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BaseIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U16Type</span> <span class="special">=</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint16_t</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">u32_to_u16_iterator</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">u32_to_u16_iterator</span><span class="special">();</span>
|
||||
<span class="identifier">u32_to_u16_iterator</span><span class="special">(</span><span class="identifier">BaseIterator</span> <span class="identifier">start_position</span><span class="special">);</span>
|
||||
|
||||
<span class="comment">// Other standard BidirectionalIterator members here...</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
A Bidirectional iterator adapter that makes an underlying sequence of UTF32
|
||||
characters look like a (read-only) sequence of UTF16 characters. The UTF16
|
||||
characters are encoded in the platforms native byte order.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BaseIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U32Type</span> <span class="special">=</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint32_t</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">u16_to_u32_iterator</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">u16_to_u32_iterator</span><span class="special">();</span>
|
||||
<span class="identifier">u16_to_u32_iterator</span><span class="special">(</span><span class="identifier">BaseIterator</span> <span class="identifier">start_position</span><span class="special">);</span>
|
||||
<span class="identifier">u16_to_u32_iterator</span><span class="special">(</span><span class="identifier">BaseIterator</span> <span class="identifier">start_position</span><span class="special">,</span> <span class="identifier">BaseIterator</span> <span class="identifier">start_range</span><span class="special">,</span> <span class="identifier">BaseIterator</span> <span class="identifier">end_range</span><span class="special">);</span>
|
||||
|
||||
<span class="comment">// Other standard BidirectionalIterator members here...</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
A Bidirectional iterator adapter that makes an underlying sequence of UTF16
|
||||
characters (in the platforms native byte order) look like a (read-only)
|
||||
sequence of UTF32 characters.
|
||||
</p>
|
||||
<p>
|
||||
The three-arg constructor of this class takes the start and end of the
|
||||
underlying sequence as well as the position to start iteration from. This
|
||||
constructor validates that the underlying sequence has validly encoded
|
||||
endpoints: this prevents accidently incrementing/decrementing past the
|
||||
end of the underlying sequence as a result of invalid UTF16 code sequences
|
||||
at the endpoints of the underlying range.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BaseIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U8Type</span> <span class="special">=</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint8_t</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">u32_to_u8_iterator</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">u32_to_u8_iterator</span><span class="special">();</span>
|
||||
<span class="identifier">u32_to_u8_iterator</span><span class="special">(</span><span class="identifier">BaseIterator</span> <span class="identifier">start_position</span><span class="special">);</span>
|
||||
|
||||
<span class="comment">// Other standard BidirectionalIterator members here...</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
A Bidirectional iterator adapter that makes an underlying sequence of UTF32
|
||||
characters look like a (read-only) sequence of UTF8 characters.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BaseIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U32Type</span> <span class="special">=</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint32_t</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">u8_to_u32_iterator</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">u8_to_u32_iterator</span><span class="special">();</span>
|
||||
<span class="identifier">u8_to_u32_iterator</span><span class="special">(</span><span class="identifier">BaseIterator</span> <span class="identifier">start_position</span><span class="special">);</span>
|
||||
<span class="identifier">u8_to_u32_iterator</span><span class="special">(</span><span class="identifier">BaseIterator</span> <span class="identifier">start_position</span><span class="special">,</span> <span class="identifier">BaseIterator</span> <span class="identifier">start_range</span><span class="special">,</span> <span class="identifier">BaseIterator</span> <span class="identifier">end_range</span><span class="special">);</span>
|
||||
|
||||
<span class="comment">// Other standard BidirectionalIterator members here...</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
A Bidirectional iterator adapter that makes an underlying sequence of UTF8
|
||||
characters look like a (read-only) sequence of UTF32 characters.
|
||||
</p>
|
||||
<p>
|
||||
The three-arg constructor of this class takes the start and end of the
|
||||
underlying sequence as well as the position to start iteration from. This
|
||||
constructor validates that the underlying sequence has validly encoded
|
||||
endpoints: this prevents accidently incrementing/decrementing past the
|
||||
end of the underlying sequence as a result of invalid UTF8 code sequences
|
||||
at the endpoints of the underlying range.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BaseIterator</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">utf16_output_iterator</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">utf16_output_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">BaseIterator</span><span class="special">&</span> <span class="identifier">b</span><span class="special">);</span>
|
||||
<span class="identifier">utf16_output_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">utf16_output_iterator</span><span class="special">&</span> <span class="identifier">that</span><span class="special">);</span>
|
||||
<span class="identifier">utf16_output_iterator</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">utf16_output_iterator</span><span class="special">&</span> <span class="identifier">that</span><span class="special">);</span>
|
||||
|
||||
<span class="comment">// Other standard OutputIterator members here...</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
Simple OutputIterator adapter - accepts UTF32 values as input, and forwards
|
||||
them to <span class="emphasis"><em>BaseIterator b</em></span> as UTF16. Both UTF32 and UTF16
|
||||
values are in native byte order.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BaseIterator</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">utf8_output_iterator</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">utf8_output_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">BaseIterator</span><span class="special">&</span> <span class="identifier">b</span><span class="special">);</span>
|
||||
<span class="identifier">utf8_output_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">utf8_output_iterator</span><span class="special">&</span> <span class="identifier">that</span><span class="special">);</span>
|
||||
<span class="identifier">utf8_output_iterator</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">utf8_output_iterator</span><span class="special">&</span> <span class="identifier">that</span><span class="special">);</span>
|
||||
|
||||
<span class="comment">// Other standard OutputIterator members here...</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
Simple OutputIterator adapter - accepts UTF32 values as input, and forwards
|
||||
them to <span class="emphasis"><em>BaseIterator b</em></span> as UTF8. The UTF32 input values
|
||||
must be in native byte order.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 1998-2010 John Maddock<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>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../internal_details.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../internal_details.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../background_information.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>match_flag_type</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="syntax_option_type/syntax_option_type_literal.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="error_type.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.match_flag_type"></a><a class="link" href="match_flag_type.html" title="match_flag_type">match_flag_type</a>
|
||||
</h3></div></div></div>
|
||||
@ -65,11 +65,11 @@
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">format_first_only</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">format_all</span><span class="special">;</span>
|
||||
|
||||
<span class="special">}</span> <span class="comment">// namespace regex_constants
|
||||
</span><span class="special">}</span> <span class="comment">// namespace boost
|
||||
</span></pre>
|
||||
<span class="special">}</span> <span class="comment">// namespace regex_constants</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="id1103690"></a>
|
||||
<a name="boost_regex.ref.match_flag_type.description-heading"></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=US-ASCII">
|
||||
<title>match_results</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,12 +22,12 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="basic_regex.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="sub_match.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<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="id1027364"></a>
|
||||
<a name="boost_regex.ref.match_results.synopsis-heading"></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>
|
||||
@ -86,18 +86,18 @@
|
||||
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">iterator_traits</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>::</span><span class="identifier">value_type</span> <span class="identifier">char_type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">char_type</span><span class="special">></span> <span class="identifier">string_type</span><span class="special">;</span>
|
||||
|
||||
<span class="comment">// construct/copy/destroy:
|
||||
</span> <a class="link" href="match_results.html#boost_regex.match_results.construct">explicit match_results</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Allocator</span><span class="special">&</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">Allocator</span><span class="special">());</span>
|
||||
<span class="comment">// construct/copy/destroy:</span>
|
||||
<a class="link" href="match_results.html#boost_regex.match_results.construct">explicit match_results</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Allocator</span><span class="special">&</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">Allocator</span><span class="special">());</span>
|
||||
<a class="link" href="match_results.html#boost_regex.match_results.copy_construct">match_results</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&</span> <span class="identifier">m</span><span class="special">);</span>
|
||||
<a class="link" href="match_results.html#boost_regex.match_results.assign">match_results& operator=</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&</span> <span class="identifier">m</span><span class="special">);</span>
|
||||
<span class="special">~</span><span class="identifier">match_results</span><span class="special">();</span>
|
||||
|
||||
<span class="comment">// size:
|
||||
</span> <span class="identifier">size_type</span> <a class="link" href="match_results.html#boost_regex.match_results.size">size</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="comment">// size:</span>
|
||||
<span class="identifier">size_type</span> <a class="link" href="match_results.html#boost_regex.match_results.size">size</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="identifier">size_type</span> <a class="link" href="match_results.html#boost_regex.match_results.max_size">max_size</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<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="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>
|
||||
@ -131,8 +131,8 @@
|
||||
<span class="identifier">const_reference</span> <a class="link" href="match_results.html#boost_regex.match_results.suffix">suffix</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="identifier">const_iterator</span> <a class="link" href="match_results.html#boost_regex.match_results.begin">begin</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="identifier">const_iterator</span> <a class="link" href="match_results.html#boost_regex.match_results.end">end</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="comment">// format:
|
||||
</span> <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">Formatter</span><span class="special">></span>
|
||||
<span class="comment">// format:</span>
|
||||
<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">Formatter</span><span class="special">></span>
|
||||
<span class="identifier">OutputIterator</span> <a class="link" href="match_results.html#boost_regex.match_results.format">format</a><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
|
||||
<span class="identifier">Formatter</span> <span class="identifier">fmt</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
@ -167,7 +167,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="id1032184"></a>
|
||||
<a name="boost_regex.ref.match_results.description-heading"></a>
|
||||
<a class="link" href="match_results.html#boost_regex.ref.match_results.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -625,16 +625,16 @@
|
||||
then depending on the number of arguments the function object accepts, it
|
||||
will either:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
Call <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">)</span></code>
|
||||
and copy the string returned to <code class="computeroutput"><span class="identifier">OutputIterator</span></code>
|
||||
<span class="emphasis"><em>out</em></span>.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Call <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">,</span> <span class="identifier">out</span><span class="special">)</span></code>.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Call <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">,</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
|
||||
</li>
|
||||
</ul></div>
|
||||
@ -691,17 +691,17 @@
|
||||
then depending on the number of arguments the function object accepts, it
|
||||
will either:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
Call <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">)</span></code>
|
||||
and return the result.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Call <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">,</span> <span class="identifier">unspecified</span><span class="special">-</span><span class="identifier">output</span><span class="special">-</span><span class="identifier">iterator</span><span class="special">)</span></code>,
|
||||
where <code class="computeroutput"><span class="identifier">unspecified</span><span class="special">-</span><span class="identifier">output</span><span class="special">-</span><span class="identifier">iterator</span></code> is an unspecified OutputIterator
|
||||
type used to copy the output to the string result.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Call <code class="computeroutput"><span class="identifier">fmt</span><span class="special">(*</span><span class="keyword">this</span><span class="special">,</span> <span class="identifier">unspecified</span><span class="special">-</span><span class="identifier">output</span><span class="special">-</span><span class="identifier">iterator</span><span class="special">,</span>
|
||||
<span class="identifier">flags</span><span class="special">)</span></code>,
|
||||
where <code class="computeroutput"><span class="identifier">unspecified</span><span class="special">-</span><span class="identifier">output</span><span class="special">-</span><span class="identifier">iterator</span></code> is an unspecified OutputIterator
|
||||
@ -765,17 +765,17 @@
|
||||
<span class="bold"><strong>Rationale</strong></span>: Enabling this feature has several
|
||||
consequences:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
sub_match occupies more memory resulting in complex expressions running
|
||||
out of memory or stack space more quickly during matching.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
The matching algorithms are less efficient at handling some features
|
||||
(independent sub-expressions for example), even when match_extra is not
|
||||
used.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
The matching algorithms are much less efficient (i.e. slower), when match_extra
|
||||
is used. Mostly this is down to the extra memory allocations that have
|
||||
to take place.
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Interfacing With Non-Standard String Types</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="regex_traits.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="non_std_strings/icu.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings"></a><a class="link" href="non_std_strings.html" title="Interfacing With Non-Standard String Types">Interfacing With Non-Standard
|
||||
String Types</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Working With Unicode and ICU String Types</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../non_std_strings.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../non_std_strings.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="icu/intro.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.icu"></a><a class="link" href="icu.html" title="Working With Unicode and ICU String Types">Working With Unicode
|
||||
and ICU String Types</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Introduction to using Regex with ICU</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../icu.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../icu.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="unicode_types.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.icu.intro"></a><a class="link" href="intro.html" title="Introduction to using Regex with ICU">Introduction
|
||||
to using Regex with ICU</a>
|
||||
@ -45,16 +45,16 @@
|
||||
<p>
|
||||
The header will enable you to:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
Create regular expressions that treat Unicode strings as sequences
|
||||
of UTF-32 code points.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Create regular expressions that support various Unicode data properties,
|
||||
including character classification.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Transparently search Unicode strings that are encoded as either UTF-8,
|
||||
UTF-16 or UTF-32.
|
||||
</li>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Unicode Regular Expression Algorithms</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="unicode_types.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../icu.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="unicode_iter.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo"></a><a class="link" href="unicode_algo.html" title="Unicode Regular Expression Algorithms">Unicode
|
||||
Regular Expression Algorithms</a>
|
||||
@ -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="id1107769"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match-heading"></a>
|
||||
<a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match">u32regex_match</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -57,11 +57,11 @@
|
||||
<p>
|
||||
Example: match a password, encoded in a UTF-16 UnicodeString:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">//
|
||||
</span><span class="comment">// Find out if *password* meets our password requirements,
|
||||
</span><span class="comment">// as defined by the regular expression *requirements*.
|
||||
</span><span class="comment">//
|
||||
</span><span class="keyword">bool</span> <span class="identifier">is_valid_password</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UnicodeString</span><span class="special">&</span> <span class="identifier">password</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">UnicodeString</span><span class="special">&</span> <span class="identifier">requirements</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="comment">//</span>
|
||||
<span class="comment">// Find out if *password* meets our password requirements,</span>
|
||||
<span class="comment">// as defined by the regular expression *requirements*.</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">is_valid_password</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UnicodeString</span><span class="special">&</span> <span class="identifier">password</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">UnicodeString</span><span class="special">&</span> <span class="identifier">requirements</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">u32regex_match</span><span class="special">(</span><span class="identifier">password</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_u32regex</span><span class="special">(</span><span class="identifier">requirements</span><span class="special">));</span>
|
||||
<span class="special">}</span>
|
||||
@ -69,18 +69,18 @@
|
||||
<p>
|
||||
Example: match a UTF-8 encoded filename:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">//
|
||||
</span><span class="comment">// Extract filename part of a path from a UTF-8 encoded std::string and return the result
|
||||
</span><span class="comment">// as another std::string:
|
||||
</span><span class="comment">//
|
||||
</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">get_filename</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">path</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="comment">//</span>
|
||||
<span class="comment">// Extract filename part of a path from a UTF-8 encoded std::string and return the result</span>
|
||||
<span class="comment">// as another std::string:</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">get_filename</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">path</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">u32regex</span> <span class="identifier">r</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_u32regex</span><span class="special">(</span><span class="string">"(?:\\A|.*\\\\)([^\\\\]+)"</span><span class="special">);</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">smatch</span> <span class="identifier">what</span><span class="special">;</span>
|
||||
<span class="keyword">if</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">u32regex_match</span><span class="special">(</span><span class="identifier">path</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">r</span><span class="special">))</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// extract $1 as a std::string:
|
||||
</span> <span class="keyword">return</span> <span class="identifier">what</span><span class="special">.</span><span class="identifier">str</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
|
||||
<span class="comment">// extract $1 as a std::string:</span>
|
||||
<span class="keyword">return</span> <span class="identifier">what</span><span class="special">.</span><span class="identifier">str</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
<span class="keyword">else</span>
|
||||
<span class="special">{</span>
|
||||
@ -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="id1108284"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search-heading"></a>
|
||||
<a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search">u32regex_search</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -105,21 +105,21 @@
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">UnicodeString</span> <span class="identifier">extract_greek</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UnicodeString</span><span class="special">&</span> <span class="identifier">text</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// searches through some UTF-16 encoded text for a block encoded in Greek,
|
||||
</span> <span class="comment">// this expression is imperfect, but the best we can do for now - searching
|
||||
</span> <span class="comment">// for specific scripts is actually pretty hard to do right.
|
||||
</span> <span class="comment">//
|
||||
</span> <span class="comment">// Here we search for a character sequence that begins with a Greek letter,
|
||||
</span> <span class="comment">// and continues with characters that are either not-letters ( [^[:L*:]] )
|
||||
</span> <span class="comment">// or are characters in the Greek character block ( [\\x{370}-\\x{3FF}] ).
|
||||
</span> <span class="comment">//
|
||||
</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">u32regex</span> <span class="identifier">r</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_u32regex</span><span class="special">(</span>
|
||||
<span class="comment">// searches through some UTF-16 encoded text for a block encoded in Greek,</span>
|
||||
<span class="comment">// this expression is imperfect, but the best we can do for now - searching</span>
|
||||
<span class="comment">// for specific scripts is actually pretty hard to do right.</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// Here we search for a character sequence that begins with a Greek letter,</span>
|
||||
<span class="comment">// and continues with characters that are either not-letters ( [^[:L*:]] )</span>
|
||||
<span class="comment">// or are characters in the Greek character block ( [\\x{370}-\\x{3FF}] ).</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">u32regex</span> <span class="identifier">r</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_u32regex</span><span class="special">(</span>
|
||||
<span class="identifier">L</span><span class="string">"[\\x{370}-\\x{3FF}](?:[^[:L*:]]|[\\x{370}-\\x{3FF}])*"</span><span class="special">);</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">u16match</span> <span class="identifier">what</span><span class="special">;</span>
|
||||
<span class="keyword">if</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">u32regex_search</span><span class="special">(</span><span class="identifier">text</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">r</span><span class="special">))</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// extract $0 as a UnicodeString:
|
||||
</span> <span class="keyword">return</span> <span class="identifier">UnicodeString</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">.</span><span class="identifier">length</span><span class="special">(</span><span class="number">0</span><span class="special">));</span>
|
||||
<span class="comment">// extract $0 as a UnicodeString:</span>
|
||||
<span class="keyword">return</span> <span class="identifier">UnicodeString</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">.</span><span class="identifier">length</span><span class="special">(</span><span class="number">0</span><span class="special">));</span>
|
||||
<span class="special">}</span>
|
||||
<span class="keyword">else</span>
|
||||
<span class="special">{</span>
|
||||
@ -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="id1108702"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace-heading"></a>
|
||||
<a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace">u32regex_replace</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -146,15 +146,15 @@
|
||||
<p>
|
||||
Example: Credit card number reformatting:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">//
|
||||
</span><span class="comment">// Take a credit card number as a string of digits,
|
||||
</span><span class="comment">// and reformat it as a human readable string with "-"
|
||||
</span><span class="comment">// separating each group of four digit;,
|
||||
</span><span class="comment">// note that we're mixing a UTF-32 regex, with a UTF-16
|
||||
</span><span class="comment">// string and a UTF-8 format specifier, and it still all
|
||||
</span><span class="comment">// just works:
|
||||
</span><span class="comment">//
|
||||
</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">u32regex</span> <span class="identifier">e</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_u32regex</span><span class="special">(</span>
|
||||
<pre class="programlisting"><span class="comment">//</span>
|
||||
<span class="comment">// Take a credit card number as a string of digits, </span>
|
||||
<span class="comment">// and reformat it as a human readable string with "-"</span>
|
||||
<span class="comment">// separating each group of four digit;, </span>
|
||||
<span class="comment">// note that we're mixing a UTF-32 regex, with a UTF-16</span>
|
||||
<span class="comment">// string and a UTF-8 format specifier, and it still all </span>
|
||||
<span class="comment">// just works:</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">u32regex</span> <span class="identifier">e</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_u32regex</span><span class="special">(</span>
|
||||
<span class="string">"\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z"</span><span class="special">);</span>
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">human_format</span> <span class="special">=</span> <span class="string">"$1-$2-$3-$4"</span><span class="special">;</span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Unicode Aware Regex Iterators</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,13 +22,13 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="unicode_algo.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../icu.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../mfc_strings.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter"></a><a class="link" href="unicode_iter.html" title="Unicode Aware Regex Iterators">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="id1109020"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator-heading"></a>
|
||||
<a class="link" href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator">u32regex_iterator</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -42,8 +42,8 @@
|
||||
<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">u32regex_iterator</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// for members see regex_iterator
|
||||
</span><span class="special">};</span>
|
||||
<span class="comment">// for members see regex_iterator</span>
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="keyword">typedef</span> <span class="identifier">u32regex_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*></span> <span class="identifier">utf8regex_iterator</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">u32regex_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="identifier">UChar</span><span class="special">*></span> <span class="identifier">utf16regex_iterator</span><span class="special">;</span>
|
||||
@ -91,9 +91,9 @@
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">enumerate_currencies</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">text</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// enumerate and print all the currency symbols, along
|
||||
</span> <span class="comment">// with any associated numeric values:
|
||||
</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">re</span> <span class="special">=</span>
|
||||
<span class="comment">// enumerate and print all the currency symbols, along</span>
|
||||
<span class="comment">// with any associated numeric values:</span>
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">re</span> <span class="special">=</span>
|
||||
<span class="string">"([[:Sc:]][[:Cf:][:Cc:][:Z*:]]*)?"</span>
|
||||
<span class="string">"([[:Nd:]]+(?:[[:Po:]][[:Nd:]]+)?)?"</span>
|
||||
<span class="string">"(?(1)"</span>
|
||||
@ -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="id1111465"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator-heading"></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>
|
||||
@ -140,8 +140,8 @@
|
||||
<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">u32regex_token_iterator</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// for members see regex_token_iterator
|
||||
</span><span class="special">};</span>
|
||||
<span class="comment">// for members see regex_token_iterator</span>
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="keyword">typedef</span> <span class="identifier">u32regex_token_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*></span> <span class="identifier">utf8regex_token_iterator</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">u32regex_token_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="identifier">UChar</span><span class="special">*></span> <span class="identifier">utf16regex_token_iterator</span><span class="special">;</span>
|
||||
@ -285,9 +285,9 @@
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">enumerate_currencies2</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">text</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// enumerate and print all the currency symbols, along
|
||||
</span> <span class="comment">// with any associated numeric values:
|
||||
</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">re</span> <span class="special">=</span>
|
||||
<span class="comment">// enumerate and print all the currency symbols, along</span>
|
||||
<span class="comment">// with any associated numeric values:</span>
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">re</span> <span class="special">=</span>
|
||||
<span class="string">"([[:Sc:]][[:Cf:][:Cc:][:Z*:]]*)?"</span>
|
||||
<span class="string">"([[:Nd:]]+(?:[[:Po:]][[:Nd:]]+)?)?"</span>
|
||||
<span class="string">"(?(1)"</span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Unicode regular expression types</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="intro.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../icu.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="unicode_algo.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_types"></a><a class="link" href="unicode_types.html" title="Unicode regular expression types">Unicode
|
||||
regular expression types</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Using Boost Regex With MFC Strings</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="icu/unicode_iter.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../non_std_strings.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mfc_strings/mfc_intro.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings"></a><a class="link" href="mfc_strings.html" title="Using Boost Regex With MFC Strings">Using
|
||||
Boost Regex With MFC Strings</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Overloaded Algorithms For MFC String Types</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="mfc_regex_create.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_strings.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mfc_iter.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo"></a><a class="link" href="mfc_algo.html" title="Overloaded Algorithms For MFC String Types">Overloaded
|
||||
Algorithms For MFC String Types</a>
|
||||
@ -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="id1115216"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match-heading"></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>
|
||||
@ -62,18 +62,18 @@
|
||||
<p>
|
||||
<span class="bold"><strong>Example:</strong></span>
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">//
|
||||
</span><span class="comment">// Extract filename part of a path from a CString and return the result
|
||||
</span><span class="comment">// as another CString:
|
||||
</span><span class="comment">//
|
||||
</span><span class="identifier">CString</span> <span class="identifier">get_filename</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">path</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="comment">//</span>
|
||||
<span class="comment">// Extract filename part of a path from a CString and return the result</span>
|
||||
<span class="comment">// as another CString:</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="identifier">CString</span> <span class="identifier">get_filename</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">path</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">tregex</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">__T</span><span class="special">(</span><span class="string">"(?:\\A|.*\\\\)([^\\\\]+)"</span><span class="special">));</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">tmatch</span> <span class="identifier">what</span><span class="special">;</span>
|
||||
<span class="keyword">if</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">path</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">r</span><span class="special">))</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// extract $1 as a CString:
|
||||
</span> <span class="keyword">return</span> <span class="identifier">CString</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">1</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">.</span><span class="identifier">length</span><span class="special">(</span><span class="number">1</span><span class="special">));</span>
|
||||
<span class="comment">// extract $1 as a CString:</span>
|
||||
<span class="keyword">return</span> <span class="identifier">CString</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">1</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">.</span><span class="identifier">length</span><span class="special">(</span><span class="number">1</span><span class="special">));</span>
|
||||
<span class="special">}</span>
|
||||
<span class="keyword">else</span>
|
||||
<span class="special">{</span>
|
||||
@ -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="id1116089"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_-heading"></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>
|
||||
@ -100,17 +100,17 @@
|
||||
<p>
|
||||
<span class="bold"><strong>Example:</strong></span>
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">//
|
||||
</span><span class="comment">// Find out if *password* meets our password requirements,
|
||||
</span><span class="comment">// as defined by the regular expression *requirements*.
|
||||
</span><span class="comment">//
|
||||
</span><span class="keyword">bool</span> <span class="identifier">is_valid_password</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">password</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">requirements</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="comment">//</span>
|
||||
<span class="comment">// Find out if *password* meets our password requirements,</span>
|
||||
<span class="comment">// as defined by the regular expression *requirements*.</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">is_valid_password</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">password</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">requirements</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">password</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_regex</span><span class="special">(</span><span class="identifier">requirements</span><span class="special">));</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search"></a><h5>
|
||||
<a name="id1116520"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search-heading"></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>
|
||||
@ -133,14 +133,14 @@
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">CString</span> <span class="identifier">extract_postcode</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">address</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// searches throw address for a UK postcode and returns the result,
|
||||
</span> <span class="comment">// the expression used is by Phil A. on www.regxlib.com:
|
||||
</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">tregex</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">__T</span><span class="special">(</span><span class="string">"^(([A-Z]{1,2}[0-9]{1,2})|([A-Z]{1,2}[0-9][A-Z]))\\s?([0-9][A-Z]{2})$"</span><span class="special">));</span>
|
||||
<span class="comment">// searches throw address for a UK postcode and returns the result,</span>
|
||||
<span class="comment">// the expression used is by Phil A. on www.regxlib.com:</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">tregex</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">__T</span><span class="special">(</span><span class="string">"^(([A-Z]{1,2}[0-9]{1,2})|([A-Z]{1,2}[0-9][A-Z]))\\s?([0-9][A-Z]{2})$"</span><span class="special">));</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">tmatch</span> <span class="identifier">what</span><span class="special">;</span>
|
||||
<span class="keyword">if</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">address</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">r</span><span class="special">))</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// extract $0 as a CString:
|
||||
</span> <span class="keyword">return</span> <span class="identifier">CString</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">.</span><span class="identifier">length</span><span class="special">());</span>
|
||||
<span class="comment">// extract $0 as a CString:</span>
|
||||
<span class="keyword">return</span> <span class="identifier">CString</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">.</span><span class="identifier">length</span><span class="special">());</span>
|
||||
<span class="special">}</span>
|
||||
<span class="keyword">else</span>
|
||||
<span class="special">{</span>
|
||||
@ -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="id1117055"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_-heading"></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="id1117345"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace-heading"></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>
|
||||
@ -198,12 +198,12 @@
|
||||
<p>
|
||||
<span class="bold"><strong>Example</strong></span>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">//
|
||||
</span><span class="comment">// Take a credit card number as a string of digits,
|
||||
</span><span class="comment">// and reformat it as a human readable string with "-"
|
||||
</span><span class="comment">// separating each group of four digits:
|
||||
</span><span class="comment">//
|
||||
</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">tregex</span> <span class="identifier">e</span><span class="special">(</span><span class="identifier">__T</span><span class="special">(</span><span class="string">"\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z"</span><span class="special">));</span>
|
||||
<pre class="programlisting"><span class="comment">//</span>
|
||||
<span class="comment">// Take a credit card number as a string of digits, </span>
|
||||
<span class="comment">// and reformat it as a human readable string with "-"</span>
|
||||
<span class="comment">// separating each group of four digits:</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">tregex</span> <span class="identifier">e</span><span class="special">(</span><span class="identifier">__T</span><span class="special">(</span><span class="string">"\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z"</span><span class="special">));</span>
|
||||
<span class="keyword">const</span> <span class="identifier">CString</span> <span class="identifier">human_format</span> <span class="special">=</span> <span class="identifier">__T</span><span class="special">(</span><span class="string">"$1-$2-$3-$4"</span><span class="special">);</span>
|
||||
|
||||
<span class="identifier">CString</span> <span class="identifier">human_readable_card_number</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">s</span><span class="special">)</span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Introduction to Boost.Regex and MFC Strings</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../mfc_strings.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_strings.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mfc_regex_types.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_intro"></a><a class="link" href="mfc_intro.html" title="Introduction to Boost.Regex and MFC Strings">Introduction
|
||||
to Boost.Regex and MFC Strings</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Iterating Over the Matches Within An MFC String</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="mfc_algo.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_strings.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../posix.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter"></a><a class="link" href="mfc_iter.html" title="Iterating Over the Matches Within An MFC String">Iterating
|
||||
Over the Matches Within An MFC String</a>
|
||||
@ -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="id1120437"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper-heading"></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>
|
||||
@ -53,9 +53,9 @@
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">enumerate_links</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">html</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// enumerate and print all the links in some HTML text,
|
||||
</span> <span class="comment">// the expression used is by Andew Lee on www.regxlib.com:
|
||||
</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">tregex</span> <span class="identifier">r</span><span class="special">(</span>
|
||||
<span class="comment">// enumerate and print all the links in some HTML text,</span>
|
||||
<span class="comment">// the expression used is by Andew Lee on www.regxlib.com:</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">tregex</span> <span class="identifier">r</span><span class="special">(</span>
|
||||
<span class="identifier">__T</span><span class="special">(</span><span class="string">"href=[\"\']((http:\\/\\/|\\.\\/|\\/)?\\w+"</span>
|
||||
<span class="string">"(\\.\\w+)*(\\/\\w+(\\.\\w+)?)*"</span>
|
||||
<span class="string">"(\\/|\\?\\w*=\\w*(&\\w*=\\w*)*)?)[\"\']"</span><span class="special">));</span>
|
||||
@ -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="id1120986"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers-heading"></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>
|
||||
@ -119,9 +119,9 @@
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">enumerate_links2</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">html</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// enumerate and print all the links in some HTML text,
|
||||
</span> <span class="comment">// the expression used is by Andew Lee on www.regxlib.com:
|
||||
</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">tregex</span> <span class="identifier">r</span><span class="special">(</span>
|
||||
<span class="comment">// enumerate and print all the links in some HTML text,</span>
|
||||
<span class="comment">// the expression used is by Andew Lee on www.regxlib.com:</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">tregex</span> <span class="identifier">r</span><span class="special">(</span>
|
||||
<span class="identifier">__T</span><span class="special">(</span><span class="string">"href=[\"\']((http:\\/\\/|\\.\\/|\\/)?\\w+"</span>
|
||||
<span class="string">"(\\.\\w+)*(\\/\\w+(\\.\\w+)?)*"</span>
|
||||
<span class="string">"(\\/|\\?\\w*=\\w*(&\\w*=\\w*)*)?)[\"\']"</span><span class="special">));</span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Regular Expression Creation From an MFC String</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="mfc_regex_types.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_strings.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mfc_algo.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_regex_create"></a><a class="link" href="mfc_regex_create.html" title="Regular Expression Creation From an MFC String">Regular
|
||||
Expression Creation From an MFC String</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Regex Types Used With MFC Strings</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="mfc_intro.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_strings.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mfc_regex_create.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_regex_types"></a><a class="link" href="mfc_regex_types.html" title="Regex Types Used With MFC Strings">Regex
|
||||
Types Used With MFC Strings</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>POSIX Compatible C API's</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="non_std_strings/mfc_strings/mfc_iter.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concepts.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.posix"></a><a class="link" href="posix.html" title="POSIX Compatible C API's">POSIX Compatible C API's</a>
|
||||
</h3></div></div></div>
|
||||
@ -163,7 +163,7 @@
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="regcomp"></a><a name="boost_regex.ref.posix.regcomp"></a><h5>
|
||||
<a name="id1123124"></a>
|
||||
<a name="boost_regex.ref.posix.regcomp-heading"></a>
|
||||
<a class="link" href="posix.html#boost_regex.ref.posix.regcomp">regcomp</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -375,7 +375,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="regerror"></a><a name="boost_regex.ref.posix.regerror"></a><h5>
|
||||
<a name="id1123643"></a>
|
||||
<a name="boost_regex.ref.posix.regerror-heading"></a>
|
||||
<a class="link" href="posix.html#boost_regex.ref.posix.regerror">regerror</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -461,7 +461,7 @@
|
||||
buffer.
|
||||
</p>
|
||||
<a name="regexec"></a><a name="boost_regex.ref.posix.regexec"></a><h5>
|
||||
<a name="id1123775"></a>
|
||||
<a name="boost_regex.ref.posix.regexec-heading"></a>
|
||||
<a class="link" href="posix.html#boost_regex.ref.posix.regexec">regexec</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -529,7 +529,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="regfree"></a><a name="boost_regex.ref.posix.regfree"></a><h5>
|
||||
<a name="id1123888"></a>
|
||||
<a name="boost_regex.ref.posix.regfree-heading"></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=US-ASCII">
|
||||
<title>regex_iterator</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="regex_replace.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="regex_token_iterator.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.regex_iterator"></a><a class="link" href="regex_iterator.html" title="regex_iterator">regex_iterator</a>
|
||||
</h3></div></div></div>
|
||||
@ -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="id1082738"></a>
|
||||
<a name="boost_regex.ref.regex_iterator.description-heading"></a>
|
||||
<a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -415,7 +415,7 @@
|
||||
<span class="emphasis"><em>m</em></span>.
|
||||
</p>
|
||||
<a name="boost_regex.ref.regex_iterator.examples"></a><h5>
|
||||
<a name="id1085143"></a>
|
||||
<a name="boost_regex.ref.regex_iterator.examples-heading"></a>
|
||||
<a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -430,34 +430,34 @@
|
||||
|
||||
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">std</span><span class="special">;</span>
|
||||
|
||||
<span class="comment">// purpose:
|
||||
</span><span class="comment">// takes the contents of a file in the form of a string
|
||||
</span><span class="comment">// and searches for all the C++ class definitions, storing
|
||||
</span><span class="comment">// their locations in a map of strings/int's
|
||||
</span>
|
||||
<span class="comment">// purpose:</span>
|
||||
<span class="comment">// takes the contents of a file in the form of a string</span>
|
||||
<span class="comment">// and searches for all the C++ class definitions, storing</span>
|
||||
<span class="comment">// their locations in a map of strings/int's</span>
|
||||
|
||||
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">::</span><span class="identifier">difference_type</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="special">></span> <span class="identifier">map_type</span><span class="special">;</span>
|
||||
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">re</span> <span class="special">=</span>
|
||||
<span class="comment">// possibly leading whitespace:
|
||||
</span> <span class="string">"^[[:space:]]*"</span>
|
||||
<span class="comment">// possible template declaration:
|
||||
</span> <span class="string">"(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"</span>
|
||||
<span class="comment">// class or struct:
|
||||
</span> <span class="string">"(class|struct)[[:space:]]*"</span>
|
||||
<span class="comment">// leading declspec macros etc:
|
||||
</span> <span class="string">"("</span>
|
||||
<span class="comment">// possibly leading whitespace: </span>
|
||||
<span class="string">"^[[:space:]]*"</span>
|
||||
<span class="comment">// possible template declaration:</span>
|
||||
<span class="string">"(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"</span>
|
||||
<span class="comment">// class or struct:</span>
|
||||
<span class="string">"(class|struct)[[:space:]]*"</span>
|
||||
<span class="comment">// leading declspec macros etc:</span>
|
||||
<span class="string">"("</span>
|
||||
<span class="string">"\\<\\w+\\>"</span>
|
||||
<span class="string">"("</span>
|
||||
<span class="string">"[[:blank:]]*\\([^)]*\\)"</span>
|
||||
<span class="string">")?"</span>
|
||||
<span class="string">"[[:space:]]*"</span>
|
||||
<span class="string">")*"</span>
|
||||
<span class="comment">// the class name
|
||||
</span> <span class="string">"(\\<\\w*\\>)[[:space:]]*"</span>
|
||||
<span class="comment">// template specialisation parameters
|
||||
</span> <span class="string">"(<[^;:{]+>)?[[:space:]]*"</span>
|
||||
<span class="comment">// terminate in { or :
|
||||
</span> <span class="string">"(\\{|:[^;\\{()]*\\{)"</span><span class="special">;</span>
|
||||
<span class="comment">// the class name</span>
|
||||
<span class="string">"(\\<\\w*\\>)[[:space:]]*"</span>
|
||||
<span class="comment">// template specialisation parameters</span>
|
||||
<span class="string">"(<[^;:{]+>)?[[:space:]]*"</span>
|
||||
<span class="comment">// terminate in { or :</span>
|
||||
<span class="string">"(\\{|:[^;\\{()]*\\{)"</span><span class="special">;</span>
|
||||
|
||||
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">expression</span><span class="special">(</span><span class="identifier">re</span><span class="special">);</span>
|
||||
@ -465,11 +465,11 @@
|
||||
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_callback</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">::</span><span class="identifier">const_iterator</span><span class="special">>&</span> <span class="identifier">what</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// what[0] contains the whole string
|
||||
</span> <span class="comment">// what[5] contains the class name.
|
||||
</span> <span class="comment">// what[6] contains the template specialisation if any.
|
||||
</span> <span class="comment">// add class name and position to map:
|
||||
</span> <span class="identifier">class_index</span><span class="special">[</span><span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">str</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">str</span><span class="special">()]</span> <span class="special">=</span> <span class="identifier">what</span><span class="special">.</span><span class="identifier">position</span><span class="special">(</span><span class="number">5</span><span class="special">);</span>
|
||||
<span class="comment">// what[0] contains the whole string</span>
|
||||
<span class="comment">// what[5] contains the class name.</span>
|
||||
<span class="comment">// what[6] contains the template specialisation if any.</span>
|
||||
<span class="comment">// add class name and position to map:</span>
|
||||
<span class="identifier">class_index</span><span class="special">[</span><span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">str</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">str</span><span class="special">()]</span> <span class="special">=</span> <span class="identifier">what</span><span class="special">.</span><span class="identifier">position</span><span class="special">(</span><span class="number">5</span><span class="special">);</span>
|
||||
<span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
|
||||
@ -494,12 +494,12 @@
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Processing file "</span> <span class="special"><<</span> <span class="identifier">argv</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">ifstream</span> <span class="identifier">fs</span><span class="special">(</span><span class="identifier">argv</span><span class="special">[</span><span class="identifier">i</span><span class="special">]);</span>
|
||||
<span class="identifier">load_file</span><span class="special">(</span><span class="identifier">text</span><span class="special">,</span> <span class="identifier">fs</span><span class="special">);</span>
|
||||
<span class="comment">// construct our iterators:
|
||||
</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">sregex_iterator</span> <span class="identifier">m1</span><span class="special">(</span><span class="identifier">text</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">text</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">expression</span><span class="special">);</span>
|
||||
<span class="comment">// construct our iterators:</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">sregex_iterator</span> <span class="identifier">m1</span><span class="special">(</span><span class="identifier">text</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">text</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">expression</span><span class="special">);</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">sregex_iterator</span> <span class="identifier">m2</span><span class="special">;</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">m1</span><span class="special">,</span> <span class="identifier">m2</span><span class="special">,</span> <span class="special">&</span><span class="identifier">regex_callback</span><span class="special">);</span>
|
||||
<span class="comment">// copy results:
|
||||
</span> <span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">class_index</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" matches found"</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="comment">// copy results:</span>
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">class_index</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" matches found"</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="identifier">map_type</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">;</span>
|
||||
<span class="identifier">c</span> <span class="special">=</span> <span class="identifier">class_index</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
|
||||
<span class="identifier">d</span> <span class="special">=</span> <span class="identifier">class_index</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>regex_match</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="sub_match.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="regex_search.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.regex_match"></a><a class="link" href="regex_match.html" title="regex_match">regex_match</a>
|
||||
</h3></div></div></div>
|
||||
@ -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="id1064156"></a>
|
||||
<a name="boost_regex.ref.regex_match.description-heading"></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>
|
||||
@ -361,7 +361,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="id1067092"></a>
|
||||
<a name="boost_regex.ref.regex_match.examples-heading"></a>
|
||||
<a class="link" href="regex_match.html#boost_regex.ref.regex_match.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -376,24 +376,24 @@
|
||||
|
||||
<span class="identifier">regex</span> <span class="identifier">expression</span><span class="special">(</span><span class="string">"([0-9]+)(\\-| |$)(.*)"</span><span class="special">);</span>
|
||||
|
||||
<span class="comment">// process_ftp:
|
||||
</span><span class="comment">// on success returns the ftp response code, and fills
|
||||
</span><span class="comment">// msg with the ftp response message.
|
||||
</span><span class="keyword">int</span> <span class="identifier">process_ftp</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">response</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">*</span> <span class="identifier">msg</span><span class="special">)</span>
|
||||
<span class="comment">// process_ftp: </span>
|
||||
<span class="comment">// on success returns the ftp response code, and fills </span>
|
||||
<span class="comment">// msg with the ftp response message. </span>
|
||||
<span class="keyword">int</span> <span class="identifier">process_ftp</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">response</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">*</span> <span class="identifier">msg</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">cmatch</span> <span class="identifier">what</span><span class="special">;</span>
|
||||
<span class="keyword">if</span><span class="special">(</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">response</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">expression</span><span class="special">))</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// what[0] contains the whole string
|
||||
</span> <span class="comment">// what[1] contains the response code
|
||||
</span> <span class="comment">// what[2] contains the separator character
|
||||
</span> <span class="comment">// what[3] contains the text message.
|
||||
</span> <span class="keyword">if</span><span class="special">(</span><span class="identifier">msg</span><span class="special">)</span>
|
||||
<span class="comment">// what[0] contains the whole string </span>
|
||||
<span class="comment">// what[1] contains the response code </span>
|
||||
<span class="comment">// what[2] contains the separator character </span>
|
||||
<span class="comment">// what[3] contains the text message. </span>
|
||||
<span class="keyword">if</span><span class="special">(</span><span class="identifier">msg</span><span class="special">)</span>
|
||||
<span class="identifier">msg</span><span class="special">-></span><span class="identifier">assign</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">3</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">3</span><span class="special">].</span><span class="identifier">second</span><span class="special">);</span>
|
||||
<span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">atoi</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">1</span><span class="special">].</span><span class="identifier">first</span><span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
<span class="comment">// failure did not match
|
||||
</span> <span class="keyword">if</span><span class="special">(</span><span class="identifier">msg</span><span class="special">)</span>
|
||||
<span class="comment">// failure did not match </span>
|
||||
<span class="keyword">if</span><span class="special">(</span><span class="identifier">msg</span><span class="special">)</span>
|
||||
<span class="identifier">msg</span><span class="special">-></span><span class="identifier">erase</span><span class="special">();</span>
|
||||
<span class="keyword">return</span> <span class="special">-</span><span class="number">1</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>regex_replace</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="regex_search.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="regex_iterator.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.regex_replace"></a><a class="link" href="regex_replace.html" title="regex_replace">regex_replace</a>
|
||||
</h3></div></div></div>
|
||||
@ -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="id1076276"></a>
|
||||
<a name="boost_regex.ref.regex_replace.description-heading"></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">Formatter</span><span class="special">></span>
|
||||
@ -199,7 +199,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="id1077720"></a>
|
||||
<a name="boost_regex.ref.regex_replace.examples-heading"></a>
|
||||
<a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -214,10 +214,10 @@
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">fstream</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
<span class="comment">// purpose:
|
||||
</span><span class="comment">// takes the contents of a file and transform to
|
||||
</span><span class="comment">// syntax highlighted code in html format
|
||||
</span>
|
||||
<span class="comment">// purpose:</span>
|
||||
<span class="comment">// takes the contents of a file and transform to</span>
|
||||
<span class="comment">// syntax highlighted code in html format</span>
|
||||
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e1</span><span class="special">,</span> <span class="identifier">e2</span><span class="special">;</span>
|
||||
<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">expression_text</span><span class="special">;</span>
|
||||
<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">format_string</span><span class="special">;</span>
|
||||
@ -253,15 +253,15 @@
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">out_name</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">argv</span><span class="special">[</span><span class="identifier">i</span><span class="special">])</span> <span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">".htm"</span><span class="special">));</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">ofstream</span> <span class="identifier">os</span><span class="special">(</span><span class="identifier">out_name</span><span class="special">.</span><span class="identifier">c_str</span><span class="special">());</span>
|
||||
<span class="identifier">os</span> <span class="special"><<</span> <span class="identifier">header_text</span><span class="special">;</span>
|
||||
<span class="comment">// strip '<' and '>' first by outputting to a
|
||||
</span> <span class="comment">// temporary string stream
|
||||
</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostringstream</span> <span class="identifier">t</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ios</span><span class="special">::</span><span class="identifier">out</span> <span class="special">|</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios</span><span class="special">::</span><span class="identifier">binary</span><span class="special">);</span>
|
||||
<span class="comment">// strip '<' and '>' first by outputting to a</span>
|
||||
<span class="comment">// temporary string stream</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">ostringstream</span> <span class="identifier">t</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ios</span><span class="special">::</span><span class="identifier">out</span> <span class="special">|</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ios</span><span class="special">::</span><span class="identifier">binary</span><span class="special">);</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special"><</span><span class="keyword">char</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="identifier">oi</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">oi</span><span class="special">,</span> <span class="identifier">in</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">in</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span>
|
||||
<span class="identifier">e2</span><span class="special">,</span> <span class="identifier">pre_format</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_default</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">format_all</span><span class="special">);</span>
|
||||
<span class="comment">// then output to final output stream
|
||||
</span> <span class="comment">// adding syntax highlighting:
|
||||
</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">(</span><span class="identifier">t</span><span class="special">.</span><span class="identifier">str</span><span class="special">());</span>
|
||||
<span class="comment">// then output to final output stream</span>
|
||||
<span class="comment">// adding syntax highlighting:</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">(</span><span class="identifier">t</span><span class="special">.</span><span class="identifier">str</span><span class="special">());</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special"><</span><span class="keyword">char</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="identifier">out</span><span class="special">(</span><span class="identifier">os</span><span class="special">);</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">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">e1</span><span class="special">,</span> <span class="identifier">format_string</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_default</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">format_all</span><span class="special">);</span>
|
||||
@ -278,17 +278,17 @@
|
||||
|
||||
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">expression_text</span> <span class="special">=</span>
|
||||
<span class="comment">// preprocessor directives: index 1
|
||||
</span> <span class="string">"(^[[:blank:]]*#(?:[^\\\\\\n]|\\\\[^\\n[:punct:][:word:]]*[\\n[:punct:][:word:]])*)|"</span>
|
||||
<span class="comment">// comment: index 2
|
||||
</span> <span class="string">"(//[^\\n]*|/\\*.*?\\*/)|"</span>
|
||||
<span class="comment">// literals: index 3
|
||||
</span> <span class="string">"\\<([+-]?(?:(?:0x[[:xdigit:]]+)|(?:(?:[[:digit:]]*\\.)?[[:digit:]]+"</span>
|
||||
<span class="comment">// preprocessor directives: index 1</span>
|
||||
<span class="string">"(^[[:blank:]]*#(?:[^\\\\\\n]|\\\\[^\\n[:punct:][:word:]]*[\\n[:punct:][:word:]])*)|"</span>
|
||||
<span class="comment">// comment: index 2</span>
|
||||
<span class="string">"(//[^\\n]*|/\\*.*?\\*/)|"</span>
|
||||
<span class="comment">// literals: index 3</span>
|
||||
<span class="string">"\\<([+-]?(?:(?:0x[[:xdigit:]]+)|(?:(?:[[:digit:]]*\\.)?[[:digit:]]+"</span>
|
||||
<span class="string">"(?:[eE][+-]?[[:digit:]]+)?))u?(?:(?:int(?:8|16|32|64))|L)?)\\>|"</span>
|
||||
<span class="comment">// string literals: index 4
|
||||
</span> <span class="string">"('(?:[^\\\\']|\\\\.)*'|\"(?:[^\\\\\"]|\\\\.)*\")|"</span>
|
||||
<span class="comment">// keywords: index 5
|
||||
</span> <span class="string">"\\<(__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import"</span>
|
||||
<span class="comment">// string literals: index 4</span>
|
||||
<span class="string">"('(?:[^\\\\']|\\\\.)*'|\"(?:[^\\\\\"]|\\\\.)*\")|"</span>
|
||||
<span class="comment">// keywords: index 5</span>
|
||||
<span class="string">"\\<(__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import"</span>
|
||||
<span class="string">"|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall"</span>
|
||||
<span class="string">"|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|bool"</span>
|
||||
<span class="string">"|break|case|catch|cdecl|char|class|const|const_cast|continue|default|delete"</span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>regex_search</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="regex_match.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="regex_replace.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.regex_search"></a><a class="link" href="regex_search.html" title="regex_search">regex_search</a>
|
||||
</h3></div></div></div>
|
||||
@ -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="id1069808"></a>
|
||||
<a name="boost_regex.ref.regex_search.description-heading"></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>
|
||||
@ -357,7 +357,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="id1073352"></a>
|
||||
<a name="boost_regex.ref.regex_search.examples-heading"></a>
|
||||
<a class="link" href="regex_search.html#boost_regex.ref.regex_search.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -371,11 +371,11 @@
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">map</span><span class="special">></span>
|
||||
<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>
|
||||
|
||||
<span class="comment">// purpose:
|
||||
</span><span class="comment">// takes the contents of a file in the form of a string
|
||||
</span><span class="comment">// and searches for all the C++ class definitions, storing
|
||||
</span><span class="comment">// their locations in a map of strings/int's
|
||||
</span><span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="special">></span> <span class="identifier">map_type</span><span class="special">;</span>
|
||||
<span class="comment">// purpose: </span>
|
||||
<span class="comment">// takes the contents of a file in the form of a string </span>
|
||||
<span class="comment">// and searches for all the C++ class definitions, storing </span>
|
||||
<span class="comment">// their locations in a map of strings/int's </span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="special">></span> <span class="identifier">map_type</span><span class="special">;</span>
|
||||
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">expression</span><span class="special">(</span>
|
||||
<span class="string">"^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"</span>
|
||||
@ -393,17 +393,17 @@
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">;</span>
|
||||
<span class="keyword">while</span><span class="special">(</span><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">start</span><span class="special">,</span> <span class="identifier">end</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">expression</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">))</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// what[0] contains the whole string
|
||||
</span> <span class="comment">// what[5] contains the class name.
|
||||
</span> <span class="comment">// what[6] contains the template specialisation if any.
|
||||
</span> <span class="comment">// add class name and position to map:
|
||||
</span> <span class="identifier">m</span><span class="special">[</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">second</span><span class="special">)</span>
|
||||
<span class="comment">// what[0] contains the whole string </span>
|
||||
<span class="comment">// what[5] contains the class name. </span>
|
||||
<span class="comment">// what[6] contains the template specialisation if any. </span>
|
||||
<span class="comment">// add class name and position to map: </span>
|
||||
<span class="identifier">m</span><span class="special">[</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">second</span><span class="special">)</span>
|
||||
<span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">what</span><span class="special">[</span><span class="number">6</span><span class="special">].</span><span class="identifier">second</span><span class="special">)]</span>
|
||||
<span class="special">=</span> <span class="identifier">what</span><span class="special">[</span><span class="number">5</span><span class="special">].</span><span class="identifier">first</span> <span class="special">-</span> <span class="identifier">file</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
|
||||
<span class="comment">// update search position:
|
||||
</span> <span class="identifier">start</span> <span class="special">=</span> <span class="identifier">what</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span><span class="special">;</span>
|
||||
<span class="comment">// update flags:
|
||||
</span> <span class="identifier">flags</span> <span class="special">|=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_prev_avail</span><span class="special">;</span>
|
||||
<span class="comment">// update search position: </span>
|
||||
<span class="identifier">start</span> <span class="special">=</span> <span class="identifier">what</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span><span class="special">;</span>
|
||||
<span class="comment">// update flags: </span>
|
||||
<span class="identifier">flags</span> <span class="special">|=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_prev_avail</span><span class="special">;</span>
|
||||
<span class="identifier">flags</span> <span class="special">|=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_not_bob</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
<span class="special">}</span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>regex_token_iterator</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="regex_iterator.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="bad_expression.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.regex_token_iterator"></a><a class="link" href="regex_token_iterator.html" title="regex_token_iterator">regex_token_iterator</a>
|
||||
</h3></div></div></div>
|
||||
@ -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="id1091586"></a>
|
||||
<a name="boost_regex.ref.regex_token_iterator.description-heading"></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><pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">();</span>
|
||||
@ -357,7 +357,7 @@
|
||||
<span class="emphasis"><em>m</em></span>.
|
||||
</p>
|
||||
<a name="boost_regex.ref.regex_token_iterator.examples"></a><h5>
|
||||
<a name="id1094793"></a>
|
||||
<a name="boost_regex.ref.regex_token_iterator.examples-heading"></a>
|
||||
<a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -412,16 +412,16 @@
|
||||
<span class="keyword">void</span> <span class="identifier">load_file</span><span class="special">(</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">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&</span> <span class="identifier">is</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">s</span><span class="special">.</span><span class="identifier">erase</span><span class="special">();</span>
|
||||
<span class="comment">//
|
||||
</span> <span class="comment">// attempt to grow string buffer to match file size,
|
||||
</span> <span class="comment">// this doesn't always work...
|
||||
</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">reserve</span><span class="special">(</span><span class="identifier">is</span><span class="special">.</span><span class="identifier">rdbuf</span><span class="special">()-></span><span class="identifier">in_avail</span><span class="special">());</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// attempt to grow string buffer to match file size,</span>
|
||||
<span class="comment">// this doesn't always work...</span>
|
||||
<span class="identifier">s</span><span class="special">.</span><span class="identifier">reserve</span><span class="special">(</span><span class="identifier">is</span><span class="special">.</span><span class="identifier">rdbuf</span><span class="special">()-></span><span class="identifier">in_avail</span><span class="special">());</span>
|
||||
<span class="keyword">char</span> <span class="identifier">c</span><span class="special">;</span>
|
||||
<span class="keyword">while</span><span class="special">(</span><span class="identifier">is</span><span class="special">.</span><span class="identifier">get</span><span class="special">(</span><span class="identifier">c</span><span class="special">))</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// use logarithmic growth stategy, in case
|
||||
</span> <span class="comment">// in_avail (above) returned zero:
|
||||
</span> <span class="keyword">if</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">capacity</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">size</span><span class="special">())</span>
|
||||
<span class="comment">// use logarithmic growth stategy, in case</span>
|
||||
<span class="comment">// in_avail (above) returned zero:</span>
|
||||
<span class="keyword">if</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">capacity</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">size</span><span class="special">())</span>
|
||||
<span class="identifier">s</span><span class="special">.</span><span class="identifier">reserve</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">capacity</span><span class="special">()</span> <span class="special">*</span> <span class="number">3</span><span class="special">);</span>
|
||||
<span class="identifier">s</span><span class="special">.</span><span class="identifier">append</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="identifier">c</span><span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
@ -444,12 +444,12 @@
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="special">*</span><span class="identifier">i</span><span class="special">++</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
<span class="special">}</span>
|
||||
<span class="comment">//
|
||||
</span> <span class="comment">// alternative method:
|
||||
</span> <span class="comment">// test the array-literal constructor, and split out the whole
|
||||
</span> <span class="comment">// match as well as $1....
|
||||
</span> <span class="comment">//
|
||||
</span> <span class="keyword">for</span><span class="special">(</span><span class="identifier">i</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span> <span class="identifier">i</span> <span class="special"><</span> <span class="identifier">argc</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// alternative method:</span>
|
||||
<span class="comment">// test the array-literal constructor, and split out the whole</span>
|
||||
<span class="comment">// match as well as $1....</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="keyword">for</span><span class="special">(</span><span class="identifier">i</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span> <span class="identifier">i</span> <span class="special"><</span> <span class="identifier">argc</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Findings URL's in "</span> <span class="special"><<</span> <span class="identifier">argv</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special"><<</span> <span class="string">":"</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="identifier">s</span><span class="special">.</span><span class="identifier">erase</span><span class="special">();</span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>regex_traits</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="error_type.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="non_std_strings.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.regex_traits"></a><a class="link" href="regex_traits.html" title="regex_traits">regex_traits</a>
|
||||
</h3></div></div></div>
|
||||
@ -43,10 +43,10 @@
|
||||
<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">w32_regex_traits</span><span class="special">;</span>
|
||||
|
||||
<span class="special">}</span> <span class="comment">// namespace boost
|
||||
</span></pre>
|
||||
<span class="special">}</span> <span class="comment">// namespace boost</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.regex_traits.description"></a><h5>
|
||||
<a name="id1105987"></a>
|
||||
<a name="boost_regex.ref.regex_traits.description-heading"></a>
|
||||
<a class="link" href="regex_traits.html#boost_regex.ref.regex_traits.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -54,19 +54,19 @@
|
||||
just a thin wrapper around an actual implemention class, which may be one
|
||||
of:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
<code class="computeroutput"><span class="identifier">c_regex_traits</span></code>: this
|
||||
class is deprecated, it wraps the C locale, and is used as the default
|
||||
implementation when the platform is not Win32, and the C++ locale is
|
||||
not available.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<code class="computeroutput"><span class="identifier">cpp_regex_traits</span></code>: the
|
||||
default traits class for non-Win32 platforms, allows the regex class
|
||||
to be imbued with a std::locale instance.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<code class="computeroutput"><span class="identifier">w32_regex_traits</span></code>: the
|
||||
default traits class implementation on Win32 platforms, allows the regex
|
||||
class to be imbued with an LCID.
|
||||
@ -76,12 +76,12 @@
|
||||
The default behavior can be altered by defining one of the following configuration
|
||||
macros in <a href="../../../../../../boost/regex/user.hpp" target="_top">boost/regex/user.hpp</a>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
BOOST_REGEX_USE_C_LOCALE: makes <code class="computeroutput"><span class="identifier">c_regex_traits</span></code>
|
||||
the default.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
BOOST_REGEX_USE_CPP_LOCALE: makes <code class="computeroutput"><span class="identifier">cpp_regex_traits</span></code>
|
||||
the default.
|
||||
</li>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>sub_match</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="match_results.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="regex_match.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.sub_match"></a><a class="link" href="sub_match.html" title="sub_match">sub_match</a>
|
||||
</h3></div></div></div>
|
||||
@ -113,10 +113,10 @@
|
||||
<span class="keyword">const</span> <span class="identifier">capture_sequence_type</span><span class="special">&</span> <a class="link" href="sub_match.html#boost_regex.sub_match.captures">captures</a><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<span class="preprocessor">#endif</span>
|
||||
<span class="special">};</span>
|
||||
<span class="comment">//
|
||||
</span><span class="comment">// comparisons to another sub_match:
|
||||
</span><span class="comment">//
|
||||
</span><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="comment">//</span>
|
||||
<span class="comment">// comparisons to another sub_match:</span>
|
||||
<span class="comment">//</span>
|
||||
<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">bool</span> <a class="link" href="sub_match.html#boost_regex.sub_match.op_compare1">operator ==</a> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">></span>
|
||||
@ -136,10 +136,10 @@
|
||||
<span class="keyword">const</span> <span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
|
||||
|
||||
|
||||
<span class="comment">//
|
||||
</span><span class="comment">// comparisons to a basic_string:
|
||||
</span><span class="comment">//
|
||||
</span><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">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// comparisons to a basic_string:</span>
|
||||
<span class="comment">//</span>
|
||||
<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">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <a class="link" href="sub_match.html#boost_regex.sub_match.op_compare7">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">iterator_traits</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>::</span><span class="identifier">value_type</span><span class="special">,</span>
|
||||
<span class="identifier">traits</span><span class="special">,</span>
|
||||
<span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
|
||||
@ -201,10 +201,10 @@
|
||||
<span class="identifier">traits</span><span class="special">,</span>
|
||||
<span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
|
||||
|
||||
<span class="comment">//
|
||||
</span><span class="comment">// comparisons to a pointer to a character array:
|
||||
</span><span class="comment">//
|
||||
</span><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="comment">//</span>
|
||||
<span class="comment">// comparisons to a pointer to a character array:</span>
|
||||
<span class="comment">//</span>
|
||||
<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">bool</span> <a class="link" href="sub_match.html#boost_regex.sub_match.op_compare19">operator == </a><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">iterator_traits</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>::</span><span class="identifier">value_type</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">lhs</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">></span>
|
||||
@ -242,10 +242,10 @@
|
||||
<span class="keyword">bool</span> <a class="link" href="sub_match.html#boost_regex.sub_match.op_compare30">operator <= </a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
|
||||
<span class="keyword">typename</span> <span class="identifier">iterator_traits</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>::</span><span class="identifier">value_type</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">rhs</span><span class="special">);</span>
|
||||
|
||||
<span class="comment">//
|
||||
</span><span class="comment">// comparisons to a single character:
|
||||
</span><span class="comment">//
|
||||
</span><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="comment">//</span>
|
||||
<span class="comment">// comparisons to a single character:</span>
|
||||
<span class="comment">//</span>
|
||||
<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">bool</span> <a class="link" href="sub_match.html#boost_regex.sub_match.op_compare31">operator == </a><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">iterator_traits</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>::</span><span class="identifier">value_type</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">lhs</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">></span>
|
||||
@ -282,10 +282,10 @@
|
||||
<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">bool</span> <a class="link" href="sub_match.html#boost_regex.sub_match.op_compare42">operator <= </a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span>
|
||||
<span class="keyword">typename</span> <span class="identifier">iterator_traits</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>::</span><span class="identifier">value_type</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
|
||||
<span class="comment">//
|
||||
</span><span class="comment">// addition operators:
|
||||
</span><span class="comment">//
|
||||
</span><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">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<span class="comment">// </span>
|
||||
<span class="comment">// addition operators: </span>
|
||||
<span class="comment">//</span>
|
||||
<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">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">iterator_traits</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>::</span><span class="identifier">value_type</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<a class="link" href="sub_match.html#boost_regex.sub_match.op_add1">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="keyword">typename</span> <span class="identifier">iterator_traits</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>::</span><span class="identifier">value_type</span><span class="special">,</span>
|
||||
<span class="identifier">traits</span><span class="special">,</span>
|
||||
@ -318,22 +318,22 @@
|
||||
<a class="link" href="sub_match.html#boost_regex.sub_match.op_add7">operator + </a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>&</span> <span class="identifier">m1</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>&</span> <span class="identifier">m2</span><span class="special">);</span>
|
||||
|
||||
<span class="comment">//
|
||||
</span><span class="comment">// stream inserter:
|
||||
</span><span class="comment">//
|
||||
</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">BidirectionalIterator</span><span class="special">></span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// stream inserter:</span>
|
||||
<span class="comment">//</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">BidirectionalIterator</span><span class="special">></span>
|
||||
<span class="identifier">basic_ostream</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span>
|
||||
<a class="link" href="sub_match.html#boost_regex.sub_match.op_stream">operator << </a><span class="special">(</span><span class="identifier">basic_ostream</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">os</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">);</span>
|
||||
|
||||
<span class="special">}</span> <span class="comment">// namespace boost
|
||||
</span></pre>
|
||||
<span class="special">}</span> <span class="comment">// namespace boost</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.sub_match.description"></a><h5>
|
||||
<a name="id1049853"></a>
|
||||
<a name="boost_regex.ref.sub_match.description-heading"></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="id1049866"></a>
|
||||
<a name="boost_regex.ref.sub_match.members-heading"></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><pre class="programlisting"><span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">iterator_traits</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">>::</span><span class="identifier">value_type</span> <span class="identifier">value_type</span><span class="special">;</span>
|
||||
@ -429,24 +429,24 @@
|
||||
<span class="bold"><strong>Rationale</strong></span>: Enabling this feature has several
|
||||
consequences:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
sub_match occupies more memory resulting in complex expressions running
|
||||
out of memory or stack space more quickly during matching.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
The matching algorithms are less efficient at handling some features
|
||||
(independent sub-expressions for example), even when match_extra is not
|
||||
used.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
The matching algorithms are much less efficient (i.e. slower), when match_extra
|
||||
is used. Mostly this is down to the extra memory allocations that have
|
||||
to take place.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.ref.sub_match.sub_match_non_member_operators"></a><h6>
|
||||
<a name="id1050927"></a>
|
||||
<a name="boost_regex.ref.sub_match.sub_match_non_member_operators-heading"></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>
|
||||
@ -883,7 +883,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="id1062761"></a>
|
||||
<a name="boost_regex.ref.sub_match.stream_inserter-heading"></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><pre class="programlisting"><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">BidirectionalIterator</span><span class="special">></span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>syntax_option_type</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="bad_expression.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="syntax_option_type/syntax_option_type_synopsis.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.syntax_option_type"></a><a class="link" href="syntax_option_type.html" title="syntax_option_type">syntax_option_type</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Options for POSIX Basic Regular Expressions</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="syntax_option_type_extended.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax_option_type.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="syntax_option_type_literal.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_basic"></a><a class="link" href="syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">Options
|
||||
for POSIX Basic Regular Expressions</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Options for POSIX Extended Regular Expressions</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="syntax_option_type_perl.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax_option_type.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="syntax_option_type_basic.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_extended"></a><a class="link" href="syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions">Options
|
||||
for POSIX Extended Regular Expressions</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Options for Literal Strings</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="syntax_option_type_basic.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax_option_type.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../match_flag_type.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_literal"></a><a class="link" href="syntax_option_type_literal.html" title="Options for Literal Strings">Options
|
||||
for Literal Strings</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Overview of syntax_option_type</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="syntax_option_type_synopsis.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax_option_type.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="syntax_option_type_perl.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_overview"></a><a class="link" href="syntax_option_type_overview.html" title="Overview of syntax_option_type">Overview
|
||||
of syntax_option_type</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Options for Perl Regular Expressions</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="syntax_option_type_overview.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax_option_type.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="syntax_option_type_extended.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_perl"></a><a class="link" href="syntax_option_type_perl.html" title="Options for Perl Regular Expressions">Options
|
||||
for Perl Regular Expressions</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>syntax_option_type Synopsis</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../syntax_option_type.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax_option_type.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="syntax_option_type_overview.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_synopsis"></a><a class="link" href="syntax_option_type_synopsis.html" title="syntax_option_type Synopsis">syntax_option_type
|
||||
Synopsis</a>
|
||||
@ -38,8 +38,8 @@
|
||||
|
||||
<span class="keyword">typedef</span> <span class="identifier">implementation</span><span class="special">-</span><span class="identifier">specific</span><span class="special">-</span><span class="identifier">bitmask</span><span class="special">-</span><span class="identifier">type</span> <span class="identifier">syntax_option_type</span><span class="special">;</span>
|
||||
|
||||
<span class="comment">// these flags are standardized:
|
||||
</span><span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">normal</span><span class="special">;</span>
|
||||
<span class="comment">// these flags are standardized:</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">normal</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">ECMAScript</span> <span class="special">=</span> <span class="identifier">normal</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">JavaScript</span> <span class="special">=</span> <span class="identifier">normal</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">JScript</span> <span class="special">=</span> <span class="identifier">normal</span><span class="special">;</span>
|
||||
@ -55,36 +55,36 @@
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">optimize</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">collate</span><span class="special">;</span>
|
||||
|
||||
<span class="comment">//
|
||||
</span><span class="comment">// The remaining options are specific to Boost.Regex:
|
||||
</span><span class="comment">//
|
||||
</span>
|
||||
<span class="comment">// Options common to both Perl and POSIX regular expressions:
|
||||
</span><span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">newline_alt</span><span class="special">;</span>
|
||||
<span class="comment">// </span>
|
||||
<span class="comment">// The remaining options are specific to Boost.Regex:</span>
|
||||
<span class="comment">//</span>
|
||||
|
||||
<span class="comment">// Options common to both Perl and POSIX regular expressions:</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">newline_alt</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">no_except</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">save_subexpression_location</span><span class="special">;</span>
|
||||
|
||||
<span class="comment">// Perl specific options:
|
||||
</span><span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">no_mod_m</span><span class="special">;</span>
|
||||
<span class="comment">// Perl specific options:</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">no_mod_m</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">no_mod_s</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">mod_s</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">mod_x</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">no_empty_expressions</span><span class="special">;</span>
|
||||
|
||||
<span class="comment">// POSIX extended specific options:
|
||||
</span><span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">no_escape_in_lists</span><span class="special">;</span>
|
||||
<span class="comment">// POSIX extended specific options:</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">no_escape_in_lists</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">no_bk_refs</span><span class="special">;</span>
|
||||
|
||||
<span class="comment">// POSIX basic specific options:
|
||||
</span><span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">no_escape_in_lists</span><span class="special">;</span>
|
||||
<span class="comment">// POSIX basic specific options:</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">no_escape_in_lists</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">no_char_classes</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">no_intervals</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">bk_plus_qm</span><span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">syntax_option_type</span> <span class="identifier">bk_vbar</span><span class="special">;</span>
|
||||
|
||||
<span class="special">}</span> <span class="comment">// namespace regex_constants
|
||||
</span><span class="special">}</span> <span class="comment">// namespace std
|
||||
</span></pre>
|
||||
<span class="special">}</span> <span class="comment">// namespace regex_constants</span>
|
||||
<span class="special">}</span> <span class="comment">// namespace std</span>
|
||||
</pre>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Regular Expression Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="partial_matches.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="syntax/perl_syntax.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.syntax"></a><a class="link" href="syntax.html" title="Regular Expression Syntax">Regular Expression Syntax</a>
|
||||
</h2></div></div></div>
|
||||
@ -61,16 +61,16 @@
|
||||
There are three main syntax options available, depending upon how you construct
|
||||
the regular expression object:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
<a class="link" href="syntax/perl_syntax.html" title="Perl Regular Expression Syntax">Perl (this is the default
|
||||
behavior)</a>.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a class="link" href="syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX extended (including
|
||||
the egrep and awk variations)</a>.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<a class="link" href="syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX Basic (including
|
||||
the grep and emacs variations)</a>.
|
||||
</li>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>POSIX Extended Regular Expression Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,13 +22,13 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="perl_syntax.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="basic_syntax.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.syntax.basic_extended"></a><a class="link" href="basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX Extended Regular
|
||||
Expression Syntax</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.syntax.basic_extended.synopsis"></a><h4>
|
||||
<a name="id1000989"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.synopsis-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.synopsis">Synopsis</a>
|
||||
</h4>
|
||||
<p>
|
||||
@ -38,13 +38,13 @@
|
||||
the flag <code class="computeroutput"><span class="identifier">extended</span></code> to the
|
||||
regex constructor, for example:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">// e1 is a case sensitive POSIX-Extended expression:
|
||||
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e1</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">extended</span><span class="special">);</span>
|
||||
<span class="comment">// e2 a case insensitive POSIX-Extended expression:
|
||||
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">extended</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="comment">// e1 is a case sensitive POSIX-Extended expression:</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e1</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">extended</span><span class="special">);</span>
|
||||
<span class="comment">// e2 a case insensitive POSIX-Extended expression:</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">extended</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span>
|
||||
</pre>
|
||||
<a name="boost_regex.posix_extended_syntax"></a><a name="boost_regex.syntax.basic_extended.posix_extended_syntax"></a><h4>
|
||||
<a name="id1001164"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.posix_extended_syntax-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.posix_extended_syntax">POSIX
|
||||
Extended Syntax</a>
|
||||
</h4>
|
||||
@ -54,25 +54,25 @@
|
||||
</p>
|
||||
<pre class="programlisting">.[{}()\*+?|^$</pre>
|
||||
<a name="boost_regex.syntax.basic_extended.wildcard_"></a><h5>
|
||||
<a name="id1001186"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.wildcard_-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.wildcard_">Wildcard:</a>
|
||||
</h5>
|
||||
<p>
|
||||
The single character '.' when used outside of a character set will match
|
||||
any single character except:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
The NULL character when the flag <code class="computeroutput"><span class="identifier">match_no_dot_null</span></code>
|
||||
is passed to the matching algorithms.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
The newline character when the flag <code class="computeroutput"><span class="identifier">match_not_dot_newline</span></code>
|
||||
is passed to the matching algorithms.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.syntax.basic_extended.anchors_"></a><h5>
|
||||
<a name="id1001238"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.anchors_-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.anchors_">Anchors:</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -84,7 +84,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="id1001260"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.marked_sub_expressions_-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.marked_sub_expressions_">Marked
|
||||
sub-expressions:</a>
|
||||
</h5>
|
||||
@ -96,7 +96,7 @@
|
||||
to by a back-reference.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_extended.repeats_"></a><h5>
|
||||
<a name="id1001294"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.repeats_-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.repeats_">Repeats:</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -182,7 +182,7 @@ cab
|
||||
operator to be applied to.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_extended.back_references_"></a><h5>
|
||||
<a name="id1001600"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.back_references_-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.back_references_">Back references:</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -212,7 +212,7 @@ cab
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="boost_regex.syntax.basic_extended.alternation"></a><h5>
|
||||
<a name="id1001664"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.alternation-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.alternation">Alternation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -225,7 +225,7 @@ cab
|
||||
will match either of "abd" or "abef".
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_extended.character_sets_"></a><h5>
|
||||
<a name="id1001731"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.character_sets_-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_sets_">Character
|
||||
sets:</a>
|
||||
</h5>
|
||||
@ -238,7 +238,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="id1001751"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.single_characters_-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.single_characters_">Single
|
||||
characters:</a>
|
||||
</h6>
|
||||
@ -247,7 +247,7 @@ cab
|
||||
or 'c'.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_extended.character_ranges_"></a><h6>
|
||||
<a name="id1001782"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.character_ranges_-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_ranges_">Character
|
||||
ranges:</a>
|
||||
</h6>
|
||||
@ -263,7 +263,7 @@ cab
|
||||
the code points of the characters only.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_extended.negation_"></a><h6>
|
||||
<a name="id1001844"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.negation_-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.negation_">Negation:</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -272,7 +272,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="id1001898"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.character_classes_-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_classes_">Character
|
||||
classes:</a>
|
||||
</h6>
|
||||
@ -282,7 +282,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="id1001949"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.collating_elements_-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.collating_elements_">Collating
|
||||
Elements:</a>
|
||||
</h6>
|
||||
@ -310,7 +310,7 @@ cab
|
||||
matches a NUL character.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_extended.equivalence_classes_"></a><h6>
|
||||
<a name="id1002051"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.equivalence_classes_-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.equivalence_classes_">Equivalence
|
||||
classes:</a>
|
||||
</h6>
|
||||
@ -327,7 +327,7 @@ cab
|
||||
or even all locales on one platform.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_extended.combinations_"></a><h6>
|
||||
<a name="id1002109"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.combinations_-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.combinations_">Combinations:</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -335,21 +335,21 @@ 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="id1002162"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.escapes-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes">Escapes</a>
|
||||
</h5>
|
||||
<p>
|
||||
The POSIX standard defines no escape sequences for POSIX-Extended regular
|
||||
expressions, except that:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
Any special character preceded by an escape shall match itself.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
The effect of any ordinary character being preceded by an escape is undefined.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
An escape inside a character class declaration shall match itself: in
|
||||
other words the escape character is not "special" inside a
|
||||
character class declaration; so <code class="computeroutput"><span class="special">[\^]</span></code>
|
||||
@ -361,7 +361,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="id1002214"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.escapes_matching_a_specific_character-heading"></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>
|
||||
@ -550,7 +550,7 @@ cab
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_"></a><h6>
|
||||
<a name="id1002522"></a>
|
||||
<a name="boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_-heading"></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>
|
||||
@ -704,7 +704,7 @@ cab
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="boost_regex.syntax.basic_extended.character_properties"></a><h6>
|
||||
<a name="id1003023"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.character_properties-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_properties">Character
|
||||
Properties</a>
|
||||
</h6>
|
||||
@ -811,7 +811,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="id1003342"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.word_boundaries-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.word_boundaries">Word Boundaries</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -886,7 +886,7 @@ cab
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="boost_regex.syntax.basic_extended.buffer_boundaries"></a><h6>
|
||||
<a name="id1003502"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.buffer_boundaries-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.buffer_boundaries">Buffer
|
||||
boundaries</a>
|
||||
</h6>
|
||||
@ -977,7 +977,7 @@ cab
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="boost_regex.syntax.basic_extended.continuation_escape"></a><h6>
|
||||
<a name="id1003694"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.continuation_escape-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.continuation_escape">Continuation
|
||||
Escape</a>
|
||||
</h6>
|
||||
@ -989,7 +989,7 @@ cab
|
||||
match to start where the last one ended.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_extended.quoting_escape"></a><h6>
|
||||
<a name="id1003722"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.quoting_escape-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.quoting_escape">Quoting
|
||||
escape</a>
|
||||
</h6>
|
||||
@ -1003,7 +1003,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="id1003802"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.unicode_escapes-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.unicode_escapes">Unicode
|
||||
escapes</a>
|
||||
</h6>
|
||||
@ -1054,7 +1054,7 @@ cab
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="boost_regex.syntax.basic_extended.any_other_escape"></a><h6>
|
||||
<a name="id1003908"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.any_other_escape-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.any_other_escape">Any other
|
||||
escape</a>
|
||||
</h6>
|
||||
@ -1063,44 +1063,44 @@ cab
|
||||
\@ matches a literal '@'.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_extended.operator_precedence"></a><h5>
|
||||
<a name="id1003925"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.operator_precedence-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.operator_precedence">Operator
|
||||
precedence</a>
|
||||
</h5>
|
||||
<p>
|
||||
The order of precedence for of operators is as follows:
|
||||
</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
<div class="orderedlist"><ol class="orderedlist" type="1">
|
||||
<li class="listitem">
|
||||
Collation-related bracket symbols <code class="computeroutput"><span class="special">[==]</span>
|
||||
<span class="special">[::]</span> <span class="special">[..]</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Escaped characters <code class="computeroutput"><span class="special">\</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Character set (bracket expression) <code class="computeroutput"><span class="special">[]</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Grouping <code class="computeroutput"><span class="special">()</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Single-character-ERE duplication <code class="computeroutput"><span class="special">*</span>
|
||||
<span class="special">+</span> <span class="special">?</span>
|
||||
<span class="special">{</span><span class="identifier">m</span><span class="special">,</span><span class="identifier">n</span><span class="special">}</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Concatenation
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Anchoring ^$
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Alternation <code class="computeroutput"><span class="special">|</span></code>
|
||||
</li>
|
||||
</ol></div>
|
||||
<a name="boost_regex.syntax.basic_extended.what_gets_matched"></a><h5>
|
||||
<a name="id1004087"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.what_gets_matched-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.what_gets_matched">What
|
||||
Gets Matched</a>
|
||||
</h5>
|
||||
@ -1110,11 +1110,11 @@ cab
|
||||
rule</a>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_extended.variations"></a><h4>
|
||||
<a name="id1004108"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.variations-heading"></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="id1004122"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.egrep-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.egrep">Egrep</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -1135,7 +1135,7 @@ cab
|
||||
used with the -E option.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_extended.awk"></a><h5>
|
||||
<a name="id1004224"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.awk-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.awk">awk</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -1149,7 +1149,7 @@ cab
|
||||
these by default anyway.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_extended.options"></a><h4>
|
||||
<a name="id1004249"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.options-heading"></a>
|
||||
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.options">Options</a>
|
||||
</h4>
|
||||
<p>
|
||||
@ -1162,7 +1162,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="id1004327"></a>
|
||||
<a name="boost_regex.syntax.basic_extended.references-heading"></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=US-ASCII">
|
||||
<title>POSIX Basic Regular Expression Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,13 +22,13 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="basic_extended.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="character_classes.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.syntax.basic_syntax"></a><a class="link" href="basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX Basic Regular
|
||||
Expression Syntax</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.syntax.basic_syntax.synopsis"></a><h4>
|
||||
<a name="id1004376"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.synopsis-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.synopsis">Synopsis</a>
|
||||
</h4>
|
||||
<p>
|
||||
@ -37,13 +37,13 @@
|
||||
the flag <code class="computeroutput"><span class="identifier">basic</span></code> to the regex
|
||||
constructor (see <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>), for example:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">// e1 is a case sensitive POSIX-Basic expression:
|
||||
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e1</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">basic</span><span class="special">);</span>
|
||||
<span class="comment">// e2 a case insensitive POSIX-Basic expression:
|
||||
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">basic</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="comment">// e1 is a case sensitive POSIX-Basic expression:</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e1</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">basic</span><span class="special">);</span>
|
||||
<span class="comment">// e2 a case insensitive POSIX-Basic expression:</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">basic</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span>
|
||||
</pre>
|
||||
<a name="boost_regex.posix_basic"></a><a name="boost_regex.syntax.basic_syntax.posix_basic_syntax"></a><h4>
|
||||
<a name="id1004568"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.posix_basic_syntax-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.posix_basic_syntax">POSIX
|
||||
Basic Syntax</a>
|
||||
</h4>
|
||||
@ -53,25 +53,25 @@
|
||||
</p>
|
||||
<pre class="programlisting">.[\*^$</pre>
|
||||
<a name="boost_regex.syntax.basic_syntax.wildcard_"></a><h5>
|
||||
<a name="id1004590"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.wildcard_-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.wildcard_">Wildcard:</a>
|
||||
</h5>
|
||||
<p>
|
||||
The single character '.' when used outside of a character set will match
|
||||
any single character except:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
The NULL character when the flag <code class="computeroutput"><span class="identifier">match_no_dot_null</span></code>
|
||||
is passed to the matching algorithms.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
The newline character when the flag <code class="computeroutput"><span class="identifier">match_not_dot_newline</span></code>
|
||||
is passed to the matching algorithms.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.syntax.basic_syntax.anchors_"></a><h5>
|
||||
<a name="id1004641"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.anchors_-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.anchors_">Anchors:</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -83,7 +83,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="id1004662"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.marked_sub_expressions_-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.marked_sub_expressions_">Marked
|
||||
sub-expressions:</a>
|
||||
</h5>
|
||||
@ -95,7 +95,7 @@
|
||||
by a back-reference.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.repeats_"></a><h5>
|
||||
<a name="id1004693"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.repeats_-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.repeats_">Repeats:</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -153,7 +153,7 @@ aaaa
|
||||
to.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.back_references_"></a><h5>
|
||||
<a name="id1004857"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.back_references_-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.back_references_">Back references:</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -171,7 +171,7 @@ aaaa
|
||||
</p>
|
||||
<pre class="programlisting">aaabba</pre>
|
||||
<a name="boost_regex.syntax.basic_syntax.character_sets_"></a><h5>
|
||||
<a name="id1004906"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.character_sets_-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_sets_">Character
|
||||
sets:</a>
|
||||
</h5>
|
||||
@ -184,7 +184,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="id1004927"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.single_characters_-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.single_characters_">Single
|
||||
characters:</a>
|
||||
</h6>
|
||||
@ -193,7 +193,7 @@ aaaa
|
||||
or 'c'.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.character_ranges_"></a><h6>
|
||||
<a name="id1004958"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.character_ranges_-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_ranges_">Character
|
||||
ranges:</a>
|
||||
</h6>
|
||||
@ -209,7 +209,7 @@ aaaa
|
||||
of the characters only.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.negation_"></a><h6>
|
||||
<a name="id1005014"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.negation_-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.negation_">Negation:</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -218,7 +218,7 @@ aaaa
|
||||
range a-c.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.character_classes_"></a><h6>
|
||||
<a name="id1005053"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.character_classes_-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_classes_">Character
|
||||
classes:</a>
|
||||
</h6>
|
||||
@ -228,7 +228,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="id1005104"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.collating_elements_-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.collating_elements_">Collating
|
||||
Elements:</a>
|
||||
</h6>
|
||||
@ -257,7 +257,7 @@ aaaa
|
||||
element names</a>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.equivalence_classes_"></a><h6>
|
||||
<a name="id1005196"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.equivalence_classes_-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.equivalence_classes_">Equivalence
|
||||
classes:</a>
|
||||
</h6>
|
||||
@ -274,7 +274,7 @@ aaaa
|
||||
or even all locales on one platform.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.combinations_"></a><h6>
|
||||
<a name="id1005253"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.combinations_-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.combinations_">Combinations:</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -282,7 +282,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="id1005728"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.escapes-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.escapes">Escapes</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -297,7 +297,7 @@ aaaa
|
||||
will match either a literal '\' or a '^'.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.what_gets_matched"></a><h4>
|
||||
<a name="id1005761"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.what_gets_matched-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.what_gets_matched">What Gets
|
||||
Matched</a>
|
||||
</h4>
|
||||
@ -307,11 +307,11 @@ aaaa
|
||||
rule</a>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.variations"></a><h4>
|
||||
<a name="id1005783"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.variations-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.variations">Variations</a>
|
||||
</h4>
|
||||
<a name="boost_regex.grep_syntax"></a><a name="boost_regex.syntax.basic_syntax.grep"></a><h5>
|
||||
<a name="id1005800"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.grep-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.grep">Grep</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -329,7 +329,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="id1005895"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.emacs-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.emacs">emacs</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -609,7 +609,7 @@ aaaa
|
||||
leftmost-longest rule</a>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.options"></a><h4>
|
||||
<a name="id1006335"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.options-heading"></a>
|
||||
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.options">Options</a>
|
||||
</h4>
|
||||
<p>
|
||||
@ -623,7 +623,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="id1006442"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.references-heading"></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=US-ASCII">
|
||||
<title>Character Class Names</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="basic_syntax.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="character_classes/std_char_clases.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.syntax.character_classes"></a><a class="link" href="character_classes.html" title="Character Class Names">Character Class
|
||||
Names</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Character classes that are supported by Unicode Regular Expressions</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="std_char_clases.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../character_classes.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../collating_names.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.syntax.character_classes.optional_char_class_names"></a><a class="link" href="optional_char_class_names.html" title="Character classes that are supported by Unicode Regular Expressions">Character
|
||||
classes that are supported by Unicode Regular Expressions</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Character Classes that are Always Supported</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../character_classes.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../character_classes.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="optional_char_class_names.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.syntax.character_classes.std_char_clases"></a><a class="link" href="std_char_clases.html" title="Character Classes that are Always Supported">Character
|
||||
Classes that are Always Supported</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Collating Names</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="character_classes/optional_char_class_names.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="collating_names/digraphs.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.syntax.collating_names"></a><a class="link" href="collating_names.html" title="Collating Names">Collating Names</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Digraphs</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../collating_names.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../collating_names.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="posix_symbolic_names.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.syntax.collating_names.digraphs"></a><a class="link" href="digraphs.html" title="Digraphs">Digraphs</a>
|
||||
</h4></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Named Unicode Characters</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="posix_symbolic_names.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../collating_names.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../leftmost_longest_rule.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.syntax.collating_names.named_unicode"></a><a class="link" href="named_unicode.html" title="Named Unicode Characters">Named
|
||||
Unicode Characters</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>POSIX Symbolic Names</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="digraphs.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../collating_names.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="named_unicode.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.syntax.collating_names.posix_symbolic_names"></a><a class="link" href="posix_symbolic_names.html" title="POSIX Symbolic Names">POSIX
|
||||
Symbolic Names</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>The Leftmost Longest Rule</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="collating_names/named_unicode.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../format.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.syntax.leftmost_longest_rule"></a><a class="link" href="leftmost_longest_rule.html" title="The Leftmost Longest Rule">The Leftmost
|
||||
Longest Rule</a>
|
||||
@ -32,32 +32,32 @@
|
||||
location, for POSIX basic and extended regular expressions, the "best"
|
||||
match is determined as follows:
|
||||
</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
<div class="orderedlist"><ol class="orderedlist" type="1">
|
||||
<li class="listitem">
|
||||
Find the leftmost match, if there is only one match possible at this
|
||||
location then return it.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Find the longest of the possible matches, along with any ties. If there
|
||||
is only one such possible match then return it.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
If there are no marked sub-expressions, then all the remaining alternatives
|
||||
are indistinguishable; return the first of these found.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Find the match which has matched the first sub-expression in the leftmost
|
||||
position, along with any ties. If there is only on such match possible
|
||||
then return it.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Find the match which has the longest match for the first sub-expression,
|
||||
along with any ties. If there is only one such match then return it.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Repeat steps 4 and 5 for each additional marked sub-expression.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
If there is still more than one possible match remaining, then they are
|
||||
indistinguishable; return the first one found.
|
||||
</li>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Perl Regular Expression Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
|
||||
<link rel="prev" href="../syntax.html" title="Regular Expression Syntax">
|
||||
@ -22,13 +22,13 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../syntax.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="basic_extended.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.syntax.perl_syntax"></a><a class="link" href="perl_syntax.html" title="Perl Regular Expression Syntax">Perl Regular Expression
|
||||
Syntax</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.syntax.perl_syntax.synopsis"></a><h4>
|
||||
<a name="id994928"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.synopsis-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.synopsis">Synopsis</a>
|
||||
</h4>
|
||||
<p>
|
||||
@ -36,14 +36,14 @@
|
||||
language Perl . Perl regular expressions are the default behavior in Boost.Regex
|
||||
or you can pass the flag <code class="literal">perl</code> to the <a class="link" href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> constructor, for example:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">// e1 is a case sensitive Perl regular expression:
|
||||
</span><span class="comment">// since Perl is the default option there's no need to explicitly specify the syntax used here:
|
||||
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e1</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">);</span>
|
||||
<span class="comment">// e2 a case insensitive Perl regular expression:
|
||||
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">perl</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="comment">// e1 is a case sensitive Perl regular expression: </span>
|
||||
<span class="comment">// since Perl is the default option there's no need to explicitly specify the syntax used here:</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e1</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">);</span>
|
||||
<span class="comment">// e2 a case insensitive Perl regular expression:</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">perl</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span>
|
||||
</pre>
|
||||
<a name="boost_regex.syntax.perl_syntax.perl_regular_expression_syntax"></a><h4>
|
||||
<a name="id995076"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.perl_regular_expression_syntax-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_regular_expression_syntax">Perl
|
||||
Regular Expression Syntax</a>
|
||||
</h4>
|
||||
@ -53,27 +53,27 @@
|
||||
</p>
|
||||
<pre class="programlisting">.[{}()\*+?|^$</pre>
|
||||
<a name="boost_regex.syntax.perl_syntax.wildcard"></a><h5>
|
||||
<a name="id995100"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.wildcard-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.wildcard">Wildcard</a>
|
||||
</h5>
|
||||
<p>
|
||||
The single character '.' when used outside of a character set will match
|
||||
any single character except:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
The NULL character when the <a class="link" href="../ref/match_flag_type.html" title="match_flag_type">flag
|
||||
<code class="literal">match_not_dot_null</code></a> is passed to the matching
|
||||
algorithms.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
The newline character when the <a class="link" href="../ref/match_flag_type.html" title="match_flag_type">flag
|
||||
<code class="literal">match_not_dot_newline</code></a> is passed to the matching
|
||||
algorithms.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.syntax.perl_syntax.anchors"></a><h5>
|
||||
<a name="id995154"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.anchors-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.anchors">Anchors</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -83,7 +83,7 @@
|
||||
A '$' character shall match the end of a line.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.marked_sub_expressions"></a><h5>
|
||||
<a name="id995175"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.marked_sub_expressions-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.marked_sub_expressions">Marked
|
||||
sub-expressions</a>
|
||||
</h5>
|
||||
@ -94,7 +94,7 @@
|
||||
can also repeated, or referred to by a back-reference.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.non_marking_grouping"></a><h5>
|
||||
<a name="id995202"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.non_marking_grouping-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_grouping">Non-marking
|
||||
grouping</a>
|
||||
</h5>
|
||||
@ -107,7 +107,7 @@
|
||||
without splitting out any separate sub-expressions.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.repeats"></a><h5>
|
||||
<a name="id995238"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.repeats-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.repeats">Repeats</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -188,7 +188,7 @@
|
||||
to be applied to.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.non_greedy_repeats"></a><h5>
|
||||
<a name="id995474"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.non_greedy_repeats-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_greedy_repeats">Non greedy
|
||||
repeats</a>
|
||||
</h5>
|
||||
@ -218,7 +218,7 @@
|
||||
while consuming as little input as possible.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.possessive_repeats"></a><h5>
|
||||
<a name="id995533"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.possessive_repeats-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.possessive_repeats">Possessive
|
||||
repeats</a>
|
||||
</h5>
|
||||
@ -250,7 +250,7 @@
|
||||
while giving nothing back.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.back_references"></a><h5>
|
||||
<a name="id995592"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.back_references-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.back_references">Back references</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -360,7 +360,7 @@
|
||||
named "two".
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.alternation"></a><h5>
|
||||
<a name="id995818"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.alternation-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.alternation">Alternation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -387,7 +387,7 @@
|
||||
<code class="literal">(?:abc)??</code> has exactly the same effect.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.character_sets"></a><h5>
|
||||
<a name="id995887"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.character_sets-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_sets">Character sets</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -399,38 +399,36 @@
|
||||
A bracket expression may contain any combination of the following:
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.single_characters"></a><h6>
|
||||
<a name="id995918"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.single_characters-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.single_characters">Single characters</a>
|
||||
</h6>
|
||||
<p>
|
||||
For example <code class="literal">[abc]</code>, will match any of the characters 'a',
|
||||
'b', or 'c'.
|
||||
For example =[abc]=, will match any of the characters 'a', 'b', or 'c'.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.character_ranges"></a><h6>
|
||||
<a name="id995940"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.character_ranges-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_ranges">Character
|
||||
ranges</a>
|
||||
</h6>
|
||||
<p>
|
||||
For example <code class="literal">[a-c]</code> 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
|
||||
<a class="link" href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions"><code class="literal">collate</code>
|
||||
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 <a class="link" href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions"><code class="literal">collate</code>
|
||||
flag</a> when constructing the regular expression, then ranges are locale
|
||||
sensitive.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.negation"></a><h6>
|
||||
<a name="id995972"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.negation-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.negation">Negation</a>
|
||||
</h6>
|
||||
<p>
|
||||
If the bracket-expression begins with the ^ character, then it matches the
|
||||
complement of the characters it contains, for example <code class="literal">[^a-c]</code>
|
||||
complement of the characters it contains, for example =<code class="literal">a-c</code>=
|
||||
matches any character that is not in the range <code class="literal">a-c</code>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.character_classes"></a><h6>
|
||||
<a name="id996000"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.character_classes-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_classes">Character
|
||||
classes</a>
|
||||
</h6>
|
||||
@ -441,7 +439,7 @@
|
||||
class names</a>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.collating_elements"></a><h6>
|
||||
<a name="id996032"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.collating_elements-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.collating_elements">Collating
|
||||
Elements</a>
|
||||
</h6>
|
||||
@ -463,7 +461,7 @@
|
||||
matches a <code class="literal">\0</code> character.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.equivalence_classes"></a><h6>
|
||||
<a name="id996094"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.equivalence_classes-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.equivalence_classes">Equivalence
|
||||
classes</a>
|
||||
</h6>
|
||||
@ -480,7 +478,7 @@
|
||||
or even all locales on one platform.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.escaped_characters"></a><h6>
|
||||
<a name="id996142"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.escaped_characters-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escaped_characters">Escaped
|
||||
Characters</a>
|
||||
</h6>
|
||||
@ -492,7 +490,7 @@
|
||||
is <span class="emphasis"><em>not</em></span> a "word" character.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.combinations"></a><h6>
|
||||
<a name="id996211"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.combinations-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.combinations">Combinations</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -500,7 +498,7 @@
|
||||
<code class="literal">[[:digit:]a-c[.NUL.]]</code>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.escapes"></a><h5>
|
||||
<a name="id996232"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.escapes-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escapes">Escapes</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -692,7 +690,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_"></a><h6>
|
||||
<a name="id996637"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_">"Single
|
||||
character" character classes:</a>
|
||||
</h6>
|
||||
@ -894,7 +892,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="boost_regex.syntax.perl_syntax.character_properties"></a><h6>
|
||||
<a name="id997326"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.character_properties-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_properties">Character
|
||||
Properties</a>
|
||||
</h6>
|
||||
@ -1002,7 +1000,7 @@
|
||||
as does <code class="literal">\p{digit}</code>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.word_boundaries"></a><h6>
|
||||
<a name="id997626"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.word_boundaries-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.word_boundaries">Word Boundaries</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -1021,7 +1019,7 @@
|
||||
<code class="literal">\B</code> Matches only when not at a word boundary.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.buffer_boundaries"></a><h6>
|
||||
<a name="id997678"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.buffer_boundaries-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.buffer_boundaries">Buffer boundaries</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -1036,7 +1034,7 @@
|
||||
\' Matches at the end of a buffer only.
|
||||
</p>
|
||||
<p>
|
||||
\A Matches at the start of a buffer only (the same as <code class="literal">\\\`</code>).
|
||||
\A Matches at the start of a buffer only (the same as =\`=).
|
||||
</p>
|
||||
<p>
|
||||
\z Matches at the end of a buffer only (the same as <code class="literal">\\'</code>).
|
||||
@ -1048,7 +1046,7 @@
|
||||
<code class="literal">(?=\n?\z)</code>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.continuation_escape"></a><h6>
|
||||
<a name="id997735"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.continuation_escape-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.continuation_escape">Continuation
|
||||
Escape</a>
|
||||
</h6>
|
||||
@ -1060,7 +1058,7 @@
|
||||
one ended.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.quoting_escape"></a><h6>
|
||||
<a name="id997757"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.quoting_escape-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.quoting_escape">Quoting escape</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -1073,7 +1071,7 @@
|
||||
<span class="special">\*+</span><span class="identifier">aaa</span>
|
||||
</pre>
|
||||
<a name="boost_regex.syntax.perl_syntax.unicode_escapes"></a><h6>
|
||||
<a name="id997804"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.unicode_escapes-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.unicode_escapes">Unicode escapes</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -1083,7 +1081,7 @@
|
||||
followed by a sequence of zero or more combining characters.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.matching_line_endings"></a><h6>
|
||||
<a name="id997830"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.matching_line_endings-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.matching_line_endings">Matching
|
||||
Line Endings</a>
|
||||
</h6>
|
||||
@ -1092,7 +1090,7 @@
|
||||
sequence, specifically it is identical to the expression <code class="literal">(?>\x0D\x0A?|[\x0A-\x0C\x85\x{2028}\x{2029}])</code>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.keeping_back_some_text"></a><h6>
|
||||
<a name="id997856"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.keeping_back_some_text-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.keeping_back_some_text">Keeping
|
||||
back some text</a>
|
||||
</h6>
|
||||
@ -1107,7 +1105,7 @@
|
||||
This can be used to simulate variable width lookbehind assertions.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.any_other_escape"></a><h6>
|
||||
<a name="id997886"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.any_other_escape-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.any_other_escape">Any other
|
||||
escape</a>
|
||||
</h6>
|
||||
@ -1116,7 +1114,7 @@
|
||||
\@ matches a literal '@'.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.perl_extended_patterns"></a><h5>
|
||||
<a name="id997903"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.perl_extended_patterns-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_extended_patterns">Perl
|
||||
Extended Patterns</a>
|
||||
</h5>
|
||||
@ -1125,7 +1123,7 @@
|
||||
<code class="literal">(?</code>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.named_subexpressions"></a><h6>
|
||||
<a name="id997925"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.named_subexpressions-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.named_subexpressions">Named
|
||||
Subexpressions</a>
|
||||
</h6>
|
||||
@ -1147,14 +1145,14 @@
|
||||
format string for search and replace operations, or in the <a class="link" href="../ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> member functions.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.comments"></a><h6>
|
||||
<a name="id998020"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.comments-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.comments">Comments</a>
|
||||
</h6>
|
||||
<p>
|
||||
<code class="literal">(?# ... )</code> is treated as a comment, it's contents are ignored.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.modifiers"></a><h6>
|
||||
<a name="id998042"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.modifiers-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.modifiers">Modifiers</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -1168,7 +1166,7 @@
|
||||
pattern only.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.non_marking_groups"></a><h6>
|
||||
<a name="id998077"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.non_marking_groups-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_groups">Non-marking
|
||||
groups</a>
|
||||
</h6>
|
||||
@ -1177,7 +1175,7 @@
|
||||
an additional sub-expression.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.branch_reset"></a><h6>
|
||||
<a name="id998099"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.branch_reset-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.branch_reset">Branch reset</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -1199,7 +1197,7 @@
|
||||
# 1 2 2 3 2 3 4
|
||||
</pre>
|
||||
<a name="boost_regex.syntax.perl_syntax.lookahead"></a><h6>
|
||||
<a name="id998136"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.lookahead-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookahead">Lookahead</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -1222,7 +1220,7 @@
|
||||
could be used to validate the password.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.lookbehind"></a><h6>
|
||||
<a name="id998210"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.lookbehind-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookbehind">Lookbehind</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -1236,7 +1234,7 @@
|
||||
(pattern must be of fixed length).
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.independent_sub_expressions"></a><h6>
|
||||
<a name="id998243"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.independent_sub_expressions-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.independent_sub_expressions">Independent
|
||||
sub-expressions</a>
|
||||
</h6>
|
||||
@ -1249,7 +1247,7 @@
|
||||
no match is found at all.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.recursive_expressions"></a><h6>
|
||||
<a name="id998274"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.recursive_expressions-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.recursive_expressions">Recursive
|
||||
Expressions</a>
|
||||
</h6>
|
||||
@ -1276,7 +1274,7 @@
|
||||
<code class="literal">(?&NAME)</code> recurses to named sub-expression <span class="emphasis"><em>NAME</em></span>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.conditional_expressions"></a><h6>
|
||||
<a name="id998383"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.conditional_expressions-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.conditional_expressions">Conditional
|
||||
Expressions</a>
|
||||
</h6>
|
||||
@ -1298,27 +1296,27 @@
|
||||
<p>
|
||||
Here is a summary of the possible predicates:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
<code class="literal">(?(?=assert)yes-pattern|no-pattern)</code> Executes <span class="emphasis"><em>yes-pattern</em></span>
|
||||
if the forward look-ahead assert matches, otherwise executes <span class="emphasis"><em>no-pattern</em></span>.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<code class="literal">(?(?!assert)yes-pattern|no-pattern)</code> Executes <span class="emphasis"><em>yes-pattern</em></span>
|
||||
if the forward look-ahead assert does not match, otherwise executes
|
||||
<span class="emphasis"><em>no-pattern</em></span>.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<code class="literal">(?(R)yes-pattern|no-pattern)</code> Executes <span class="emphasis"><em>yes-pattern</em></span>
|
||||
if we are executing inside a recursion, otherwise executes <span class="emphasis"><em>no-pattern</em></span>.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<code class="literal">(?(R<span class="emphasis"><em>N</em></span>)yes-pattern|no-pattern)</code>
|
||||
Executes <span class="emphasis"><em>yes-pattern</em></span> if we are executing inside
|
||||
a recursion to sub-expression <span class="emphasis"><em>N</em></span>, otherwise executes
|
||||
<span class="emphasis"><em>no-pattern</em></span>.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
<code class="literal">(?(DEFINE)never-exectuted-pattern)</code> 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
|
||||
@ -1326,42 +1324,42 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.syntax.perl_syntax.operator_precedence"></a><h5>
|
||||
<a name="id998543"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.operator_precedence-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.operator_precedence">Operator
|
||||
precedence</a>
|
||||
</h5>
|
||||
<p>
|
||||
The order of precedence for of operators is as follows:
|
||||
</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
<div class="orderedlist"><ol class="orderedlist" type="1">
|
||||
<li class="listitem">
|
||||
Collation-related bracket symbols <code class="computeroutput"><span class="special">[==]</span>
|
||||
<span class="special">[::]</span> <span class="special">[..]</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Escaped characters <code class="literal">\</code>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Character set (bracket expression) <code class="computeroutput"><span class="special">[]</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Grouping <code class="literal">()</code>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Single-character-ERE duplication <code class="literal">* + ? {m,n}</code>
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Concatenation
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Anchoring ^$
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
Alternation |
|
||||
</li>
|
||||
</ol></div>
|
||||
<a name="boost_regex.syntax.perl_syntax.what_gets_matched"></a><h4>
|
||||
<a name="id998662"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.what_gets_matched-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">What gets
|
||||
matched</a>
|
||||
</h4>
|
||||
@ -1537,7 +1535,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="boost_regex.syntax.perl_syntax.variations"></a><h4>
|
||||
<a name="id999034"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.variations-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.variations">Variations</a>
|
||||
</h4>
|
||||
<p>
|
||||
@ -1546,7 +1544,7 @@
|
||||
and <code class="literal">JScript</code></a> are all synonyms for <code class="literal">perl</code>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.options"></a><h4>
|
||||
<a name="id999080"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.options-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.options">Options</a>
|
||||
</h4>
|
||||
<p>
|
||||
@ -1558,7 +1556,7 @@
|
||||
are to be applied.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.pattern_modifiers"></a><h4>
|
||||
<a name="id999128"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.pattern_modifiers-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.pattern_modifiers">Pattern
|
||||
Modifiers</a>
|
||||
</h4>
|
||||
@ -1570,7 +1568,7 @@
|
||||
and <code class="literal">no_mod_s</code></a>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.perl_syntax.references"></a><h4>
|
||||
<a name="id1000957"></a>
|
||||
<a name="boost_regex.syntax.perl_syntax.references-heading"></a>
|
||||
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.references">References</a>
|
||||
</h4>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Unicode and Boost.Regex</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<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">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="introduction_and_overview.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="captures.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.unicode"></a><a class="link" href="unicode.html" title="Unicode and Boost.Regex">Unicode and Boost.Regex</a>
|
||||
</h2></div></div></div>
|
||||
@ -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="id990200"></a>
|
||||
<a name="boost_regex.unicode.rely_on_wchar_t-heading"></a>
|
||||
<a class="link" href="unicode.html#boost_regex.unicode.rely_on_wchar_t">Rely on wchar_t</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -40,23 +40,23 @@
|
||||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iswlower</span></code> etc), then you can use <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">wregex</span></code>
|
||||
to process Unicode. However, there are several disadvantages to this approach:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
It's not portable: there's no guarantee on the width of <code class="computeroutput"><span class="keyword">wchar_t</span></code>,
|
||||
or even whether the runtime treats wide characters as Unicode at all, most
|
||||
Windows compilers do so, but many Unix systems do not.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
There's no support for Unicode-specific character classes: <code class="computeroutput"><span class="special">[[:</span><span class="identifier">Nd</span><span class="special">:]]</span></code>, <code class="computeroutput"><span class="special">[[:</span><span class="identifier">Po</span><span class="special">:]]</span></code>
|
||||
etc.
|
||||
</li>
|
||||
<li>
|
||||
<li class="listitem">
|
||||
You can only search strings that are encoded as sequences of wide characters,
|
||||
it is not possible to search UTF-8, or even UTF-16 on many platforms.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.unicode.use_a_unicode_aware_regular_expression_type_"></a><h5>
|
||||
<a name="id990328"></a>
|
||||
<a name="boost_regex.unicode.use_a_unicode_aware_regular_expression_type_-heading"></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=US-ASCII">
|
||||
<title>Boost.Regex</title>
|
||||
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="index.html" title="Boost.Regex">
|
||||
<link rel="next" href="boost_regex/configuration.html" title="Configuration">
|
||||
</head>
|
||||
@ -18,7 +18,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav"><a accesskey="n" href="boost_regex/configuration.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div>
|
||||
<div class="article" lang="en">
|
||||
<div class="article">
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div><h2 class="title">
|
||||
@ -28,7 +28,7 @@
|
||||
</h3></div></div></div>
|
||||
<div><p class="copyright">Copyright © 1998-2010 John Maddock</p></div>
|
||||
<div><div class="legalnotice">
|
||||
<a name="id984713"></a><p>
|
||||
<a name="id1028452"></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>
|
||||
@ -168,6 +168,9 @@
|
||||
<dt><span class="section"><a href="boost_regex/ref/deprecated_interfaces/old_regex.html">High
|
||||
Level Class RegEx (Deprecated)</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="boost_regex/ref/internal_details.html">Internal Details</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="boost_regex/ref/internal_details/uni_iter.html">Unicode
|
||||
Iterators</a></span></dt></dl></dd>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="boost_regex/background_information.html">Background Information</a></span></dt>
|
||||
<dd><dl>
|
||||
@ -195,7 +198,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: May 16, 2011 at 17:07:46 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: July 21, 2011 at 09:38:30 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
@ -85,6 +85,10 @@ PDF version of this manual is also available].
|
||||
[include old_regex.qbk]
|
||||
[endsect]
|
||||
|
||||
[section Internal Details]
|
||||
[include unicode_iterators.qbk]
|
||||
[endsect]
|
||||
|
||||
[endsect]
|
||||
|
||||
[section Background Information]
|
||||
|
@ -764,13 +764,13 @@ template <class I>
|
||||
inline std::pair< boost::u8_to_u32_iterator<I>, boost::u8_to_u32_iterator<I> >
|
||||
make_utf32_seq(I i, I j, mpl::int_<1> const*)
|
||||
{
|
||||
return std::pair< boost::u8_to_u32_iterator<I>, boost::u8_to_u32_iterator<I> >(boost::u8_to_u32_iterator<I>(i), boost::u8_to_u32_iterator<I>(j));
|
||||
return std::pair< boost::u8_to_u32_iterator<I>, boost::u8_to_u32_iterator<I> >(boost::u8_to_u32_iterator<I>(i, i, j), boost::u8_to_u32_iterator<I>(j, i, j));
|
||||
}
|
||||
template <class I>
|
||||
inline std::pair< boost::u16_to_u32_iterator<I>, boost::u16_to_u32_iterator<I> >
|
||||
make_utf32_seq(I i, I j, mpl::int_<2> const*)
|
||||
{
|
||||
return std::pair< boost::u16_to_u32_iterator<I>, boost::u16_to_u32_iterator<I> >(boost::u16_to_u32_iterator<I>(i), boost::u16_to_u32_iterator<I>(j));
|
||||
return std::pair< boost::u16_to_u32_iterator<I>, boost::u16_to_u32_iterator<I> >(boost::u16_to_u32_iterator<I>(i, i, j), boost::u16_to_u32_iterator<I>(j, i, j));
|
||||
}
|
||||
template <class I>
|
||||
inline std::pair< I, I >
|
||||
@ -782,13 +782,15 @@ template <class charT>
|
||||
inline std::pair< boost::u8_to_u32_iterator<const charT*>, boost::u8_to_u32_iterator<const charT*> >
|
||||
make_utf32_seq(const charT* p, mpl::int_<1> const*)
|
||||
{
|
||||
return std::pair< boost::u8_to_u32_iterator<const charT*>, boost::u8_to_u32_iterator<const charT*> >(boost::u8_to_u32_iterator<const charT*>(p), boost::u8_to_u32_iterator<const charT*>(p+std::strlen((const char*)p)));
|
||||
std::size_t len = std::strlen((const char*)p);
|
||||
return std::pair< boost::u8_to_u32_iterator<const charT*>, boost::u8_to_u32_iterator<const charT*> >(boost::u8_to_u32_iterator<const charT*>(p, p, p+len), boost::u8_to_u32_iterator<const charT*>(p+len, p, p+len));
|
||||
}
|
||||
template <class charT>
|
||||
inline std::pair< boost::u16_to_u32_iterator<const charT*>, boost::u16_to_u32_iterator<const charT*> >
|
||||
make_utf32_seq(const charT* p, mpl::int_<2> const*)
|
||||
{
|
||||
return std::pair< boost::u16_to_u32_iterator<const charT*>, boost::u16_to_u32_iterator<const charT*> >(boost::u16_to_u32_iterator<const charT*>(p), boost::u16_to_u32_iterator<const charT*>(p+u_strlen((const UChar*)p)));
|
||||
std::size_t len = u_strlen((const UChar*)p);
|
||||
return std::pair< boost::u16_to_u32_iterator<const charT*>, boost::u16_to_u32_iterator<const charT*> >(boost::u16_to_u32_iterator<const charT*>(p, p, p + len), boost::u16_to_u32_iterator<const charT*>(p+len, p, p + len));
|
||||
}
|
||||
template <class charT>
|
||||
inline std::pair< const charT*, const charT* >
|
||||
|
@ -82,16 +82,16 @@ static const ::boost::uint32_t ten_bit_mask = 0x3FFu;
|
||||
|
||||
inline bool is_high_surrogate(::boost::uint16_t v)
|
||||
{
|
||||
return (v & 0xFC00u) == 0xd800u;
|
||||
return (v & 0xFFFFFC00u) == 0xd800u;
|
||||
}
|
||||
inline bool is_low_surrogate(::boost::uint16_t v)
|
||||
{
|
||||
return (v & 0xFC00u) == 0xdc00u;
|
||||
return (v & 0xFFFFFC00u) == 0xdc00u;
|
||||
}
|
||||
template <class T>
|
||||
inline bool is_surrogate(T v)
|
||||
{
|
||||
return (v & 0xF800u) == 0xd800;
|
||||
return (v & 0xFFFFF800u) == 0xd800;
|
||||
}
|
||||
|
||||
inline unsigned utf8_byte_count(boost::uint8_t c)
|
||||
@ -303,6 +303,34 @@ public:
|
||||
{
|
||||
m_value = pending_read;
|
||||
}
|
||||
//
|
||||
// Range checked version:
|
||||
//
|
||||
u16_to_u32_iterator(BaseIterator b, BaseIterator start, BaseIterator end) : m_position(b)
|
||||
{
|
||||
m_value = pending_read;
|
||||
//
|
||||
// The range must not start with a low surrogate, or end in a high surrogate,
|
||||
// otherwise we run the risk of running outside the underlying input range.
|
||||
// Likewise b must not be located at a low surrogate.
|
||||
//
|
||||
boost::uint16_t val;
|
||||
if(start != end)
|
||||
{
|
||||
if((b != start) && (b != end))
|
||||
{
|
||||
val = *b;
|
||||
if(detail::is_surrogate(val) && ((val & 0xFC00u) == 0xDC00u))
|
||||
invalid_code_point(val);
|
||||
}
|
||||
val = *start;
|
||||
if(detail::is_surrogate(val) && ((val & 0xFC00u) == 0xDC00u))
|
||||
invalid_code_point(val);
|
||||
val = *--end;
|
||||
if(detail::is_high_surrogate(val))
|
||||
invalid_code_point(val);
|
||||
}
|
||||
}
|
||||
private:
|
||||
static void invalid_code_point(::boost::uint16_t val)
|
||||
{
|
||||
@ -504,7 +532,7 @@ public:
|
||||
while((*--m_position & 0xC0u) == 0x80u) ++count;
|
||||
// now check that the sequence was valid:
|
||||
if(count != detail::utf8_trailing_byte_count(*m_position))
|
||||
invalid_sequnce();
|
||||
invalid_sequence();
|
||||
m_value = pending_read;
|
||||
}
|
||||
BaseIterator base()const
|
||||
@ -520,8 +548,37 @@ public:
|
||||
{
|
||||
m_value = pending_read;
|
||||
}
|
||||
//
|
||||
// Checked constructor:
|
||||
//
|
||||
u8_to_u32_iterator(BaseIterator b, BaseIterator start, BaseIterator end) : m_position(b)
|
||||
{
|
||||
m_value = pending_read;
|
||||
//
|
||||
// We must not start with a continuation character, or end with a
|
||||
// truncated UTF-8 sequence otherwise we run the risk of going past
|
||||
// the start/end of the underlying sequence:
|
||||
//
|
||||
if(start != end)
|
||||
{
|
||||
unsigned char v = *start;
|
||||
if((v & 0xC0u) == 0x80u)
|
||||
invalid_sequence();
|
||||
if((b != start) && (b != end) && ((*b & 0xC0u) == 0x80u))
|
||||
invalid_sequence();
|
||||
BaseIterator pos = end;
|
||||
do
|
||||
{
|
||||
v = *--pos;
|
||||
}
|
||||
while((start != pos) && ((v & 0xC0u) == 0x80u));
|
||||
std::ptrdiff_t extra = detail::utf8_byte_count(v);
|
||||
if(std::distance(pos, end) < extra)
|
||||
invalid_sequence();
|
||||
}
|
||||
}
|
||||
private:
|
||||
static void invalid_sequnce()
|
||||
static void invalid_sequence()
|
||||
{
|
||||
std::out_of_range e("Invalid UTF-8 sequence encountered while trying to encode UTF-32 character");
|
||||
boost::throw_exception(e);
|
||||
@ -531,7 +588,7 @@ private:
|
||||
m_value = static_cast<U32Type>(static_cast< ::boost::uint8_t>(*m_position));
|
||||
// we must not have a continuation character:
|
||||
if((m_value & 0xC0u) == 0x80u)
|
||||
invalid_sequnce();
|
||||
invalid_sequence();
|
||||
// see how many extra byts we have:
|
||||
unsigned extra = detail::utf8_trailing_byte_count(*m_position);
|
||||
// extract the extra bits, 6 from each extra byte:
|
||||
@ -554,7 +611,7 @@ private:
|
||||
m_value &= masks[extra];
|
||||
// check the result:
|
||||
if(m_value > static_cast<U32Type>(0x10FFFFu))
|
||||
invalid_sequnce();
|
||||
invalid_sequence();
|
||||
}
|
||||
BaseIterator m_position;
|
||||
mutable U32Type m_value;
|
||||
|
@ -124,7 +124,8 @@ test-suite regex
|
||||
../build//boost_regex
|
||||
]
|
||||
|
||||
[ run unicode/unicode_iterator_test.cpp ../build//boost_regex ]
|
||||
[ run unicode/unicode_iterator_test.cpp ../build//boost_regex : : : <define>TEST_UTF8 : unicode_iterator_test_utf8 ]
|
||||
[ run unicode/unicode_iterator_test.cpp ../build//boost_regex : : : <define>TEST_UTF16 : unicode_iterator_test_utf16 ]
|
||||
[ run static_mutex/static_mutex_test.cpp
|
||||
../../thread/build//boost_thread ../build//boost_regex
|
||||
]
|
||||
|
@ -22,6 +22,24 @@
|
||||
#include <iterator>
|
||||
#include <algorithm>
|
||||
|
||||
#if !defined(TEST_UTF8) && !defined(TEST_UTF16)
|
||||
# define TEST_UTF8
|
||||
# define TEST_UTF16
|
||||
#endif
|
||||
|
||||
template <class I>
|
||||
typename I::value_type iterate_over(I a, I b)
|
||||
{
|
||||
typedef I::value_type value_type;
|
||||
value_type v = 0;
|
||||
while(a != b)
|
||||
{
|
||||
v ^= *a;
|
||||
++a;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
void spot_checks()
|
||||
{
|
||||
// test specific values ripped straight out of the Unicode standard
|
||||
@ -61,6 +79,30 @@ void spot_checks()
|
||||
BOOST_CHECK_EQUAL(*--it8, 0xB0u);
|
||||
BOOST_CHECK_EQUAL(*--it8, 0xD0u);
|
||||
BOOST_CHECK_EQUAL(*--it8, 0x4Du);
|
||||
//
|
||||
// Test some bad sequences and verify that our iterators will catch them:
|
||||
//
|
||||
boost::uint8_t bad_seq[10] = { 0x4Du, 0xD0u, 0xB0u, 0xE4u, 0xBAu, 0x8Cu, 0xF0u, 0x90u, 0x8Cu, 0x82u };
|
||||
BOOST_CHECK_EQUAL(
|
||||
iterate_over(
|
||||
boost::u8_to_u32_iterator<const boost::uint8_t*>(bad_seq, bad_seq, bad_seq + 10),
|
||||
boost::u8_to_u32_iterator<const boost::uint8_t*>(bad_seq+10, bad_seq, bad_seq + 10)),
|
||||
0x000149f3u);
|
||||
BOOST_CHECK_THROW(boost::u8_to_u32_iterator<const boost::uint8_t*>(bad_seq, bad_seq, bad_seq + 9), std::out_of_range);
|
||||
BOOST_CHECK_THROW(boost::u8_to_u32_iterator<const boost::uint8_t*>(bad_seq, bad_seq, bad_seq + 8), std::out_of_range);
|
||||
BOOST_CHECK_THROW(boost::u8_to_u32_iterator<const boost::uint8_t*>(bad_seq, bad_seq, bad_seq + 7), std::out_of_range);
|
||||
BOOST_CHECK_THROW(boost::u8_to_u32_iterator<const boost::uint8_t*>(bad_seq + 2, bad_seq, bad_seq + 10), std::out_of_range);
|
||||
BOOST_CHECK_THROW(boost::u8_to_u32_iterator<const boost::uint8_t*>(bad_seq + 2, bad_seq + 2, bad_seq + 10), std::out_of_range);
|
||||
|
||||
boost::uint16_t bad_seq2[6] = { 0xD800, 0xDF02, 0xD800, 0xDF02, 0xD800, 0xDF02 };
|
||||
BOOST_CHECK_EQUAL(
|
||||
iterate_over(
|
||||
boost::u16_to_u32_iterator<const boost::uint16_t*>(bad_seq2, bad_seq2, bad_seq2 + 6),
|
||||
boost::u16_to_u32_iterator<const boost::uint16_t*>(bad_seq2+6, bad_seq2, bad_seq2 + 6)),
|
||||
66306u);
|
||||
BOOST_CHECK_THROW(boost::u16_to_u32_iterator<const boost::uint16_t*>(bad_seq2, bad_seq2, bad_seq2 + 5), std::out_of_range);
|
||||
BOOST_CHECK_THROW(boost::u16_to_u32_iterator<const boost::uint16_t*>(bad_seq2 + 1, bad_seq2 + 1, bad_seq2 + 6), std::out_of_range);
|
||||
BOOST_CHECK_THROW(boost::u16_to_u32_iterator<const boost::uint16_t*>(bad_seq2 + 1, bad_seq2, bad_seq2 + 6), std::out_of_range);
|
||||
}
|
||||
|
||||
void test(const std::vector< ::boost::uint32_t>& v)
|
||||
@ -84,6 +126,8 @@ void test(const std::vector< ::boost::uint32_t>& v)
|
||||
vector16_type v16;
|
||||
vector32_type v32;
|
||||
vector32_type::const_iterator i, j, k;
|
||||
|
||||
#ifdef TEST_UTF16
|
||||
//
|
||||
// begin by testing forward iteration, of 32-16 bit interconversions:
|
||||
//
|
||||
@ -97,13 +141,13 @@ void test(const std::vector< ::boost::uint32_t>& v)
|
||||
BOOST_CHECK_EQUAL((std::size_t)std::distance(u32to16type(v.begin()), u32to16type(v.end())), v16.size());
|
||||
#endif
|
||||
#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
|
||||
v32.assign(u16to32type(v16.begin()), u16to32type(v16.end()));
|
||||
v32.assign(u16to32type(v16.begin(), v16.begin(), v16.end()), u16to32type(v16.end(), v16.begin(), v16.end()));
|
||||
#else
|
||||
v32.clear();
|
||||
std::copy(u16to32type(v16.begin()), u16to32type(v16.end()), std::back_inserter(v32));
|
||||
std::copy(u16to32type(v16.begin(), v16.begin(), v16.end()), u16to32type(v16.end(), v16.begin(), v16.end()), std::back_inserter(v32));
|
||||
#endif
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
BOOST_CHECK_EQUAL((std::size_t)std::distance(u16to32type(v16.begin()), u16to32type(v16.end())), v32.size());
|
||||
BOOST_CHECK_EQUAL((std::size_t)std::distance(u16to32type(v16.begin(), v16.begin(), v16.end()), u16to32type(v16.end(), v16.begin(), v16.end())), v32.size());
|
||||
#endif
|
||||
BOOST_CHECK_EQUAL(v.size(), v32.size());
|
||||
i = v.begin();
|
||||
@ -120,9 +164,9 @@ void test(const std::vector< ::boost::uint32_t>& v)
|
||||
BOOST_CHECK_EQUAL((std::size_t)std::distance(ru32to16type(u32to16type(v.end())), ru32to16type(u32to16type(v.begin()))), v16.size());
|
||||
#endif
|
||||
std::reverse(v16.begin(), v16.end());
|
||||
v32.assign(ru16to32type(u16to32type(v16.end())), ru16to32type(u16to32type(v16.begin())));
|
||||
v32.assign(ru16to32type(u16to32type(v16.end(), v16.begin(), v16.end())), ru16to32type(u16to32type(v16.begin(), v16.begin(), v16.end())));
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
BOOST_CHECK_EQUAL((std::size_t)std::distance(ru16to32type(u16to32type(v16.end())), ru16to32type(u16to32type(v16.begin()))), v32.size());
|
||||
BOOST_CHECK_EQUAL((std::size_t)std::distance(ru16to32type(u16to32type(v16.end(), v16.begin(), v16.end())), ru16to32type(u16to32type(v16.begin(), v16.begin(), v16.end()))), v32.size());
|
||||
#endif
|
||||
BOOST_CHECK_EQUAL(v.size(), v32.size());
|
||||
std::reverse(v32.begin(), v32.end());
|
||||
@ -132,6 +176,9 @@ void test(const std::vector< ::boost::uint32_t>& v)
|
||||
k = v32.begin();
|
||||
BOOST_CHECK_EQUAL_COLLECTIONS(v.begin(), v.end(), v32.begin(), v32.end());
|
||||
#endif
|
||||
#endif // TEST_UTF16
|
||||
|
||||
#ifdef TEST_UTF8
|
||||
//
|
||||
// Test forward iteration, of 32-8 bit interconversions:
|
||||
//
|
||||
@ -145,13 +192,13 @@ void test(const std::vector< ::boost::uint32_t>& v)
|
||||
BOOST_CHECK_EQUAL((std::size_t)std::distance(u32to8type(v.begin()), u32to8type(v.end())), v8.size());
|
||||
#endif
|
||||
#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
|
||||
v32.assign(u8to32type(v8.begin()), u8to32type(v8.end()));
|
||||
v32.assign(u8to32type(v8.begin(), v8.begin(), v8.end()), u8to32type(v8.end(), v8.begin(), v8.end()));
|
||||
#else
|
||||
v32.clear();
|
||||
std::copy(u8to32type(v8.begin()), u8to32type(v8.end()), std::back_inserter(v32));
|
||||
std::copy(u8to32type(v8.begin(), v8.begin(), v8.end()), u8to32type(v8.end(), v8.begin(), v8.end()), std::back_inserter(v32));
|
||||
#endif
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
BOOST_CHECK_EQUAL((std::size_t)std::distance(u8to32type(v8.begin()), u8to32type(v8.end())), v32.size());
|
||||
BOOST_CHECK_EQUAL((std::size_t)std::distance(u8to32type(v8.begin(), v8.begin(), v8.end()), u8to32type(v8.end(), v8.begin(), v8.end())), v32.size());
|
||||
#endif
|
||||
BOOST_CHECK_EQUAL(v.size(), v32.size());
|
||||
i = v.begin();
|
||||
@ -168,9 +215,9 @@ void test(const std::vector< ::boost::uint32_t>& v)
|
||||
BOOST_CHECK_EQUAL((std::size_t)std::distance(ru32to8type(u32to8type(v.end())), ru32to8type(u32to8type(v.begin()))), v8.size());
|
||||
#endif
|
||||
std::reverse(v8.begin(), v8.end());
|
||||
v32.assign(ru8to32type(u8to32type(v8.end())), ru8to32type(u8to32type(v8.begin())));
|
||||
v32.assign(ru8to32type(u8to32type(v8.end(), v8.begin(), v8.end())), ru8to32type(u8to32type(v8.begin(), v8.begin(), v8.end())));
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
BOOST_CHECK_EQUAL((std::size_t)std::distance(ru8to32type(u8to32type(v8.end())), ru8to32type(u8to32type(v8.begin()))), v32.size());
|
||||
BOOST_CHECK_EQUAL((std::size_t)std::distance(ru8to32type(u8to32type(v8.end(), v8.begin(), v8.end())), ru8to32type(u8to32type(v8.begin(), v8.begin(), v8.end()))), v32.size());
|
||||
#endif
|
||||
BOOST_CHECK_EQUAL(v.size(), v32.size());
|
||||
std::reverse(v32.begin(), v32.end());
|
||||
@ -180,6 +227,26 @@ void test(const std::vector< ::boost::uint32_t>& v)
|
||||
k = v32.begin();
|
||||
BOOST_CHECK_EQUAL_COLLECTIONS(v.begin(), v.end(), v32.begin(), v32.end());
|
||||
#endif
|
||||
#endif // TEST_UTF8
|
||||
//
|
||||
// Test checked construction of UTF-8/16 iterators at each location in the sequences:
|
||||
//
|
||||
#ifdef TEST_UTF8
|
||||
for(u8to32type v8p(v8.begin(), v8.begin(), v8.end()), v8e(v8.end(), v8.begin(), v8.end()); v8p != v8e; ++v8p)
|
||||
{
|
||||
u8to32type pos(v8p.base(), v8p.base(), v8.end());
|
||||
BOOST_CHECK(pos == v8p);
|
||||
BOOST_CHECK(*pos == *v8p);
|
||||
}
|
||||
#endif
|
||||
#ifdef TEST_UTF16
|
||||
for(u16to32type v16p(v16.begin(), v16.begin(), v16.end()), v16e(v16.end(), v16.begin(), v16.end()); v16p != v16e; ++v16p)
|
||||
{
|
||||
u16to32type pos(v16p.base(), v16p.base(), v16.end());
|
||||
BOOST_CHECK(pos == v16p);
|
||||
BOOST_CHECK(*pos == *v16p);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int test_main( int, char* [] )
|
||||
@ -189,6 +256,7 @@ int test_main( int, char* [] )
|
||||
// now test a bunch of values for self-consistency and round-tripping:
|
||||
std::vector< ::boost::uint32_t> v;
|
||||
// start with boundary conditions:
|
||||
/*
|
||||
v.push_back(0);
|
||||
v.push_back(0xD7FF);
|
||||
v.push_back(0xE000);
|
||||
@ -201,6 +269,11 @@ int test_main( int, char* [] )
|
||||
v.push_back(0x800u - 1);
|
||||
v.push_back(0x10000u);
|
||||
v.push_back(0x10000u - 1);
|
||||
*/
|
||||
for(unsigned i = 0; i < 0xD800; ++i)
|
||||
v.push_back(i);
|
||||
for(unsigned i = 0xDFFF + 1; i < 0x10FFFF; ++i)
|
||||
v.push_back(i);
|
||||
test(v);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user