Merge changes from Trunk.

[SVN r47307]
This commit is contained in:
John Maddock
2008-07-11 11:49:03 +00:00
parent 9546df1f23
commit a08e8b5c85
96 changed files with 1386 additions and 1611 deletions

View File

@ -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 V1.73.2">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<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)">
@ -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 class="link" href="old_regex.html" title="High Level Class RegEx (Deprecated)"> High
<a name="boost_regex.ref.deprecated_interfaces.old_regex"></a><a href="old_regex.html" title="High Level Class RegEx (Deprecated)"> High
Level Class RegEx (Deprecated)</a>
</h4></div></div></div>
<p>
@ -33,8 +33,7 @@
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">&lt;</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">&gt;</span>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<p>
The class RegEx provides a high level simplified interface to the regular
@ -42,8 +41,7 @@
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">&amp;</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">&amp;</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">&amp;</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>
@ -171,7 +169,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 class="link" 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 href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
</p>
</td>
</tr>
@ -187,7 +185,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 class="link" 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 href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
</p>
</td>
</tr>
@ -213,7 +211,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 class="link" 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 href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
</p>
</td>
</tr>
@ -226,7 +224,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 class="link" 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 href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
</p>
</td>
</tr>
@ -244,7 +242,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 class="link" href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
to case. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
</p>
</td>
</tr>
@ -261,7 +259,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 class="link" href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
to case. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
</p>
</td>
</tr>
@ -290,7 +288,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 class="link" 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 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>
@ -309,7 +307,7 @@
<td>
<p>
Attempts to match the current expression against 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> <span class="emphasis"><em>flags</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>.
Returns <span class="emphasis"><em>true</em></span> if the expression matches the
whole of the input string.
</p>
@ -328,7 +326,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 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>.
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>.
Returns <span class="emphasis"><em>true</em></span> if the match succeeds.
</p>
</td>
@ -346,7 +344,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 class="link" 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 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>
@ -365,7 +363,7 @@
<td>
<p>
Finds all matches of the current expression in 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>.
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>.
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
@ -387,7 +385,7 @@
<td>
<p>
Finds all matches of the current expression in 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.
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.
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
@ -409,7 +407,7 @@
<td>
<p>
Finds all matches of the current expression in 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> flags.
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.
For each match pushes a copy of what matched onto <span class="emphasis"><em>v</em></span>.
Returns the number of matches found.
</p>
@ -429,7 +427,7 @@
<td>
<p>
Finds all matches of the current expression in 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> <span class="emphasis"><em>flags</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>.
For each match pushes a copy of what matched onto <span class="emphasis"><em>v</em></span>.
Returns the number of matches found.
</p>
@ -449,7 +447,7 @@
<td>
<p>
Finds all matches of the current expression in 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>.
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>.
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>
@ -469,7 +467,7 @@
<td>
<p>
Finds all matches of the current expression in 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> <span class="emphasis"><em>flags</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>.
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>
@ -491,7 +489,7 @@
<td>
<p>
Finds all matches of the current expression in the files files
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>.
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>.
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.
@ -526,7 +524,7 @@
<td>
<p>
Finds all matches of the current expression in the files files
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>.
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>.
For each match calls the call-back function cb.
</p>
<p>
@ -564,7 +562,7 @@
<td>
<p>
Searches files to find all those which contain at least one match
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>.
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>.
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.
@ -599,7 +597,7 @@
<td>
<p>
Searches files to find all those which contain at least one match
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>.
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>.
For each matching file calls the call-back function cb.
</p>
<p>
@ -643,8 +641,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 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>.
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>.
</p>
</td>
</tr>
@ -671,8 +669,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 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>.
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>.
</p>
</td>
</tr>

View File

@ -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 V1.73.2">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<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">
@ -24,22 +24,21 @@
</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 class="link" href="regex_format.html" title="regex_format (Deprecated)">
<a name="boost_regex.ref.deprecated_interfaces.regex_format"></a><a 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 class="link" href="../match_results.html#boost_regex.match_results_format"><code class="computeroutput"><span class="identifier">match_results</span><span class="special">&lt;&gt;::</span><span class="identifier">format</span></code></a> instead. Existing 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">&lt;&gt;::</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="id2757025"></a>
<a class="link" href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm
<a name="id624460"></a>
<a 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">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<p>
The algorithm <code class="computeroutput"><span class="identifier">regex_format</span></code>
@ -47,8 +46,7 @@
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">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="identifier">OutputIterator</span> <span class="identifier">regex_format</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span><span class="special">,</span>
@ -73,8 +71,7 @@
form, depending upon your compilers capabilities
</p></td></tr>
</table></div>
<pre class="programlisting">
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">&gt;</span> <span class="identifier">regex_format</span>
<span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span><span class="special">,</span>
@ -128,7 +125,7 @@
</td>
<td>
<p>
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
An instance of <a 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>
@ -161,11 +158,11 @@
</tbody>
</table></div>
<p>
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>.
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>.
</p>
<p>
The format string syntax (and available options) is described more fully
under <a class="link" href="../../format.html" title="Search and Replace Format String Syntax">format strings</a>.
under <a 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>

View File

@ -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 V1.73.2">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<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)">
@ -24,28 +24,26 @@
</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 class="link" href="regex_grep.html" title="regex_grep (Deprecated)">
<a name="boost_regex.ref.deprecated_interfaces.regex_grep"></a><a 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 class="link" 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 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">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</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">&lt;</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">&gt;</span>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</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">&gt;</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>
@ -58,8 +56,7 @@
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;&gt;&amp;</span></code>
in place of a pair of iterators.
</p>
<pre class="programlisting">
<span class="keyword">template</span> <span class="special">&lt;</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">&gt;</span>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</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">&gt;</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">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
@ -104,8 +101,7 @@
<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">&lt;</span><span class="identifier">iterator_type</span><span class="special">&gt;&amp;</span> <span class="identifier">m</span><span class="special">);</span>
<span class="special">};</span>
@ -133,10 +129,9 @@
(if Boost.Regex is configured in non-recursive mode).
</p>
<p>
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:
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:
</p>
<pre class="programlisting">
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@ -198,8 +193,7 @@
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">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@ -259,8 +253,7 @@
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">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">functional</span><span class="special">&gt;</span>
@ -313,8 +306,7 @@
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">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">functional</span><span class="special">&gt;</span>

View File

@ -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 V1.73.2">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<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)">
@ -24,28 +24,26 @@
</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 class="link" href="regex_split.html" title="regex_split (deprecated)">
<a name="boost_regex.ref.deprecated_interfaces.regex_split"></a><a href="regex_split.html" title="regex_split (deprecated)">
regex_split (deprecated)</a>
</h4></div></div></div>
<p>
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
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
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 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,
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,
the following documentation is taken from a previous Boost.Regex version:
</p>
<pre class="programlisting">
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<p>
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
Algorithm <a 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">&lt;</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">&gt;</span>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">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">&gt;</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">&lt;</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">&gt;&amp;</span> <span class="identifier">s</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits2</span><span class="special">&gt;&amp;</span> <span class="identifier">e</span><span class="special">,</span>
@ -90,8 +88,7 @@
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">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;&amp;</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">&amp;</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">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;&amp;</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">&amp;</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>
@ -100,8 +97,7 @@
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">&lt;</span><span class="identifier">list</span><span class="special">&gt;</span>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">list</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">fstream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>