mirror of
https://github.com/boostorg/regex.git
synced 2025-07-02 15:20:58 +02:00
added license info in copyright notice at the footer
[SVN r40867]
This commit is contained in:
@ -1,12 +1,14 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>High Level Class RegEx (Deprecated)</title>
|
||||
<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.66.1">
|
||||
<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)">
|
||||
<link rel="prev" href="regex_split.html" title="
|
||||
regex_split (deprecated)">
|
||||
<link rel="next" href="../../background_information.html" title="Background Information">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@ -24,9 +26,9 @@
|
||||
</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
|
||||
Level Class RegEx (Deprecated)</a>
|
||||
</h4></div></div></div>
|
||||
<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>
|
||||
The high level wrapper class RegEx is now deprecated and does not form
|
||||
part of the regular expression standardization proposal. This type still
|
||||
@ -136,7 +138,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">RegEx</span><span class="special">();</span></code>
|
||||
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">();</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -149,7 +151,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&</span> <span class="identifier">o</span><span class="special">);</span></code>
|
||||
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&</span> <span class="identifier">o</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -162,40 +164,40 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">c</span><span class="special">,</span> <span class="keyword">bool</span>
|
||||
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">c</span><span class="special">,</span> <span class="keyword">bool</span>
|
||||
<span class="identifier">icase</span> <span class="special">=</span>
|
||||
<span class="keyword">false</span><span class="special">);</span></code>
|
||||
<span class="keyword">false</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<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 href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span>
|
||||
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span>
|
||||
<span class="identifier">icase</span> <span class="special">=</span>
|
||||
<span class="keyword">false</span><span class="special">);</span></code>
|
||||
<span class="keyword">false</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<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 href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">RegEx</span><span class="special">&</span>
|
||||
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&</span> <span class="identifier">o</span><span class="special">);</span></code>
|
||||
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">&</span>
|
||||
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&</span> <span class="identifier">o</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -207,68 +209,68 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">RegEx</span><span class="special">&</span>
|
||||
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">);</span></code>
|
||||
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">&</span>
|
||||
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</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 <tt 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></tt>. Throws <a href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">RegEx</span><span class="special">&</span>
|
||||
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span></code>
|
||||
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">&</span>
|
||||
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</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 <tt 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></tt>. Throws <a href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">constchar</span><span class="special">*</span>
|
||||
<span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">icase</span>
|
||||
<span class="special">=</span> <span class="keyword">false</span><span class="special">);</span></code>
|
||||
<span class="special">=</span> <span class="keyword">false</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<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 href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">SetExpression</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span>
|
||||
<span class="identifier">icase</span> <span class="special">=</span>
|
||||
<span class="keyword">false</span><span class="special">);</span></code>
|
||||
<span class="keyword">false</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<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 href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Expression</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span></code>
|
||||
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Expression</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -280,17 +282,17 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<span class="keyword">char</span><span class="special">*</span>
|
||||
<span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<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 href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>. Returns
|
||||
<span class="emphasis"><em>true</em></span> if the expression matches the whole of
|
||||
the input string.
|
||||
</p>
|
||||
@ -299,17 +301,17 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span>
|
||||
<span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<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 href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></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>
|
||||
@ -318,17 +320,17 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Search</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Search</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<span class="keyword">char</span><span class="special">*</span>
|
||||
<span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<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 href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>.
|
||||
Returns <span class="emphasis"><em>true</em></span> if the match succeeds.
|
||||
</p>
|
||||
</td>
|
||||
@ -336,17 +338,17 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Search</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Search</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span>
|
||||
<span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<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 href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> flags.
|
||||
Returns <span class="emphasis"><em>true</em></span> if the match succeeds.
|
||||
</p>
|
||||
</td>
|
||||
@ -354,19 +356,19 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">GrepCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="keyword">char</span><span class="special">*</span>
|
||||
<span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<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>.
|
||||
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>
|
||||
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match found calls the call-back function cb as: <tt class="computeroutput"><span class="identifier">cb</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span></tt>
|
||||
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
|
||||
further matches are found. Returns the number of matches found.
|
||||
@ -376,19 +378,19 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">GrepCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span>
|
||||
<span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<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.
|
||||
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>
|
||||
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> flags.
|
||||
For each match found calls the call-back function cb as: <tt class="computeroutput"><span class="identifier">cb</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span></tt>
|
||||
If at any stage the call-back function returns false then the grep
|
||||
operation terminates, otherwise continues until no further matches
|
||||
are found. Returns the number of matches found.
|
||||
@ -398,18 +400,18 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>&</span>
|
||||
<span class="identifier">v</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<span class="identifier">flags</span> <span class="special">=</span>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<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 href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></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>
|
||||
@ -418,18 +420,18 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>&</span>
|
||||
<span class="identifier">v</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<span class="identifier">flags</span> <span class="special">=</span>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<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 href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></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>
|
||||
@ -438,18 +440,18 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="keyword">char</span><span class="special">*</span>
|
||||
<span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<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 href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></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>
|
||||
@ -458,18 +460,18 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span>
|
||||
<span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<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 href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></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>
|
||||
@ -478,20 +480,20 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">GrepFiles</span><span class="special">(</span><span class="identifier">GrepFileCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="keyword">char</span><span class="special">*</span>
|
||||
<span class="identifier">files</span><span class="special">,</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">recurse</span>
|
||||
<span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<span class="identifier">flags</span> <span class="special">=</span>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<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 href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></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.
|
||||
@ -505,7 +507,7 @@
|
||||
Returns the total number of matches found.
|
||||
</p>
|
||||
<p>
|
||||
May throw an exception derived from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
May throw an exception derived from <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
if file io fails.
|
||||
</p>
|
||||
</td>
|
||||
@ -513,20 +515,20 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">GrepFiles</span><span class="special">(</span><span class="identifier">GrepFileCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span>
|
||||
<span class="identifier">files</span><span class="special">,</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">recurse</span>
|
||||
<span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<span class="identifier">flags</span> <span class="special">=</span>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<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 href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match calls the call-back function cb.
|
||||
</p>
|
||||
<p>
|
||||
@ -543,7 +545,7 @@
|
||||
Returns the total number of matches found.
|
||||
</p>
|
||||
<p>
|
||||
May throw an exception derived from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
May throw an exception derived from <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
if file io fails.
|
||||
</p>
|
||||
</td>
|
||||
@ -551,20 +553,20 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">FindFiles</span><span class="special">(</span><span class="identifier">FindFilesCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="keyword">char</span><span class="special">*</span>
|
||||
<span class="identifier">files</span><span class="special">,</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">recurse</span>
|
||||
<span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<span class="identifier">flags</span> <span class="special">=</span>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<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 href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></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.
|
||||
@ -578,7 +580,7 @@
|
||||
Returns the total number of files found.
|
||||
</p>
|
||||
<p>
|
||||
May throw an exception derived from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
May throw an exception derived from <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
if file io fails.
|
||||
</p>
|
||||
</td>
|
||||
@ -586,20 +588,20 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">FindFiles</span><span class="special">(</span><span class="identifier">FindFilesCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span>
|
||||
<span class="identifier">files</span><span class="special">,</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">recurse</span>
|
||||
<span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<span class="identifier">flags</span> <span class="special">=</span>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<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 href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each matching file calls the call-back function cb.
|
||||
</p>
|
||||
<p>
|
||||
@ -615,7 +617,7 @@
|
||||
Returns the total number of files found.
|
||||
</p>
|
||||
<p>
|
||||
May throw an exception derived from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
May throw an exception derived from <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
if file io fails.
|
||||
</p>
|
||||
</td>
|
||||
@ -623,14 +625,14 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Merge</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Merge</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span>
|
||||
<span class="identifier">in</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="keyword">bool</span>
|
||||
<span class="identifier">copy</span> <span class="special">=</span>
|
||||
<span class="keyword">true</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -643,22 +645,22 @@
|
||||
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 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"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Merge</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Merge</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<span class="keyword">char</span><span class="special">*</span>
|
||||
<span class="identifier">in</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="keyword">bool</span>
|
||||
<span class="identifier">copy</span> <span class="special">=</span>
|
||||
<span class="keyword">true</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -671,19 +673,19 @@
|
||||
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 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"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="identifier">Split</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="identifier">Split</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<span class="identifier">flags</span> <span class="special">=</span>
|
||||
<span class="identifier">match_default</span><span class="special">,</span>
|
||||
<span class="keyword">unsigned</span> <span class="identifier">max_count</span>
|
||||
<span class="special">=</span> <span class="special">~</span><span class="number">0</span><span class="special">);</span></code>
|
||||
<span class="special">=</span> <span class="special">~</span><span class="number">0</span><span class="special">);</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -704,17 +706,17 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Position</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span>
|
||||
<span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></code>
|
||||
<span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Returns the position of what matched sub-expression <span class="emphasis"><em>i</em></span>.
|
||||
If <code class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span></code> then returns the position
|
||||
of the whole match. Returns <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></code>
|
||||
If <tt class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span></tt> then returns the position
|
||||
of the whole match. Returns <tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></tt>
|
||||
if the supplied index is invalid, or if the specified sub-expression
|
||||
did not participate in the match.
|
||||
</p>
|
||||
@ -723,16 +725,16 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Length</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span>
|
||||
<span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></code>
|
||||
<span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Returns the length of what matched sub-expression i. If <code class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span></code> then returns the length
|
||||
of the whole match. Returns <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></code>
|
||||
Returns the length of what matched sub-expression i. If <tt class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span></tt> then returns the length
|
||||
of the whole match. Returns <tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></tt>
|
||||
if the supplied index is invalid, or if the specified sub-expression
|
||||
did not participate in the match.
|
||||
</p>
|
||||
@ -741,8 +743,8 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Matched</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></code>
|
||||
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Matched</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -755,23 +757,23 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Line</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span></code>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Line</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Returns the line on which the match occurred, indexes start from
|
||||
1 not zero, if no match occurred then returns <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></code>.
|
||||
1 not zero, if no match occurred then returns <tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></tt>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Marks</span><span class="special">()</span>
|
||||
<span class="keyword">const</span><span class="special">;</span></code>
|
||||
<span class="keyword">const</span><span class="special">;</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -785,14 +787,14 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">What</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></code>
|
||||
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">What</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Returns a copy of what matched sub-expression <span class="emphasis"><em>i</em></span>.
|
||||
If <code class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span></code> then returns a copy of
|
||||
If <tt class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span></tt> then returns a copy of
|
||||
the whole match. Returns a null string if the index is invalid
|
||||
or if the specified sub-expression did not participate in a match.
|
||||
</p>
|
||||
@ -801,13 +803,13 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">int</span>
|
||||
<span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span> <span class="special">;</span></code>
|
||||
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">int</span>
|
||||
<span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span> <span class="special">;</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Returns <code class="computeroutput"><span class="identifier">what</span><span class="special">(</span><span class="identifier">i</span><span class="special">);</span></code>
|
||||
Returns <tt class="computeroutput"><span class="identifier">what</span><span class="special">(</span><span class="identifier">i</span><span class="special">);</span></tt>
|
||||
Can be used to simplify access to sub-expression matches, and make
|
||||
usage more perl-like.
|
||||
</p>
|
||||
@ -818,7 +820,10 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright <20> 2007 John Maddock</small></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,13 +1,15 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>regex_format (Deprecated)</title>
|
||||
<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.66.1">
|
||||
<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">
|
||||
<link rel="next" href="regex_grep.html" title="regex_grep (Deprecated)">
|
||||
<link rel="next" href="regex_grep.html" title="
|
||||
regex_grep (Deprecated)">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@ -24,27 +26,27 @@
|
||||
</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)">
|
||||
regex_format (Deprecated)</a>
|
||||
</h4></div></div></div>
|
||||
<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 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
|
||||
The algorithm <tt class="computeroutput"><span class="identifier">regex_format</span></tt>
|
||||
is deprecated; new code should use <a href="../match_results.html#boost_regex.match_results_format"><tt class="computeroutput"><span class="identifier">match_results</span><span class="special"><>::</span><span class="identifier">format</span></tt></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="id624790"></a>
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format"></a><h4>
|
||||
<a name="id591505"></a>
|
||||
<a href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm
|
||||
regex_format</a>
|
||||
</h5>
|
||||
</h4>
|
||||
<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>
|
||||
The algorithm <tt class="computeroutput"><span class="identifier">regex_format</span></tt>
|
||||
takes the results of a match and creates a new string based upon a format
|
||||
string, <code class="computeroutput"><span class="identifier">regex_format</span></code> can
|
||||
string, <tt class="computeroutput"><span class="identifier">regex_format</span></tt> can
|
||||
be used for search and replace operations:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
@ -60,7 +62,7 @@
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="number">0</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
The library also defines the following convenience variation of <code class="computeroutput"><span class="identifier">regex_format</span></code>, which returns the result
|
||||
The library also defines the following convenience variation of <tt class="computeroutput"><span class="identifier">regex_format</span></tt>, which returns the result
|
||||
directly as a string, rather than outputting to an iterator.
|
||||
</p>
|
||||
<div class="note"><table border="0" summary="Note">
|
||||
@ -68,7 +70,7 @@
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/html/images/note.png"></td>
|
||||
<th align="left">Note</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
<tr><td colspan="2" align="left" valign="top"><p>
|
||||
This version may not be available, or may be available in a more limited
|
||||
form, depending upon your compilers capabilities
|
||||
</p></td></tr>
|
||||
@ -110,7 +112,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">OutputIterator</span> <span class="identifier">out</span></code>
|
||||
<tt class="computeroutput"><span class="identifier">OutputIterator</span> <span class="identifier">out</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -123,12 +125,12 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><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></code>
|
||||
<tt class="computeroutput"><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></tt>
|
||||
</p>
|
||||
</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 href="../match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> obtained
|
||||
from one of the matching algorithms above, and denoting what matched.
|
||||
</p>
|
||||
</td>
|
||||
@ -136,7 +138,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span></code>
|
||||
<tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -149,7 +151,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="identifier">flags</span></code>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="identifier">flags</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -161,16 +163,19 @@
|
||||
</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 href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></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 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>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright <20> 2007 John Maddock</small></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,13 +1,16 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>regex_grep (Deprecated)</title>
|
||||
<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.66.1">
|
||||
<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)">
|
||||
<link rel="next" href="regex_split.html" title="regex_split (deprecated)">
|
||||
<link rel="prev" href="regex_format.html" title="
|
||||
regex_format (Deprecated)">
|
||||
<link rel="next" href="regex_split.html" title="
|
||||
regex_split (deprecated)">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@ -24,12 +27,12 @@
|
||||
</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)">
|
||||
regex_grep (Deprecated)</a>
|
||||
</h4></div></div></div>
|
||||
<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 href="../regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> which provides
|
||||
The algorithm <tt class="computeroutput"><span class="identifier">regex_grep</span></tt>
|
||||
is deprecated in favor of <a href="../regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> which provides
|
||||
a more convenient and standard library friendly interface.
|
||||
</p>
|
||||
<p>
|
||||
@ -40,7 +43,7 @@
|
||||
<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
|
||||
<tt class="computeroutput"><span class="identifier">regex_grep</span></tt> 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>
|
||||
@ -54,8 +57,8 @@
|
||||
</pre>
|
||||
<p>
|
||||
The library also defines the following convenience versions, which take
|
||||
either a <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span></code>, or a <code class="computeroutput"><span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><>&</span></code>
|
||||
either a <tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span></tt>, or a <tt class="computeroutput"><span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><>&</span></tt>
|
||||
in place of a pair of iterators.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
@ -72,7 +75,7 @@
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
The parameters for the primary version of <code class="computeroutput"><span class="identifier">regex_grep</span></code>
|
||||
The parameters for the primary version of <tt class="computeroutput"><span class="identifier">regex_grep</span></tt>
|
||||
have the following meanings:
|
||||
</p>
|
||||
<p>
|
||||
@ -94,9 +97,9 @@
|
||||
</p>
|
||||
<p>
|
||||
The algorithm finds all of the non-overlapping matches of the expression
|
||||
<span class="emphasis"><em>e</em></span>, for each match it fills a <code class="computeroutput"><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">></span></code> structure, which contains information
|
||||
<span class="emphasis"><em>e</em></span>, for each match it fills a <tt class="computeroutput"><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">></span></tt> structure, which contains information
|
||||
on what matched, and calls the predicate <span class="emphasis"><em>foo</em></span>, passing
|
||||
the <code class="computeroutput"><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">></span></code>
|
||||
the <tt class="computeroutput"><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">></span></tt>
|
||||
as a single argument. If the predicate returns <span class="emphasis"><em>true</em></span>,
|
||||
then the grep operation continues, otherwise it terminates without searching
|
||||
for further matches. The function returns the number of matches found.
|
||||
@ -120,12 +123,12 @@
|
||||
utilities would output the results to the screen, another program could
|
||||
index a file based on a regular expression and store a set of bookmarks
|
||||
in a list, or a text file conversion utility would output to file. The
|
||||
results of one <code class="computeroutput"><span class="identifier">regex_grep</span></code>
|
||||
can even be chained into another <code class="computeroutput"><span class="identifier">regex_grep</span></code>
|
||||
results of one <tt class="computeroutput"><span class="identifier">regex_grep</span></tt>
|
||||
can even be chained into another <tt class="computeroutput"><span class="identifier">regex_grep</span></tt>
|
||||
to create recursive parsers.
|
||||
</p>
|
||||
<p>
|
||||
The algorithm may throw <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
The algorithm may throw <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
if the complexity of matching the expression against an <span class="emphasis"><em>N</em></span>
|
||||
character string begins to exceed O(N<sup>2</sup>), or if the program runs out of
|
||||
stack space while matching the expression (if Boost.Regex is configured
|
||||
@ -133,7 +136,7 @@
|
||||
(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 href="../regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> to use <tt class="computeroutput"><span class="identifier">regex_grep</span></tt> instead:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
@ -195,7 +198,7 @@
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<p>
|
||||
Example: Use <code class="computeroutput"><span class="identifier">regex_grep</span></code>
|
||||
Example: Use <tt class="computeroutput"><span class="identifier">regex_grep</span></tt>
|
||||
to call a global callback function:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
@ -255,8 +258,8 @@
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<p>
|
||||
Example: use <code class="computeroutput"><span class="identifier">regex_grep</span></code>
|
||||
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>
|
||||
Example: use <tt class="computeroutput"><span class="identifier">regex_grep</span></tt>
|
||||
to call a class member function, use the standard library adapters <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">mem_fun</span></tt> and <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bind1st</span></tt>
|
||||
to convert the member function into a predicate:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
@ -370,7 +373,10 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright <20> 2007 John Maddock</small></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,13 +1,16 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>regex_split (deprecated)</title>
|
||||
<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.66.1">
|
||||
<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)">
|
||||
<link rel="next" href="old_regex.html" title="High Level Class RegEx (Deprecated)">
|
||||
<link rel="prev" href="regex_grep.html" title="
|
||||
regex_grep (Deprecated)">
|
||||
<link rel="next" href="old_regex.html" title=" High
|
||||
Level Class RegEx (Deprecated)">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@ -24,24 +27,27 @@
|
||||
</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)">
|
||||
regex_split (deprecated)</a>
|
||||
</h4></div></div></div>
|
||||
<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 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 href="regex_split.html" title="
|
||||
regex_split (deprecated)"><tt class="computeroutput"><span class="identifier">regex_split</span></tt></a> has been deprecated
|
||||
in favor of the iterator <a href="../regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></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 href="regex_split.html" title="
|
||||
regex_split (deprecated)"><tt class="computeroutput"><span class="identifier">regex_split</span></tt></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>
|
||||
<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 href="regex_split.html" title="
|
||||
regex_split (deprecated)"><tt class="computeroutput"><span class="identifier">regex_split</span></tt></a> performs a similar
|
||||
operation to the perl split operation, and comes in three overloaded forms:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
@ -63,7 +69,7 @@
|
||||
<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>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><strong>Effects</strong></span>: Each version of the algorithm
|
||||
<span class="bold"><b>Effects</b></span>: Each version of the algorithm
|
||||
takes an output-iterator for output, and a string for input. If the expression
|
||||
contains no marked sub-expressions, then the algorithm writes one string
|
||||
onto the output-iterator for each section of input that does not match
|
||||
@ -74,11 +80,11 @@
|
||||
processed will be deleted from the string <span class="emphasis"><em>s</em></span> (if <span class="emphasis"><em>max_split</em></span>
|
||||
is not reached then all of <span class="emphasis"><em>s</em></span> will be deleted). Returns
|
||||
the number of strings written to the output-iterator. If the parameter
|
||||
<span class="emphasis"><em>max_split</em></span> is not specified then it defaults to <code class="computeroutput"><span class="identifier">UINT_MAX</span></code>. If no expression is specified,
|
||||
<span class="emphasis"><em>max_split</em></span> is not specified then it defaults to <tt class="computeroutput"><span class="identifier">UINT_MAX</span></tt>. If no expression is specified,
|
||||
then it defaults to "\s+", and splitting occurs on whitespace.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
if the complexity of matching the expression against an N character string
|
||||
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while
|
||||
matching the expression (if Boost.Regex is configured in recursive mode),
|
||||
@ -86,7 +92,7 @@
|
||||
is configured in non-recursive mode).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><strong>Example</strong></span>: the following function will split
|
||||
<span class="bold"><b>Example</b></span>: the following function will split
|
||||
the input string into a series of tokens, and remove each token from the
|
||||
string <span class="emphasis"><em>s</em></span>:
|
||||
</p>
|
||||
@ -153,7 +159,10 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright <20> 2007 John Maddock</small></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
Reference in New Issue
Block a user