mirror of
https://github.com/boostorg/regex.git
synced 2025-07-26 02:27:27 +02:00
Rebuild a lot of documentation.
[SVN r43650]
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>High Level Class RegEx (Deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
||||
<link rel="start" 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)">
|
||||
@ -12,7 +12,7 @@
|
||||
<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.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
|
||||
@ -24,7 +24,7 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.deprecated_interfaces.old_regex"></a><a href="old_regex.html" title="High Level Class RegEx (Deprecated)"> High
|
||||
<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>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
@ -33,7 +33,8 @@
|
||||
exists, and existing code will continue to compile, however the following
|
||||
documentation is unlikely to be further updated.
|
||||
</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">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<p>
|
||||
The class RegEx provides a high level simplified interface to the regular
|
||||
@ -41,7 +42,8 @@
|
||||
regular expressions always follow the "normal" syntax - that
|
||||
is the same as the perl / ECMAScript synatx.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(*</span><span class="identifier">GrepCallback</span><span class="special">)(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&</span> <span class="identifier">expression</span><span class="special">);</span>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(*</span><span class="identifier">GrepCallback</span><span class="special">)(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&</span> <span class="identifier">expression</span><span class="special">);</span>
|
||||
<span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(*</span><span class="identifier">GrepFileCallback</span><span class="special">)(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">file</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&</span> <span class="identifier">expression</span><span class="special">);</span>
|
||||
<span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(*</span><span class="identifier">FindFilesCallback</span><span class="special">)(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">file</span><span class="special">);</span>
|
||||
|
||||
@ -169,7 +171,7 @@
|
||||
<p>
|
||||
Constructs an instance of RegEx, setting the expression to <span class="emphasis"><em>c</em></span>,
|
||||
if <span class="emphasis"><em>icase</em></span> is true then matching is insensitive
|
||||
to case, otherwise it is sensitive to case. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
to case, otherwise it is sensitive to case. Throws <a class="link" href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -185,7 +187,7 @@
|
||||
<p>
|
||||
Constructs an instance of RegEx, setting the expression to <span class="emphasis"><em>s</em></span>,
|
||||
if <span class="emphasis"><em>icase</em></span> is true then matching is insensitive
|
||||
to case, otherwise it is sensitive to case. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
to case, otherwise it is sensitive to case. Throws <a class="link" href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -211,7 +213,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Assignment operator, equivalent to calling <code class="computeroutput"><span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">p</span><span class="special">,</span> <span class="keyword">false</span><span class="special">)</span></code>. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
Assignment operator, equivalent to calling <code class="computeroutput"><span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">p</span><span class="special">,</span> <span class="keyword">false</span><span class="special">)</span></code>. Throws <a class="link" href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -224,7 +226,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Assignment operator, equivalent to calling <code class="computeroutput"><span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="keyword">false</span><span class="special">)</span></code>. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
Assignment operator, equivalent to calling <code class="computeroutput"><span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="keyword">false</span><span class="special">)</span></code>. Throws <a class="link" href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -242,7 +244,7 @@
|
||||
<p>
|
||||
Sets the current expression to <span class="emphasis"><em>p</em></span>, if <span class="emphasis"><em>icase</em></span>
|
||||
is true then matching is insensitive to case, otherwise it is sensitive
|
||||
to case. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
to case. Throws <a class="link" href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -259,7 +261,7 @@
|
||||
<p>
|
||||
Sets the current expression to <span class="emphasis"><em>s</em></span>, if <span class="emphasis"><em>icase</em></span>
|
||||
is true then matching is insensitive to case, otherwise it is sensitive
|
||||
to case. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
to case. Throws <a class="link" href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -288,7 +290,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Attempts to match the current expression against the text <span class="emphasis"><em>p</em></span>
|
||||
using the match flags <span class="emphasis"><em>flags</em></span> - see <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>. Returns
|
||||
using the match flags <span class="emphasis"><em>flags</em></span> - see <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>. Returns
|
||||
<span class="emphasis"><em>true</em></span> if the expression matches the whole of
|
||||
the input string.
|
||||
</p>
|
||||
@ -307,7 +309,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Attempts to match the current expression against the text <span class="emphasis"><em>s</em></span>
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
using the <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
Returns <span class="emphasis"><em>true</em></span> if the expression matches the
|
||||
whole of the input string.
|
||||
</p>
|
||||
@ -326,7 +328,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Attempts to find a match for the current expression somewhere in
|
||||
the text <span class="emphasis"><em>p</em></span> using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
the text <span class="emphasis"><em>p</em></span> using the <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
Returns <span class="emphasis"><em>true</em></span> if the match succeeds.
|
||||
</p>
|
||||
</td>
|
||||
@ -344,7 +346,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Attempts to find a match for the current expression somewhere in
|
||||
the text <span class="emphasis"><em>s</em></span> using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> flags.
|
||||
the text <span class="emphasis"><em>s</em></span> using the <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> flags.
|
||||
Returns <span class="emphasis"><em>true</em></span> if the match succeeds.
|
||||
</p>
|
||||
</td>
|
||||
@ -363,7 +365,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the text <span class="emphasis"><em>p</em></span>
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
using the <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match found calls the call-back function cb as: <code class="computeroutput"><span class="identifier">cb</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span></code>
|
||||
If at any stage the call-back function returns <span class="emphasis"><em>false</em></span>
|
||||
then the grep operation terminates, otherwise continues until no
|
||||
@ -385,7 +387,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the text <span class="emphasis"><em>s</em></span>
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> flags.
|
||||
using the <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> flags.
|
||||
For each match found calls the call-back function cb as: <code class="computeroutput"><span class="identifier">cb</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span></code>
|
||||
If at any stage the call-back function returns false then the grep
|
||||
operation terminates, otherwise continues until no further matches
|
||||
@ -407,7 +409,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the text <span class="emphasis"><em>p</em></span>
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> flags.
|
||||
using the <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> flags.
|
||||
For each match pushes a copy of what matched onto <span class="emphasis"><em>v</em></span>.
|
||||
Returns the number of matches found.
|
||||
</p>
|
||||
@ -427,7 +429,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the text <span class="emphasis"><em>s</em></span>
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
using the <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match pushes a copy of what matched onto <span class="emphasis"><em>v</em></span>.
|
||||
Returns the number of matches found.
|
||||
</p>
|
||||
@ -447,7 +449,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the text <span class="emphasis"><em>p</em></span>
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
using the <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match pushes the starting index of what matched onto
|
||||
<span class="emphasis"><em>v</em></span>. Returns the number of matches found.
|
||||
</p>
|
||||
@ -467,7 +469,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the text <span class="emphasis"><em>s</em></span>
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
using the <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match pushes the starting index of what matched onto
|
||||
<span class="emphasis"><em>v</em></span>. Returns the number of matches found.
|
||||
</p>
|
||||
@ -489,7 +491,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the files files
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
using the <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match calls the call-back function cb. If the call-back
|
||||
returns false then the algorithm returns without considering further
|
||||
matches in the current file, or any further files.
|
||||
@ -524,7 +526,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the files files
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
using the <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match calls the call-back function cb.
|
||||
</p>
|
||||
<p>
|
||||
@ -562,7 +564,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Searches files to find all those which contain at least one match
|
||||
of the current expression using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
of the current expression using the <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each matching file calls the call-back function cb. If the
|
||||
call-back returns false then the algorithm returns without considering
|
||||
any further files.
|
||||
@ -597,7 +599,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Searches files to find all those which contain at least one match
|
||||
of the current expression using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
of the current expression using the <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each matching file calls the call-back function cb.
|
||||
</p>
|
||||
<p>
|
||||
@ -641,8 +643,8 @@
|
||||
If <span class="emphasis"><em>copy</em></span> is true then all unmatched sections
|
||||
of input are copied unchanged to output, if the flag <span class="emphasis"><em>format_first_only</em></span>
|
||||
is set then only the first occurance of the pattern found is replaced.
|
||||
Returns the new string. See also <a href="../../format.html" title="Search and Replace Format String Syntax">format
|
||||
string syntax</a>, and <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
|
||||
Returns the new string. See also <a class="link" href="../../format.html" title="Search and Replace Format String Syntax">format
|
||||
string syntax</a>, and <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -669,8 +671,8 @@
|
||||
If <span class="emphasis"><em>copy</em></span> is true then all unmatched sections
|
||||
of input are copied unchanged to output, if the flag <span class="emphasis"><em>format_first_only</em></span>
|
||||
is set then only the first occurance of the pattern found is replaced.
|
||||
Returns the new string. See also <a href="../../format.html" title="Search and Replace Format String Syntax">format
|
||||
string syntax</a>, and <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
|
||||
Returns the new string. See also <a class="link" href="../../format.html" title="Search and Replace Format String Syntax">format
|
||||
string syntax</a>, and <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>regex_format (Deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
||||
<link rel="start" 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">
|
||||
@ -12,7 +12,7 @@
|
||||
<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.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
|
||||
@ -24,21 +24,22 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_format"></a><a href="regex_format.html" title="regex_format (Deprecated)">
|
||||
<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>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The algorithm <code class="computeroutput"><span class="identifier">regex_format</span></code>
|
||||
is deprecated; new code should use <a href="../match_results.html#boost_regex.match_results_format"><code class="computeroutput"><span class="identifier">match_results</span><span class="special"><>::</span><span class="identifier">format</span></code></a> instead. Existing code
|
||||
is deprecated; new code should use <a class="link" href="../match_results.html#boost_regex.match_results_format"><code class="computeroutput"><span class="identifier">match_results</span><span class="special"><>::</span><span class="identifier">format</span></code></a> instead. Existing code
|
||||
will continue to compile, the following documentation is taken from the
|
||||
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="id624460"></a>
|
||||
<a href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm
|
||||
<a name="id2757025"></a>
|
||||
<a class="link" href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm
|
||||
regex_format</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>
|
||||
<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>
|
||||
</pre>
|
||||
<p>
|
||||
The algorithm <code class="computeroutput"><span class="identifier">regex_format</span></code>
|
||||
@ -46,7 +47,8 @@
|
||||
string, <code class="computeroutput"><span class="identifier">regex_format</span></code> can
|
||||
be used for search and replace operations:
|
||||
</p>
|
||||
<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">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<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">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">OutputIterator</span> <span class="identifier">regex_format</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span><span class="special">,</span>
|
||||
@ -71,7 +73,8 @@
|
||||
form, depending upon your compilers capabilities
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">></span> <span class="identifier">regex_format</span>
|
||||
<span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span><span class="special">,</span>
|
||||
@ -125,7 +128,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
An instance of <a href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> obtained
|
||||
An instance of <a class="link" href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> obtained
|
||||
from one of the matching algorithms above, and denoting what matched.
|
||||
</p>
|
||||
</td>
|
||||
@ -158,11 +161,11 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<p>
|
||||
Format flags are described under <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
|
||||
Format flags are described under <a class="link" href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
|
||||
</p>
|
||||
<p>
|
||||
The format string syntax (and available options) is described more fully
|
||||
under <a href="../../format.html" title="Search and Replace Format String Syntax">format strings</a>.
|
||||
under <a class="link" href="../../format.html" title="Search and Replace Format String Syntax">format strings</a>.
|
||||
</p>
|
||||
</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=ISO-8859-1">
|
||||
<title>regex_grep (Deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
||||
<link rel="start" 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)">
|
||||
@ -12,7 +12,7 @@
|
||||
<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.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
|
||||
@ -24,26 +24,28 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_grep"></a><a href="regex_grep.html" title="regex_grep (Deprecated)">
|
||||
<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>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The algorithm <code class="computeroutput"><span class="identifier">regex_grep</span></code>
|
||||
is deprecated in favor of <a href="../regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> which provides
|
||||
is deprecated in favor of <a class="link" href="../regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> which provides
|
||||
a more convenient and standard library friendly interface.
|
||||
</p>
|
||||
<p>
|
||||
The following documentation is taken unchanged from the previous boost
|
||||
release, and will not be updated in future.
|
||||
</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">hpp</span><span class="special">></span>
|
||||
<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>
|
||||
</pre>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">regex_grep</span></code> allows you to
|
||||
search through a bidirectional-iterator range and locate all the (non-overlapping)
|
||||
matches with a given regular expression. The function is declared as:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">regex_grep</span><span class="special">(</span><span class="identifier">Predicate</span> <span class="identifier">foo</span><span class="special">,</span>
|
||||
<span class="identifier">iterator</span> <span class="identifier">first</span><span class="special">,</span>
|
||||
<span class="identifier">iterator</span> <span class="identifier">last</span><span class="special">,</span>
|
||||
@ -56,7 +58,8 @@
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><>&</span></code>
|
||||
in place of a pair of iterators.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">regex_grep</span><span class="special">(</span><span class="identifier">Predicate</span> <span class="identifier">foo</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</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">e</span><span class="special">,</span>
|
||||
@ -101,7 +104,8 @@
|
||||
<p>
|
||||
The general form of the predicate is:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">grep_predicate</span>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">struct</span> <span class="identifier">grep_predicate</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator_type</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">);</span>
|
||||
<span class="special">};</span>
|
||||
@ -129,9 +133,10 @@
|
||||
(if Boost.Regex is configured in non-recursive mode).
|
||||
</p>
|
||||
<p>
|
||||
Example: convert the example from <a href="../regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a> to use <code class="computeroutput"><span class="identifier">regex_grep</span></code> instead:
|
||||
Example: convert the example from <a class="link" href="../regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a> to use <code class="computeroutput"><span class="identifier">regex_grep</span></code> instead:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<pre class="programlisting">
|
||||
<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">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>
|
||||
|
||||
@ -193,7 +198,8 @@
|
||||
Example: Use <code class="computeroutput"><span class="identifier">regex_grep</span></code>
|
||||
to call a global callback function:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<pre class="programlisting">
|
||||
<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">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>
|
||||
|
||||
@ -253,7 +259,8 @@
|
||||
to call a class member function, use the standard library adapters <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">mem_fun</span></code> and <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bind1st</span></code>
|
||||
to convert the member function into a predicate:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<pre class="programlisting">
|
||||
<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">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>
|
||||
@ -306,7 +313,8 @@
|
||||
Finally, C++ Builder users can use C++ Builder's closure type as a callback
|
||||
argument:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<pre class="programlisting">
|
||||
<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">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>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>regex_split (deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
||||
<link rel="start" 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)">
|
||||
@ -12,7 +12,7 @@
|
||||
<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.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
|
||||
@ -24,26 +24,28 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_split"></a><a href="regex_split.html" title="regex_split (deprecated)">
|
||||
<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>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The algorithm <a href="regex_split.html" title="regex_split (deprecated)"><code class="computeroutput"><span class="identifier">regex_split</span></code></a> has been deprecated
|
||||
in favor of the iterator <a href="../regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> which has
|
||||
The algorithm <a class="link" href="regex_split.html" title="regex_split (deprecated)"><code class="computeroutput"><span class="identifier">regex_split</span></code></a> has been deprecated
|
||||
in favor of the iterator <a class="link" href="../regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> which has
|
||||
a more flexible and powerful interface, as well as following the more usual
|
||||
standard library "pull" rather than "push" semantics.
|
||||
</p>
|
||||
<p>
|
||||
Code which uses <a href="regex_split.html" title="regex_split (deprecated)"><code class="computeroutput"><span class="identifier">regex_split</span></code></a> will continue to compile,
|
||||
Code which uses <a class="link" href="regex_split.html" title="regex_split (deprecated)"><code class="computeroutput"><span class="identifier">regex_split</span></code></a> will continue to compile,
|
||||
the following documentation is taken from a previous Boost.Regex version:
|
||||
</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">hpp</span><span class="special">></span>
|
||||
<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>
|
||||
</pre>
|
||||
<p>
|
||||
Algorithm <a href="regex_split.html" title="regex_split (deprecated)"><code class="computeroutput"><span class="identifier">regex_split</span></code></a> performs a similar
|
||||
Algorithm <a class="link" href="regex_split.html" title="regex_split (deprecated)"><code class="computeroutput"><span class="identifier">regex_split</span></code></a> performs a similar
|
||||
operation to the perl split operation, and comes in three overloaded forms:
|
||||
</p>
|
||||
<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">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits2</span><span class="special">></span>
|
||||
<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">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits2</span><span class="special">></span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">regex_split</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits1</span><span class="special">,</span> <span class="identifier">Alloc1</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits2</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
@ -88,7 +90,8 @@
|
||||
the input string into a series of tokens, and remove each token from the
|
||||
string <span class="emphasis"><em>s</em></span>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">unsigned</span> <span class="identifier">tokenise</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>&</span> <span class="identifier">l</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">)</span>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">unsigned</span> <span class="identifier">tokenise</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>&</span> <span class="identifier">l</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_split</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">l</span><span class="special">),</span> <span class="identifier">s</span><span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
@ -97,7 +100,8 @@
|
||||
Example: the following short program will extract all of the URL's from
|
||||
a html file, and print them out to cout:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">list</span><span class="special">></span>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">list</span><span class="special">></span>
|
||||
<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="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>
|
||||
|
Reference in New Issue
Block a user