Compare commits

...

5 Commits

Author SHA1 Message Date
8746a238d8 This commit was manufactured by cvs2svn to create tag
'Version_1_31_0'.

[SVN r22162]
2004-02-04 15:24:32 +00:00
d717e0a962 Fixed typos reported in release candidate.
[SVN r22161]
2004-02-04 15:24:31 +00:00
8a2e6a5dfb Added more tests to catch some additional regressions.
[SVN r21526]
2004-01-07 12:02:58 +00:00
b984803077 Added last minute patch for .*?$ failing in the non-recursive algorithm.
[SVN r21525]
2004-01-07 12:00:51 +00:00
a952ab8c15 This commit was manufactured by cvs2svn to create branch 'RC_1_31_0'.
[SVN r21427]
2003-12-30 12:10:04 +00:00
12 changed files with 913 additions and 1175 deletions

View File

@ -31,7 +31,7 @@
character sequence.  The behavior of the format flags is descibed in more character sequence.  The behavior of the format flags is descibed in more
detail in the <A href="format_syntax.html">format syntax guide</A>.</p> detail in the <A href="format_syntax.html">format syntax guide</A>.</p>
<pre> <pre>
namespace std{ namespace regex_constants{ namespace boost{ namespace regex_constants{
typedef bitmask_type match_flag_type; typedef bitmask_type match_flag_type;
@ -59,7 +59,7 @@ static const match_flag_type format_first_only;
static const match_flag_type format_all; static const match_flag_type format_all;
} // namespace regex_constants } // namespace regex_constants
} // namespace std } // namespace boost
</pre> </pre>
<h3>Description</h3> <h3>Description</h3>
<p>The type <code>match_flag_type</code> is an implementation defined bitmask type <p>The type <code>match_flag_type</code> is an implementation defined bitmask type
@ -271,10 +271,10 @@ static const match_flag_type format_all;
<br> <br>
<p>Revised <p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
24 Oct 2003 04 Feb 2004
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p> <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i><EFBFBD> Copyright John Maddock&nbsp;1998- <p><i><EFBFBD> Copyright John Maddock&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2004<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<P><I>Use, modification and distribution are subject to the Boost Software License, <P><I>Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A> Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>

View File

@ -1,55 +1,42 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html> <html>
<head> <head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title>Boost.Regex: class RegEx (deprecated)</title> <title>Boost.Regex: class RegEx (deprecated)</title>
<meta http-equiv="Content-Type" content= <meta name="generator" content="HTML Tidy, see www.w3.org">
"text/html; charset=iso-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../../boost.css"> <link rel="stylesheet" type="text/css" href="../../../boost.css">
</head> </head>
<body> <body>
<p></p> <p></p>
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
border="0">
<tr> <tr>
<td valign="top" width="300"> <td valign="top" width="300">
<h3><a href="../../../index.htm"><img height="86" width="277" alt= <h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
</td> </td>
<td width="353"> <td width="353">
<h1 align="center">Boost.Regex</h1> <h1 align="center">Boost.Regex</h1>
<h2 align="center">class RegEx (deprecated)</h2> <h2 align="center">class RegEx (deprecated)</h2>
</td> </td>
<td width="50"> <td width="50">
<h3><a href="index.html"><img height="45" width="43" alt= <h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
</td> </td>
</tr> </tr>
</table> </table>
<br> <br>
<br> <br>
<hr> <hr>
<p>The high level wrapper class RegEx is now deprecated and does <p>The high level wrapper class RegEx is now deprecated and does not form a part
not form a part of the <a href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm"> of the <a href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">regular
regular expression standardization proposal</a>.&nbsp; This type expression standardization proposal</a>.&nbsp; This type still exists, and
still exists, and existing code will continue to compile, however existing code will continue to compile, however the following documentation is
the following documentation is unlikely to be further updated.</p> unlikely to be further updated.</p>
<pre> <pre>
#include &lt;boost/cregex.hpp&gt; #include &lt;boost/cregex.hpp&gt;
</pre> </pre>
<p>The class RegEx provides a high level simplified interface to the regular
<p>The class RegEx provides a high level simplified interface to expression library, this class only handles narrow character strings, and
the regular expression library, this class only handles narrow regular expressions always follow the "normal" syntax - that is the same as the
character strings, and regular expressions always follow the perl / ECMAScript synatx.</p>
"normal" syntax - that is the same as the perl / ECMAScript
synatx.</p>
<pre> <pre>
<b>typedef</b> <b>bool</b> (*GrepCallback)(<b>const</b> RegEx&amp; expression); <b>typedef</b> <b>bool</b> (*GrepCallback)(<b>const</b> RegEx&amp; expression);
<b>typedef</b> <b>bool</b> (*GrepFileCallback)(<b>const</b> <b>char</b>* file, <b>const</b> RegEx&amp; expression); <b>typedef</b> <b>bool</b> (*GrepFileCallback)(<b>const</b> <b>char</b>* file, <b>const</b> RegEx&amp; expression);
@ -72,23 +59,23 @@ synatx.</p>
<font color="#000080"><i>// <font color="#000080"><i>//
</i> <i>// now matching operators:</i> </i> <i>// now matching operators:</i>
<i>//</i></font> <i>//</i></font>
<b>bool</b> Match(<b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default); <b>bool</b> Match(<b>const</b> <b>char</b>* p, boost::match_flag_type flags = match_default);
<b>bool</b> Match(<b>const</b> std::string&amp; s, <b>unsigned</b> <b>int</b> flags = match_default); <b>bool</b> Match(<b>const</b> std::string&amp; s, boost::match_flag_type flags = match_default);
<b>bool</b> Search(<b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default); <b>bool</b> Search(<b>const</b> <b>char</b>* p, boost::match_flag_type flags = match_default);
<b>bool</b> Search(<b>const</b> std::string&amp; s, <b>unsigned</b> <b>int</b> flags = match_default); <b>bool</b> Search(<b>const</b> std::string&amp; s, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b> <b>char</b>* p, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b> std::string&amp; s, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b> std::string&amp; s, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> Grep(std::vector&lt;std::string&gt;&amp; v, <b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> Grep(std::vector&lt;std::string&gt;&amp; v, <b>const</b> <b>char</b>* p, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> Grep(std::vector&lt;std::string&gt;&amp; v, <b>const</b> std::string&amp; s, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> Grep(std::vector&lt;std::string&gt;&amp; v, <b>const</b> std::string&amp; s, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> Grep(std::vector&lt;<b>unsigned</b> <b>int</b>&gt;&amp; v, <b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> Grep(std::vector&lt;<b>unsigned</b> <b>int</b>&gt;&amp; v, <b>const</b> <b>char</b>* p, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> Grep(std::vector&lt;<b>unsigned</b> <b>int</b>&gt;&amp; v, <b>const</b> std::string&amp; s, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> Grep(std::vector&lt;<b>unsigned</b> <b>int</b>&gt;&amp; v, <b>const</b> std::string&amp; s, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback cb, <b>const</b> std::string&amp; files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback cb, <b>const</b> std::string&amp; files, <b>bool</b> recurse = <b>false</b>, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback cb, <b>const</b> std::string&amp; files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback cb, <b>const</b> std::string&amp; files, <b>bool</b> recurse = <b>false</b>, boost::match_flag_type flags = match_default);
std::string Merge(<b>const</b> std::string&amp; in, <b>const</b> std::string&amp; fmt, <b>bool</b> copy = <b>true</b>, <b>unsigned</b> <b>int</b> flags = match_default); std::string Merge(<b>const</b> std::string&amp; in, <b>const</b> std::string&amp; fmt, <b>bool</b> copy = <b>true</b>, boost::match_flag_type flags = match_default);
std::string Merge(<b>const</b> char* in, <b>const</b> char* fmt, <b>bool</b> copy = <b>true</b>, <b>unsigned int</b> flags = match_default); std::string Merge(<b>const</b> char* in, <b>const</b> char* fmt, <b>bool</b> copy = <b>true</b>, boost::match_flag_type flags = match_default);
<b>unsigned</b> Split(std::vector&lt;std::string&gt;&amp; v, std::string&amp; s, <b>unsigned</b> flags = match_default, <b>unsigned</b> max_count = ~0); <b>unsigned</b> Split(std::vector&lt;std::string&gt;&amp; v, std::string&amp; s, boost::match_flag_type flags = match_default, <b>unsigned</b> max_count = ~0);
<font color="#000080"><i>// <font color="#000080"><i>//
</i> <i>// now operators for returning what matched in more detail: </i> <i>// now operators for returning what matched in more detail:
</i> <i>// </i> <i>//
@ -103,509 +90,392 @@ synatx.</p>
<strong>static const unsigned int</strong> npos; <strong>static const unsigned int</strong> npos;
}; };
</pre> </pre>
<p>Member functions for class RegEx are defined as follows:<br> <p>Member functions for class RegEx are defined as follows:<br>
&nbsp;</p> &nbsp;</p>
<p></p> <p></p>
<table id="Table2" cellspacing="0" cellpadding="7" width="100%" border="0">
<table id="Table2" cellspacing="0" cellpadding="7" width="100%"
border="0">
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx();</td> <td valign="top" width="43%">RegEx();</td>
<td valign="top" width="42%">Default constructor, constructs an <td valign="top" width="42%">Default constructor, constructs an instance of RegEx
instance of RegEx without any valid expression.</td> without any valid expression.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx(<b>const</b> RegEx&amp; o);</td> <td valign="top" width="43%">RegEx(<b>const</b> RegEx&amp; o);</td>
<td valign="top" width="42%">Copy constructor, all the properties <td valign="top" width="42%">Copy constructor, all the properties of parameter <i>o</i>
of parameter <i>o</i> are copied.</td> are copied.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx(<b>const</b> <b>char</b>* c, <b> <td valign="top" width="43%">RegEx(<b>const</b> <b>char</b>* c, <b>bool</b> icase
bool</b> icase = <b>false</b>);</td> = <b>false</b>);</td>
<td valign="top" width="42%">Constructs an instance of RegEx, <td valign="top" width="42%">Constructs an instance of RegEx, setting the
setting the expression to <i>c</i>, if <i>icase</i> is <i>true</i> expression to <i>c</i>, if <i>icase</i> is <i>true</i> then matching is
then matching is insensitive to case, otherwise it is sensitive to insensitive to case, otherwise it is sensitive to case. Throws <i>bad_expression</i>
case. Throws <i>bad_expression</i> on failure.</td> on failure.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx(<b>const</b> std::string&amp; s, <td valign="top" width="43%">RegEx(<b>const</b> std::string&amp; s, <b>bool</b> icase
<b>bool</b> icase = <b>false</b>);</td> = <b>false</b>);</td>
<td valign="top" width="42%">Constructs an instance of RegEx, <td valign="top" width="42%">Constructs an instance of RegEx, setting the
setting the expression to <i>s</i>, if <i>icase</i> is <i>true</i> expression to <i>s</i>, if <i>icase</i> is <i>true</i> then matching is
then matching is insensitive to case, otherwise it is sensitive to insensitive to case, otherwise it is sensitive to case. Throws <i>bad_expression</i>
case. Throws <i>bad_expression</i> on failure.</td> on failure.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx&amp; <b> <td valign="top" width="43%">RegEx&amp; <b>operator</b>=(<b>const</b> RegEx&amp;
operator</b>=(<b>const</b> RegEx&amp; o);</td> o);</td>
<td valign="top" width="42%">Default assignment operator.</td> <td valign="top" width="42%">Default assignment operator.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx&amp; <b> <td valign="top" width="43%">RegEx&amp; <b>operator</b>=(<b>const</b> <b>char</b>*
operator</b>=(<b>const</b> <b>char</b>* p);</td> p);</td>
<td valign="top" width="42%">Assignment operator, equivalent to <td valign="top" width="42%">Assignment operator, equivalent to calling <i>SetExpression(p,
calling <i>SetExpression(p, false).</i> Throws <i> false).</i> Throws <i>bad_expression</i> on failure.</td>
bad_expression</i> on failure.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx&amp; <b> <td valign="top" width="43%">RegEx&amp; <b>operator</b>=(<b>const</b> std::string&amp;
operator</b>=(<b>const</b> std::string&amp; s);</td> s);</td>
<td valign="top" width="42%">Assignment operator, equivalent to <td valign="top" width="42%">Assignment operator, equivalent to calling <i>SetExpression(s,
calling <i>SetExpression(s, false).</i> Throws <i> false).</i> Throws <i>bad_expression</i> on failure.</td>
bad_expression</i> on failure.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> SetExpression(<b>constchar</b>*
SetExpression(<b>constchar</b>* p, <b>bool</b> icase = <b> p, <b>bool</b> icase = <b>false</b>);</td>
false</b>);</td> <td valign="top" width="42%">Sets the current expression to <i>p</i>, if <i>icase</i>
<td valign="top" width="42%">Sets the current expression to <i> is <i>true</i> then matching is insensitive to case, otherwise it is sensitive
p</i>, if <i>icase</i> is <i>true</i> then matching is insensitive to case. Throws <i>bad_expression</i> on failure.</td>
to case, otherwise it is sensitive to case. Throws <i>
bad_expression</i> on failure.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> SetExpression(<b>const</b>
SetExpression(<b>const</b> std::string&amp; s, <b>bool</b> icase = std::string&amp; s, <b>bool</b> icase = <b>false</b>);</td>
<b>false</b>);</td> <td valign="top" width="42%">Sets the current expression to <i>s</i>, if <i>icase</i>
<td valign="top" width="42%">Sets the current expression to <i> is <i>true</i> then matching is insensitive to case, otherwise it is sensitive
s</i>, if <i>icase</i> is <i>true</i> then matching is insensitive to case. Throws <i>bad_expression</i> on failure.</td>
to case, otherwise it is sensitive to case. Throws <i>
bad_expression</i> on failure.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">std::string <td valign="top" width="43%">std::string Expression()<b>const</b>;</td>
Expression()<b>const</b>;</td> <td valign="top" width="42%">Returns a copy of the current regular expression.</td>
<td valign="top" width="42%">Returns a copy of the current regular
expression.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>bool</b> Match(<b>const</b> <b> <td valign="top" width="43%"><b>bool</b> Match(<b>const</b> <b>char</b>* p,
char</b>* p, <b>unsigned</b> <b>int</b> flags = boost::match_flag_type flags = match_default);</td>
match_default);</td> <td valign="top" width="42%">Attempts to match the current expression against the
<td valign="top" width="42%">Attempts to match the current text <i>p</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
expression against the text <i>p</i> using the match flags <i> match flags</a>. Returns <i>true</i> if the expression matches the whole of
flags</i> - see <a href="match_flag_type.html">match flags</a>. the input string.</td>
Returns <i>true</i> if the expression matches the whole of the
input string.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>bool</b> Match(<b>const</b> <td valign="top" width="43%"><b>bool</b> Match(<b>const</b> std::string&amp; s,
std::string&amp; s, <b>unsigned</b> <b>int</b> flags = boost::match_flag_type flags = match_default) ;</td>
match_default) ;</td> <td valign="top" width="42%">Attempts to match the current expression against the
<td valign="top" width="42%">Attempts to match the current text <i>s</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
expression against the text <i>s</i> using the match flags <i> match flags</a>. Returns <i>true</i> if the expression matches the whole of
flags</i> - see <a href="match_flag_type.html">match flags</a>. the input string.</td>
Returns <i>true</i> if the expression matches the whole of the
input string.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>bool</b> Search(<b>const</b> <b> <td valign="top" width="43%"><b>bool</b> Search(<b>const</b> <b>char</b>* p,
char</b>* p, <b>unsigned</b> <b>int</b> flags = boost::match_flag_type flags = match_default);</td>
match_default);</td> <td valign="top" width="42%">Attempts to find a match for the current expression
<td valign="top" width="42%">Attempts to find a match for the somewhere in the text <i>p</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
current expression somewhere in the text <i>p</i> using the match match flags</a>. Returns <i>true</i> if the match succeeds.</td>
flags <i>flags</i> - see <a href="match_flag_type.html">match
flags</a>. Returns <i>true</i> if the match succeeds.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>bool</b> Search(<b>const</b> <td valign="top" width="43%"><b>bool</b> Search(<b>const</b> std::string&amp; s,
std::string&amp; s, <b>unsigned</b> <b>int</b> flags = boost::match_flag_type flags = match_default) ;</td>
match_default) ;</td> <td valign="top" width="42%">Attempts to find a match for the current expression
<td valign="top" width="42%">Attempts to find a match for the somewhere in the text <i>s</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
current expression somewhere in the text <i>s</i> using the match match flags</a>. Returns <i>true</i> if the match succeeds.</td>
flags <i>flags</i> - see <a href="match_flag_type.html">match
flags</a>. Returns <i>true</i> if the match succeeds.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b>
Grep(GrepCallback cb, <b>const</b> <b>char</b>* p, <b>unsigned</b> <b>char</b>* p, boost::match_flag_type flags = match_default);</td>
<b>int</b> flags = match_default);</td> <td valign="top" width="42%">Finds all matches of the current expression in the
<td valign="top" width="42%">Finds all matches of the current text <i>p</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
expression in the text <i>p</i> using the match flags <i>flags</i> match flags</a>. For each match found calls the call-back function <i>cb</i>
- see <a href="match_flag_type.html">match flags</a>. For each as: cb(*this);
match found calls the call-back function <i>cb</i> as: cb(*this); <p>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
<p>If at any stage the call-back function returns false then the number of matches found.</p>
grep operation terminates, otherwise continues until no further
matches are found. Returns the number of matches found.</p>
</td> </td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b>
Grep(GrepCallback cb, <b>const</b> std::string&amp; s, <b> std::string&amp; s, boost::match_flag_type flags = match_default);</td>
unsigned</b> <b>int</b> flags = match_default);</td> <td valign="top" width="42%">Finds all matches of the current expression in the
<td valign="top" width="42%">Finds all matches of the current text <i>s</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
expression in the text <i>s</i> using the match flags <i>flags</i> match flags</a>. For each match found calls the call-back function <i>cb</i>
- see <a href="match_flag_type.html">match flags</a>. For each as: cb(*this);
match found calls the call-back function <i>cb</i> as: cb(*this); <p>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
<p>If at any stage the call-back function returns false then the number of matches found.</p>
grep operation terminates, otherwise continues until no further
matches are found. Returns the number of matches found.</p>
</td> </td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Grep(std::vector&lt;std::string&gt;&amp;
Grep(std::vector&lt;std::string&gt;&amp; v, <b>const</b> <b> v, <b>const</b> <b>char</b>* p, boost::match_flag_type flags = match_default);</td>
char</b>* p, <b>unsigned</b> <b>int</b> flags = <td valign="top" width="42%">Finds all matches of the current expression in the
match_default);</td> text <i>p</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
<td valign="top" width="42%">Finds all matches of the current match flags</a>. For each match pushes a copy of what matched onto <i>v</i>.
expression in the text <i>p</i> using the match flags <i>flags</i>
- see <a href="match_flag_type.html">match flags</a>. For each
match pushes a copy of what matched onto <i>v</i>. Returns the
number of matches found.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
Grep(std::vector&lt;std::string&gt;&amp; v, <b>const</b>
std::string&amp; s, <b>unsigned</b> <b>int</b> flags =
match_default);</td>
<td valign="top" width="42%">Finds all matches of the current
expression in the text <i>s</i> using the match flags <i>flags</i>
- see <a href="match_flag_type.html">match flags</a>. For each
match pushes a copy of what matched onto <i>v</i>. Returns the
number of matches found.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
Grep(std::vector&lt;<b>unsigned int</b>&gt;&amp; v, <b>const</b>
<b>char</b>* p, <b>unsigned</b> <b>int</b> flags =
match_default);</td>
<td valign="top" width="42%">Finds all matches of the current
expression in the text <i>p</i> using the match flags <i>flags</i>
- see <a href="match_flag_type.html">match flags</a>. For each
match pushes the starting index of what matched onto <i>v</i>.
Returns the number of matches found.</td> Returns the number of matches found.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Grep(std::vector&lt;std::string&gt;&amp;
Grep(std::vector&lt;<b>unsigned int</b>&gt;&amp; v, <b>const</b> v, <b>const</b> std::string&amp; s, boost::match_flag_type flags =
std::string&amp; s, <b>unsigned</b> <b>int</b> flags =
match_default);</td> match_default);</td>
<td valign="top" width="42%">Finds all matches of the current <td valign="top" width="42%">Finds all matches of the current expression in the
expression in the text <i>s</i> using the match flags <i>flags</i> text <i>s</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
- see <a href="match_flag_type.html">match flags</a>. For each match flags</a>. For each match pushes a copy of what matched onto <i>v</i>.
match pushes the starting index of what matched onto <i>v</i>.
Returns the number of matches found.</td> Returns the number of matches found.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Grep(std::vector&lt;<b>unsigned
GrepFiles(GrepFileCallback cb, <b>const</b> <b>char</b>* files, <b> int</b>&gt;&amp; v, <b>const</b> <b>char</b>* p, boost::match_flag_type
bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags =
match_default);</td>
<td valign="top" width="42%">Finds all matches of the current
expression in the files <i>files</i> using the match flags <i>
flags</i> - see <a href="match_flag_type.html">match flags</a>. For
each match calls the call-back function cb.&nbsp;
<p>If the call-back returns false then the algorithm returns
without considering further matches in the current file, or any
further files.&nbsp;</p>
<p>The parameter <i>files</i> can include wild card characters '*'
and '?', if the parameter <i>recurse</i> is true then searches
sub-directories for matching file names.&nbsp;</p>
<p>Returns the total number of matches found.</p>
<p>May throw an exception derived from std::runtime_error if file
io fails.</p>
</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
GrepFiles(GrepFileCallback cb, <b>const</b> std::string&amp; files,
<b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b>
flags = match_default);</td> flags = match_default);</td>
<td valign="top" width="42%">Finds all matches of the current <td valign="top" width="42%">Finds all matches of the current expression in the
expression in the files <i>files</i> using the match flags <i> text <i>p</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
flags</i> - see <a href="match_flag_type.html">match flags</a>. For match flags</a>. For each match pushes the starting index of what matched
each match calls the call-back function cb.&nbsp; onto <i>v</i>. Returns the number of matches found.</td>
<p>If the call-back returns false then the algorithm returns
without considering further matches in the current file, or any
further files.&nbsp;</p>
<p>The parameter <i>files</i> can include wild card characters '*'
and '?', if the parameter <i>recurse</i> is true then searches
sub-directories for matching file names.&nbsp;</p>
<p>Returns the total number of matches found.</p>
<p>May throw an exception derived from std::runtime_error if file
io fails.</p>
</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Grep(std::vector&lt;<b>unsigned
FindFiles(FindFilesCallback cb, <b>const</b> <b>char</b>* files, int</b>&gt;&amp; v, <b>const</b> std::string&amp; s, boost::match_flag_type
<b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b>
flags = match_default);</td> flags = match_default);</td>
<td valign="top" width="42%">Searches <i>files</i> to find all <td valign="top" width="42%">Finds all matches of the current expression in the
those which contain at least one match of the current expression text <i>s</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
using the match flags <i>flags</i> - see <a href="match_flag_type.html">match flags</a>. For each matching file match flags</a>. For each match pushes the starting index of what matched
calls the call-back function cb.&nbsp; onto <i>v</i>. Returns the number of matches found.</td>
<td valign="top" width="7%">&nbsp;</td>
<p>If the call-back returns false then the algorithm returns </tr>
without considering any further files.&nbsp;</p> <tr>
<td valign="top" width="7%">&nbsp;</td>
<p>The parameter <i>files</i> can include wild card characters '*' <td valign="top" width="43%"><b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback
and '?', if the parameter <i>recurse</i> is true then searches cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>,
sub-directories for matching file names.&nbsp;</p> boost::match_flag_type flags = match_default);</td>
<td valign="top" width="42%">Finds all matches of the current expression in the
<p>Returns the total number of files found.</p> files <i>files</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
match flags</a>. For each match calls the call-back function cb.&nbsp;
<p>May throw an exception derived from std::runtime_error if file <p>If the call-back returns false then the algorithm returns without considering
io fails.</p> further matches in the current file, or any further files.&nbsp;</p>
<p>The parameter <i>files</i> can include wild card characters '*' and '?', if the
parameter <i>recurse</i> is true then searches sub-directories for matching
file names.&nbsp;</p>
<p>Returns the total number of matches found.</p>
<p>May throw an exception derived from std::runtime_error if file io fails.</p>
</td> </td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback
FindFiles(FindFilesCallback cb, <b>const</b> std::string&amp; cb, <b>const</b> std::string&amp; files, <b>bool</b> recurse = <b>false</b>,
files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b> boost::match_flag_type flags = match_default);</td>
int</b> flags = match_default);</td> <td valign="top" width="42%">Finds all matches of the current expression in the
<td valign="top" width="42%">Searches <i>files</i> to find all files <i>files</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
those which contain at least one match of the current expression match flags</a>. For each match calls the call-back function cb.&nbsp;
using the match flags <i>flags</i> - see <a href="match_flag_type.html">match flags</a>. For each matching file <p>If the call-back returns false then the algorithm returns without considering
calls the call-back function cb.&nbsp; further matches in the current file, or any further files.&nbsp;</p>
<p>The parameter <i>files</i> can include wild card characters '*' and '?', if the
<p>If the call-back returns false then the algorithm returns parameter <i>recurse</i> is true then searches sub-directories for matching
without considering any further files.&nbsp;</p> file names.&nbsp;</p>
<p>Returns the total number of matches found.</p>
<p>The parameter <i>files</i> can include wild card characters '*' <p>May throw an exception derived from std::runtime_error if file io fails.</p>
and '?', if the parameter <i>recurse</i> is true then searches
sub-directories for matching file names.&nbsp;</p>
<p>Returns the total number of files found.</p>
<p>May throw an exception derived from std::runtime_error if file
io fails.</p>
</td> </td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">std::string Merge(<b>const</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback
std::string&amp; in, <b>const</b> std::string&amp; fmt, <b>bool</b> cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>,
copy = <b>true</b>, <b>unsigned</b> <b>int</b> flags = boost::match_flag_type flags = match_default);</td>
<td valign="top" width="42%">Searches <i>files</i> to find all those which contain
at least one match of the current expression using the match flags <i>flags</i>
- see <a href="match_flag_type.html">match flags</a>. For each matching file
calls the call-back function cb.&nbsp;
<p>If the call-back returns false then the algorithm returns without considering
any further files.&nbsp;</p>
<p>The parameter <i>files</i> can include wild card characters '*' and '?', if the
parameter <i>recurse</i> is true then searches sub-directories for matching
file names.&nbsp;</p>
<p>Returns the total number of files found.</p>
<p>May throw an exception derived from std::runtime_error if file io fails.</p>
</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback
cb, <b>const</b> std::string&amp; files, <b>bool</b> recurse = <b>false</b>,
boost::match_flag_type flags = match_default);</td>
<td valign="top" width="42%">Searches <i>files</i> to find all those which contain
at least one match of the current expression using the match flags <i>flags</i>
- see <a href="match_flag_type.html">match flags</a>. For each matching file
calls the call-back function cb.&nbsp;
<p>If the call-back returns false then the algorithm returns without considering
any further files.&nbsp;</p>
<p>The parameter <i>files</i> can include wild card characters '*' and '?', if the
parameter <i>recurse</i> is true then searches sub-directories for matching
file names.&nbsp;</p>
<p>Returns the total number of files found.</p>
<p>May throw an exception derived from std::runtime_error if file io fails.</p>
</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">std::string Merge(<b>const</b> std::string&amp; in, <b>const</b>
std::string&amp; fmt, <b>bool</b> copy = <b>true</b>, boost::match_flag_type
flags = match_default);</td>
<td valign="top" width="42%">Performs a search and replace operation: searches
through the string <i>in</i> for all occurrences of the current expression, for
each occurrence replaces the match with the format string <i>fmt</i>. Uses <i>flags</i>
to determine what gets matched, and how the format string should be treated. If <i>
copy</i> is true then all unmatched sections of input are copied unchanged
to output, if the flag <em>format_first_only</em> is set then only the first
occurance of the pattern found is replaced. Returns the new string. See <a href="format_syntax.html">
also format string syntax</a>, <a href="match_flag_type.html">match flags</a>
and <a href="match_flag_type.html">format flags</a>.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">std::string Merge(<b>const</b> char* in, <b>const</b>
char* fmt, <b>bool</b> copy = <b>true</b>, boost::match_flag_type flags =
match_default);</td> match_default);</td>
<td valign="top" width="42%">Performs a search and replace <td valign="top" width="42%">Performs a search and replace operation: searches
operation: searches through the string <i>in</i> for all through the string <i>in</i> for all occurrences of the current expression, for
occurrences of the current expression, for each occurrence replaces each occurrence replaces the match with the format string <i>fmt</i>. Uses <i>flags</i>
the match with the format string <i>fmt</i>. Uses <i>flags</i> to to determine what gets matched, and how the format string should be treated. If <i>
determine what gets matched, and how the format string should be copy</i> is true then all unmatched sections of input are copied unchanged
treated. If <i>copy</i> is true then all unmatched sections of to output, if the flag <em>format_first_only</em> is set then only the first
input are copied unchanged to output, if the flag <em> occurance of the pattern found is replaced. Returns the new string. See <a href="format_syntax.html">
format_first_only</em> is set then only the first occurance of the also format string syntax</a>, <a href="match_flag_type.html">match flags</a>
pattern found is replaced. Returns the new string. See <a href="format_syntax.html">also format string syntax</a>, <a href="match_flag_type.html">match flags</a> and <a href="match_flag_type.html">format flags</a>.</td> and <a href="match_flag_type.html">format flags</a>.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">std::string Merge(<b>const</b> char*
in, <b>const</b> char* fmt, <b>bool</b> copy = <b>true</b>, <b>
unsigned int</b> flags = match_default);</td>
<td valign="top" width="42%">Performs a search and replace
operation: searches through the string <i>in</i> for all
occurrences of the current expression, for each occurrence replaces
the match with the format string <i>fmt</i>. Uses <i>flags</i> to
determine what gets matched, and how the format string should be
treated. If <i>copy</i> is true then all unmatched sections of
input are copied unchanged to output, if the flag <em>
format_first_only</em> is set then only the first occurance of the
pattern found is replaced. Returns the new string. See <a href="format_syntax.html">also format string syntax</a>, <a href="match_flag_type.html">match flags</a> and <a href="match_flag_type.html">format flags</a>.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td valign="top"><b>unsigned</b> <td valign="top"><b>unsigned</b> Split(std::vector&lt;std::string&gt;&amp; v,
Split(std::vector&lt;std::string&gt;&amp; v, std::string&amp; s, std::string&amp; s, boost::match_flag_type flags = match_default, <b>unsigned</b>
<b>unsigned</b> flags = match_default, <b>unsigned</b> max_count = max_count = ~0);</td>
~0);</td> <td valign="top">Splits the input string and pushes each one onto the vector. If
<td valign="top">Splits the input string and pushes each one onto the expression contains no marked sub-expressions, then one string is outputted
the vector. If the expression contains no marked sub-expressions, for each section of the input that does not match the expression. If the
then one string is outputted for each section of the input that expression does contain marked sub-expressions, then outputs one string for
does not match the expression. If the expression does contain each marked sub-expression each time a match occurs. Outputs no more than <i>max_count</i>
marked sub-expressions, then outputs one string for each marked strings. Before returning, deletes from the input string <i>s</i> all of the
sub-expression each time a match occurs. Outputs no more than <i> input that has been processed (all of the string if <i>max_count</i> was not
max_count</i> strings. Before returning, deletes from the input reached). Returns the number of strings pushed onto the vector.</td>
string <i>s</i> all of the input that has been processed (all of
the string if <i>max_count</i> was not reached). Returns the number
of strings pushed onto the vector.</td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Position(<b>int</b> i = 0)<b>const</b>;</td>
Position(<b>int</b> i = 0)<b>const</b>;</td> <td valign="top" width="42%">Returns the position of what matched sub-expression <i>i</i>.
<td valign="top" width="42%">Returns the position of what matched If <i>i = 0</i> then returns the position of the whole match. Returns
sub-expression <i>i</i>. If <i>i = 0</i> then returns the position RegEx::npos if the supplied index is invalid, or if the specified
of the whole match. Returns RegEx::npos if the supplied index is sub-expression did not participate in the match.</td>
invalid, or if the specified sub-expression did not participate in
the match.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Length(<b>int</b> i = 0)<b>const</b>;</td>
Length(<b>int</b> i = 0)<b>const</b>;</td> <td valign="top" width="42%">Returns the length of what matched sub-expression <i>i</i>.
<td valign="top" width="42%">Returns the length of what matched If <i>i = 0</i> then returns the length of the whole match. Returns RegEx::npos
sub-expression <i>i</i>. If <i>i = 0</i> then returns the length of if the supplied index is invalid, or if the specified sub-expression did not
the whole match. Returns RegEx::npos if the supplied index is participate in the match.</td>
invalid, or if the specified sub-expression did not participate in
the match.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td><strong>bool</strong> Matched(<strong>int</strong> i = <td><strong>bool</strong> Matched(<strong>int</strong> i = 0)<strong>const</strong>;</td>
0)<strong>const</strong>;</td> <td>Returns true if sub-expression <em>i</em> was matched, false otherwise.</td>
<td>Returns true if sub-expression <em>i</em> was matched, false
otherwise.</td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Line()<b>const</b>;</td>
Line()<b>const</b>;</td> <td valign="top" width="42%">Returns the line on which the match occurred, indexes
<td valign="top" width="42%">Returns the line on which the match start from 1 not zero, if no match occurred then returns RegEx::npos.</td>
occurred, indexes start from 1 not zero, if no match occurred then
returns RegEx::npos.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned int</b> Marks() <td valign="top" width="43%"><b>unsigned int</b> Marks() const;</td>
const;</td> <td valign="top" width="42%">Returns the number of marked sub-expressions
<td valign="top" width="42%">Returns the number of marked contained in the expression. Note that this includes the whole match
sub-expressions contained in the expression. Note that this (sub-expression zero), so the value returned is always &gt;= 1.</td>
includes the whole match (sub-expression zero), so the value
returned is always &gt;= 1.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">std::string What(<b>int</b> <td valign="top" width="43%">std::string What(<b>int</b> i)<b>const</b>;</td>
i)<b>const</b>;</td> <td valign="top" width="42%">Returns a copy of what matched sub-expression <i>i</i>.
<td valign="top" width="42%">Returns a copy of what matched If <i>i = 0</i> then returns a copy of the whole match. Returns a null string
sub-expression <i>i</i>. If <i>i = 0</i> then returns a copy of the if the index is invalid or if the specified sub-expression did not participate
whole match. Returns a null string if the index is invalid or if in a match.</td>
the specified sub-expression did not participate in a match.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">std::string <b> <td valign="top" width="43%">std::string <b>operator</b>[](<b>int</b> i)<b>const</b>
operator</b>[](<b>int</b> i)<b>const</b> ;</td> ;</td>
<td valign="top" width="42%">Returns <i>what(i);</i> <td valign="top" width="42%">Returns <i>what(i);</i>
<p>Can be used to simplify access to sub-expression matches, and make usage more
<p>Can be used to simplify access to sub-expression matches, and perl-like.</p>
make usage more perl-like.</p>
</td> </td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
</table> </table>
<br> <br>
<br> <br>
<p></p> <p></p>
<hr> <hr>
<p>Revised <p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
24 Oct 2003 04 Feb 2004
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p> <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i><EFBFBD> Copyright John Maddock&nbsp;1998- <p><i><EFBFBD> Copyright John Maddock&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2004<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<P><I>Use, modification and distribution are subject to the Boost Software License, <P><I>Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A> Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>
</body> </body>
</html> </html>

View File

@ -42,7 +42,7 @@
iterator first, iterator first,
iterator last, iterator last,
<b>const</b> basic_regex&lt;charT, traits, Allocator&gt;&amp; e, <b>const</b> basic_regex&lt;charT, traits, Allocator&gt;&amp; e,
<b>unsigned</b> flags = match_default) boost::match_flag_type flags = match_default)
</pre> </pre>
<p>The library also defines the following convenience versions, which take either <p>The library also defines the following convenience versions, which take either
a const charT*, or a const std::basic_string&lt;&gt;&amp; in place of a pair of a const charT*, or a const std::basic_string&lt;&gt;&amp; in place of a pair of
@ -53,13 +53,13 @@
<b>unsigned</b> <b>int</b> regex_grep(Predicate foo, <b>unsigned</b> <b>int</b> regex_grep(Predicate foo,
<b>const</b> charT* str, <b>const</b> charT* str,
<b>const</b> basic_regex&lt;charT, traits, Allocator&gt;&amp; e, <b>const</b> basic_regex&lt;charT, traits, Allocator&gt;&amp; e,
<b>unsigned</b> flags = match_default); boost::match_flag_type flags = match_default);
<b>template</b> &lt;<b>class</b> Predicate, <b>class</b> ST, <b>class</b> SA, <b>class</b> Allocator, <b>class</b> charT, <b>class</b> traits&gt; <b>template</b> &lt;<b>class</b> Predicate, <b>class</b> ST, <b>class</b> SA, <b>class</b> Allocator, <b>class</b> charT, <b>class</b> traits&gt;
<b>unsigned</b> <b>int</b> regex_grep(Predicate foo, <b>unsigned</b> <b>int</b> regex_grep(Predicate foo,
<b>const</b> std::basic_string&lt;charT, ST, SA&gt;&amp; s, <b>const</b> std::basic_string&lt;charT, ST, SA&gt;&amp; s,
<b>const</b> basic_regex&lt;charT, traits, Allocator&gt;&amp; e, <b>const</b> basic_regex&lt;charT, traits, Allocator&gt;&amp; e,
<b>unsigned</b> flags = match_default); boost::match_flag_type flags = match_default);
</pre> </pre>
<p>The parameters for the primary version of regex_grep have the following <p>The parameters for the primary version of regex_grep have the following
meanings:&nbsp;</p> meanings:&nbsp;</p>
@ -370,11 +370,10 @@ index[std::string(what[5].first, what[5].second) + std::string(what[6].first, wh
<hr> <hr>
<p>Revised <p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
24 Oct 2003 04 Feb 2004
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p> <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i><EFBFBD> Copyright John Maddock&nbsp;1998- <p><i><EFBFBD> Copyright John Maddock&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2004<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<P><I>Use, modification and distribution are subject to the Boost Software License, <P><I>Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A> Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>

View File

@ -294,7 +294,7 @@ void</B> IndexClasses(map_type&amp; m, <B>const</B> std::string&amp; file)
&nbsp;&nbsp; start = file.begin(); &nbsp;&nbsp; start = file.begin();
&nbsp;&nbsp; end = file.end();&nbsp; &nbsp;&nbsp; end = file.end();&nbsp;
&nbsp;&nbsp; &nbsp;&nbsp; boost::<a href="match_results.html">match_results</a>&lt;std::string::const_iterator&gt; what; &nbsp;&nbsp; &nbsp;&nbsp; boost::<a href="match_results.html">match_results</a>&lt;std::string::const_iterator&gt; what;
&nbsp;&nbsp; <B>unsigned</B> <B>int</B> flags = boost::match_default; &nbsp;&nbsp; boost::match_flag_type flags = boost::match_default;
&nbsp;&nbsp; <B>while</B>(regex_search(start, end, what, expression, flags))&nbsp; &nbsp;&nbsp; <B>while</B>(regex_search(start, end, what, expression, flags))&nbsp;
&nbsp;&nbsp; { &nbsp;&nbsp; {
<FONT color=#000080>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <I>// what[0] contains the whole string <FONT color=#000080>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <I>// what[0] contains the whole string
@ -314,11 +314,10 @@ void</B> IndexClasses(map_type&amp; m, <B>const</B> std::string&amp; file)
<HR> <HR>
<p>Revised <p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
24 Oct 2003 04 Feb 2004
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p> <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i><EFBFBD> Copyright John Maddock&nbsp;1998- <p><i><EFBFBD> Copyright John Maddock&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2004<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<P><I>Use, modification and distribution are subject to the Boost Software License, <P><I>Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A> Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>

View File

@ -38,15 +38,15 @@
<PRE><B>template</B> &lt;<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1, <B>class</B> Traits2, <B>class</B> Alloc2&gt; <PRE><B>template</B> &lt;<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1, <B>class</B> Traits2, <B>class</B> Alloc2&gt;
std::size_t regex_split(OutputIterator out,&nbsp; std::size_t regex_split(OutputIterator out,&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::basic_string&lt;charT, Traits1, Alloc1&gt;&amp; s,&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::basic_string&lt;charT, Traits1, Alloc1&gt;&amp; s,&nbsp;
&nbsp;<B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const</B> basic_regex&lt;charT, Traits2, Alloc2&gt;&amp; e, &nbsp;<B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const</B> basic_regex&lt;charT, Traits2, Alloc2&gt;&amp; e,
&nbsp;<B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned</B> flags, &nbsp;<STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</STRONG>boost::match_flag_type flags,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::size_t max_split); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::size_t max_split);
<B>template</B> &lt;<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1, <B>class</B> Traits2, <B>class</B> Alloc2&gt; <B>template</B> &lt;<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1, <B>class</B> Traits2, <B>class</B> Alloc2&gt;
std::size_t regex_split(OutputIterator out,&nbsp; std::size_t regex_split(OutputIterator out,&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::basic_string&lt;charT, Traits1, Alloc1&gt;&amp; s,&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::basic_string&lt;charT, Traits1, Alloc1&gt;&amp; s,&nbsp;
&nbsp;<B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const</B> basic_regex&lt;charT, Traits2, Alloc2&gt;&amp; e, &nbsp;<B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const</B> basic_regex&lt;charT, Traits2, Alloc2&gt;&amp; e,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <B>unsigned</B> flags = match_default); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boost::match_flag_type flags = match_default);
<B>template</B> &lt;<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1&gt; <B>template</B> &lt;<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1&gt;
std::size_t regex_split(OutputIterator out, std::size_t regex_split(OutputIterator out,
@ -134,11 +134,10 @@ boost::regex e(<FONT color=#000080>"&lt;\\s*A\\s+[^&gt;]*href\\s*=\\s*\"([^\"]*)
<HR> <HR>
<p>Revised <p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
24 Oct 2003 04 Feb 2004
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p> <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i><EFBFBD> Copyright John Maddock&nbsp;1998- <p><i><EFBFBD> Copyright John Maddock&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2004<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<P><I>Use, modification and distribution are subject to the Boost Software License, <P><I>Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A> Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>

View File

@ -31,7 +31,7 @@
character sequence.&nbsp; The behavior of the format flags is descibed in more character sequence.&nbsp; The behavior of the format flags is descibed in more
detail in the <A href="format_syntax.html">format syntax guide</A>.</p> detail in the <A href="format_syntax.html">format syntax guide</A>.</p>
<pre> <pre>
namespace std{ namespace regex_constants{ namespace boost{ namespace regex_constants{
typedef bitmask_type match_flag_type; typedef bitmask_type match_flag_type;
@ -59,7 +59,7 @@ static const match_flag_type format_first_only;
static const match_flag_type format_all; static const match_flag_type format_all;
} // namespace regex_constants } // namespace regex_constants
} // namespace std } // namespace boost
</pre> </pre>
<h3>Description</h3> <h3>Description</h3>
<p>The type <code>match_flag_type</code> is an implementation defined bitmask type <p>The type <code>match_flag_type</code> is an implementation defined bitmask type
@ -271,10 +271,10 @@ static const match_flag_type format_all;
<br> <br>
<p>Revised <p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
24 Oct 2003 04 Feb 2004
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p> <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i><EFBFBD> Copyright John Maddock&nbsp;1998- <p><i><EFBFBD> Copyright John Maddock&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2004<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<P><I>Use, modification and distribution are subject to the Boost Software License, <P><I>Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A> Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>

View File

@ -1,55 +1,42 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html> <html>
<head> <head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title>Boost.Regex: class RegEx (deprecated)</title> <title>Boost.Regex: class RegEx (deprecated)</title>
<meta http-equiv="Content-Type" content= <meta name="generator" content="HTML Tidy, see www.w3.org">
"text/html; charset=iso-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../../boost.css"> <link rel="stylesheet" type="text/css" href="../../../boost.css">
</head> </head>
<body> <body>
<p></p> <p></p>
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
border="0">
<tr> <tr>
<td valign="top" width="300"> <td valign="top" width="300">
<h3><a href="../../../index.htm"><img height="86" width="277" alt= <h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
</td> </td>
<td width="353"> <td width="353">
<h1 align="center">Boost.Regex</h1> <h1 align="center">Boost.Regex</h1>
<h2 align="center">class RegEx (deprecated)</h2> <h2 align="center">class RegEx (deprecated)</h2>
</td> </td>
<td width="50"> <td width="50">
<h3><a href="index.html"><img height="45" width="43" alt= <h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
</td> </td>
</tr> </tr>
</table> </table>
<br> <br>
<br> <br>
<hr> <hr>
<p>The high level wrapper class RegEx is now deprecated and does <p>The high level wrapper class RegEx is now deprecated and does not form a part
not form a part of the <a href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm"> of the <a href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">regular
regular expression standardization proposal</a>.&nbsp; This type expression standardization proposal</a>.&nbsp; This type still exists, and
still exists, and existing code will continue to compile, however existing code will continue to compile, however the following documentation is
the following documentation is unlikely to be further updated.</p> unlikely to be further updated.</p>
<pre> <pre>
#include &lt;boost/cregex.hpp&gt; #include &lt;boost/cregex.hpp&gt;
</pre> </pre>
<p>The class RegEx provides a high level simplified interface to the regular
<p>The class RegEx provides a high level simplified interface to expression library, this class only handles narrow character strings, and
the regular expression library, this class only handles narrow regular expressions always follow the "normal" syntax - that is the same as the
character strings, and regular expressions always follow the perl / ECMAScript synatx.</p>
"normal" syntax - that is the same as the perl / ECMAScript
synatx.</p>
<pre> <pre>
<b>typedef</b> <b>bool</b> (*GrepCallback)(<b>const</b> RegEx&amp; expression); <b>typedef</b> <b>bool</b> (*GrepCallback)(<b>const</b> RegEx&amp; expression);
<b>typedef</b> <b>bool</b> (*GrepFileCallback)(<b>const</b> <b>char</b>* file, <b>const</b> RegEx&amp; expression); <b>typedef</b> <b>bool</b> (*GrepFileCallback)(<b>const</b> <b>char</b>* file, <b>const</b> RegEx&amp; expression);
@ -72,23 +59,23 @@ synatx.</p>
<font color="#000080"><i>// <font color="#000080"><i>//
</i> <i>// now matching operators:</i> </i> <i>// now matching operators:</i>
<i>//</i></font> <i>//</i></font>
<b>bool</b> Match(<b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default); <b>bool</b> Match(<b>const</b> <b>char</b>* p, boost::match_flag_type flags = match_default);
<b>bool</b> Match(<b>const</b> std::string&amp; s, <b>unsigned</b> <b>int</b> flags = match_default); <b>bool</b> Match(<b>const</b> std::string&amp; s, boost::match_flag_type flags = match_default);
<b>bool</b> Search(<b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default); <b>bool</b> Search(<b>const</b> <b>char</b>* p, boost::match_flag_type flags = match_default);
<b>bool</b> Search(<b>const</b> std::string&amp; s, <b>unsigned</b> <b>int</b> flags = match_default); <b>bool</b> Search(<b>const</b> std::string&amp; s, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b> <b>char</b>* p, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b> std::string&amp; s, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b> std::string&amp; s, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> Grep(std::vector&lt;std::string&gt;&amp; v, <b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> Grep(std::vector&lt;std::string&gt;&amp; v, <b>const</b> <b>char</b>* p, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> Grep(std::vector&lt;std::string&gt;&amp; v, <b>const</b> std::string&amp; s, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> Grep(std::vector&lt;std::string&gt;&amp; v, <b>const</b> std::string&amp; s, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> Grep(std::vector&lt;<b>unsigned</b> <b>int</b>&gt;&amp; v, <b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> Grep(std::vector&lt;<b>unsigned</b> <b>int</b>&gt;&amp; v, <b>const</b> <b>char</b>* p, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> Grep(std::vector&lt;<b>unsigned</b> <b>int</b>&gt;&amp; v, <b>const</b> std::string&amp; s, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> Grep(std::vector&lt;<b>unsigned</b> <b>int</b>&gt;&amp; v, <b>const</b> std::string&amp; s, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback cb, <b>const</b> std::string&amp; files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback cb, <b>const</b> std::string&amp; files, <b>bool</b> recurse = <b>false</b>, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>, boost::match_flag_type flags = match_default);
<b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback cb, <b>const</b> std::string&amp; files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default); <b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback cb, <b>const</b> std::string&amp; files, <b>bool</b> recurse = <b>false</b>, boost::match_flag_type flags = match_default);
std::string Merge(<b>const</b> std::string&amp; in, <b>const</b> std::string&amp; fmt, <b>bool</b> copy = <b>true</b>, <b>unsigned</b> <b>int</b> flags = match_default); std::string Merge(<b>const</b> std::string&amp; in, <b>const</b> std::string&amp; fmt, <b>bool</b> copy = <b>true</b>, boost::match_flag_type flags = match_default);
std::string Merge(<b>const</b> char* in, <b>const</b> char* fmt, <b>bool</b> copy = <b>true</b>, <b>unsigned int</b> flags = match_default); std::string Merge(<b>const</b> char* in, <b>const</b> char* fmt, <b>bool</b> copy = <b>true</b>, boost::match_flag_type flags = match_default);
<b>unsigned</b> Split(std::vector&lt;std::string&gt;&amp; v, std::string&amp; s, <b>unsigned</b> flags = match_default, <b>unsigned</b> max_count = ~0); <b>unsigned</b> Split(std::vector&lt;std::string&gt;&amp; v, std::string&amp; s, boost::match_flag_type flags = match_default, <b>unsigned</b> max_count = ~0);
<font color="#000080"><i>// <font color="#000080"><i>//
</i> <i>// now operators for returning what matched in more detail: </i> <i>// now operators for returning what matched in more detail:
</i> <i>// </i> <i>//
@ -103,509 +90,392 @@ synatx.</p>
<strong>static const unsigned int</strong> npos; <strong>static const unsigned int</strong> npos;
}; };
</pre> </pre>
<p>Member functions for class RegEx are defined as follows:<br> <p>Member functions for class RegEx are defined as follows:<br>
&nbsp;</p> &nbsp;</p>
<p></p> <p></p>
<table id="Table2" cellspacing="0" cellpadding="7" width="100%" border="0">
<table id="Table2" cellspacing="0" cellpadding="7" width="100%"
border="0">
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx();</td> <td valign="top" width="43%">RegEx();</td>
<td valign="top" width="42%">Default constructor, constructs an <td valign="top" width="42%">Default constructor, constructs an instance of RegEx
instance of RegEx without any valid expression.</td> without any valid expression.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx(<b>const</b> RegEx&amp; o);</td> <td valign="top" width="43%">RegEx(<b>const</b> RegEx&amp; o);</td>
<td valign="top" width="42%">Copy constructor, all the properties <td valign="top" width="42%">Copy constructor, all the properties of parameter <i>o</i>
of parameter <i>o</i> are copied.</td> are copied.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx(<b>const</b> <b>char</b>* c, <b> <td valign="top" width="43%">RegEx(<b>const</b> <b>char</b>* c, <b>bool</b> icase
bool</b> icase = <b>false</b>);</td> = <b>false</b>);</td>
<td valign="top" width="42%">Constructs an instance of RegEx, <td valign="top" width="42%">Constructs an instance of RegEx, setting the
setting the expression to <i>c</i>, if <i>icase</i> is <i>true</i> expression to <i>c</i>, if <i>icase</i> is <i>true</i> then matching is
then matching is insensitive to case, otherwise it is sensitive to insensitive to case, otherwise it is sensitive to case. Throws <i>bad_expression</i>
case. Throws <i>bad_expression</i> on failure.</td> on failure.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx(<b>const</b> std::string&amp; s, <td valign="top" width="43%">RegEx(<b>const</b> std::string&amp; s, <b>bool</b> icase
<b>bool</b> icase = <b>false</b>);</td> = <b>false</b>);</td>
<td valign="top" width="42%">Constructs an instance of RegEx, <td valign="top" width="42%">Constructs an instance of RegEx, setting the
setting the expression to <i>s</i>, if <i>icase</i> is <i>true</i> expression to <i>s</i>, if <i>icase</i> is <i>true</i> then matching is
then matching is insensitive to case, otherwise it is sensitive to insensitive to case, otherwise it is sensitive to case. Throws <i>bad_expression</i>
case. Throws <i>bad_expression</i> on failure.</td> on failure.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx&amp; <b> <td valign="top" width="43%">RegEx&amp; <b>operator</b>=(<b>const</b> RegEx&amp;
operator</b>=(<b>const</b> RegEx&amp; o);</td> o);</td>
<td valign="top" width="42%">Default assignment operator.</td> <td valign="top" width="42%">Default assignment operator.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx&amp; <b> <td valign="top" width="43%">RegEx&amp; <b>operator</b>=(<b>const</b> <b>char</b>*
operator</b>=(<b>const</b> <b>char</b>* p);</td> p);</td>
<td valign="top" width="42%">Assignment operator, equivalent to <td valign="top" width="42%">Assignment operator, equivalent to calling <i>SetExpression(p,
calling <i>SetExpression(p, false).</i> Throws <i> false).</i> Throws <i>bad_expression</i> on failure.</td>
bad_expression</i> on failure.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx&amp; <b> <td valign="top" width="43%">RegEx&amp; <b>operator</b>=(<b>const</b> std::string&amp;
operator</b>=(<b>const</b> std::string&amp; s);</td> s);</td>
<td valign="top" width="42%">Assignment operator, equivalent to <td valign="top" width="42%">Assignment operator, equivalent to calling <i>SetExpression(s,
calling <i>SetExpression(s, false).</i> Throws <i> false).</i> Throws <i>bad_expression</i> on failure.</td>
bad_expression</i> on failure.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> SetExpression(<b>constchar</b>*
SetExpression(<b>constchar</b>* p, <b>bool</b> icase = <b> p, <b>bool</b> icase = <b>false</b>);</td>
false</b>);</td> <td valign="top" width="42%">Sets the current expression to <i>p</i>, if <i>icase</i>
<td valign="top" width="42%">Sets the current expression to <i> is <i>true</i> then matching is insensitive to case, otherwise it is sensitive
p</i>, if <i>icase</i> is <i>true</i> then matching is insensitive to case. Throws <i>bad_expression</i> on failure.</td>
to case, otherwise it is sensitive to case. Throws <i>
bad_expression</i> on failure.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> SetExpression(<b>const</b>
SetExpression(<b>const</b> std::string&amp; s, <b>bool</b> icase = std::string&amp; s, <b>bool</b> icase = <b>false</b>);</td>
<b>false</b>);</td> <td valign="top" width="42%">Sets the current expression to <i>s</i>, if <i>icase</i>
<td valign="top" width="42%">Sets the current expression to <i> is <i>true</i> then matching is insensitive to case, otherwise it is sensitive
s</i>, if <i>icase</i> is <i>true</i> then matching is insensitive to case. Throws <i>bad_expression</i> on failure.</td>
to case, otherwise it is sensitive to case. Throws <i>
bad_expression</i> on failure.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">std::string <td valign="top" width="43%">std::string Expression()<b>const</b>;</td>
Expression()<b>const</b>;</td> <td valign="top" width="42%">Returns a copy of the current regular expression.</td>
<td valign="top" width="42%">Returns a copy of the current regular
expression.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>bool</b> Match(<b>const</b> <b> <td valign="top" width="43%"><b>bool</b> Match(<b>const</b> <b>char</b>* p,
char</b>* p, <b>unsigned</b> <b>int</b> flags = boost::match_flag_type flags = match_default);</td>
match_default);</td> <td valign="top" width="42%">Attempts to match the current expression against the
<td valign="top" width="42%">Attempts to match the current text <i>p</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
expression against the text <i>p</i> using the match flags <i> match flags</a>. Returns <i>true</i> if the expression matches the whole of
flags</i> - see <a href="match_flag_type.html">match flags</a>. the input string.</td>
Returns <i>true</i> if the expression matches the whole of the
input string.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>bool</b> Match(<b>const</b> <td valign="top" width="43%"><b>bool</b> Match(<b>const</b> std::string&amp; s,
std::string&amp; s, <b>unsigned</b> <b>int</b> flags = boost::match_flag_type flags = match_default) ;</td>
match_default) ;</td> <td valign="top" width="42%">Attempts to match the current expression against the
<td valign="top" width="42%">Attempts to match the current text <i>s</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
expression against the text <i>s</i> using the match flags <i> match flags</a>. Returns <i>true</i> if the expression matches the whole of
flags</i> - see <a href="match_flag_type.html">match flags</a>. the input string.</td>
Returns <i>true</i> if the expression matches the whole of the
input string.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>bool</b> Search(<b>const</b> <b> <td valign="top" width="43%"><b>bool</b> Search(<b>const</b> <b>char</b>* p,
char</b>* p, <b>unsigned</b> <b>int</b> flags = boost::match_flag_type flags = match_default);</td>
match_default);</td> <td valign="top" width="42%">Attempts to find a match for the current expression
<td valign="top" width="42%">Attempts to find a match for the somewhere in the text <i>p</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
current expression somewhere in the text <i>p</i> using the match match flags</a>. Returns <i>true</i> if the match succeeds.</td>
flags <i>flags</i> - see <a href="match_flag_type.html">match
flags</a>. Returns <i>true</i> if the match succeeds.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>bool</b> Search(<b>const</b> <td valign="top" width="43%"><b>bool</b> Search(<b>const</b> std::string&amp; s,
std::string&amp; s, <b>unsigned</b> <b>int</b> flags = boost::match_flag_type flags = match_default) ;</td>
match_default) ;</td> <td valign="top" width="42%">Attempts to find a match for the current expression
<td valign="top" width="42%">Attempts to find a match for the somewhere in the text <i>s</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
current expression somewhere in the text <i>s</i> using the match match flags</a>. Returns <i>true</i> if the match succeeds.</td>
flags <i>flags</i> - see <a href="match_flag_type.html">match
flags</a>. Returns <i>true</i> if the match succeeds.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b>
Grep(GrepCallback cb, <b>const</b> <b>char</b>* p, <b>unsigned</b> <b>char</b>* p, boost::match_flag_type flags = match_default);</td>
<b>int</b> flags = match_default);</td> <td valign="top" width="42%">Finds all matches of the current expression in the
<td valign="top" width="42%">Finds all matches of the current text <i>p</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
expression in the text <i>p</i> using the match flags <i>flags</i> match flags</a>. For each match found calls the call-back function <i>cb</i>
- see <a href="match_flag_type.html">match flags</a>. For each as: cb(*this);
match found calls the call-back function <i>cb</i> as: cb(*this); <p>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
<p>If at any stage the call-back function returns false then the number of matches found.</p>
grep operation terminates, otherwise continues until no further
matches are found. Returns the number of matches found.</p>
</td> </td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b>
Grep(GrepCallback cb, <b>const</b> std::string&amp; s, <b> std::string&amp; s, boost::match_flag_type flags = match_default);</td>
unsigned</b> <b>int</b> flags = match_default);</td> <td valign="top" width="42%">Finds all matches of the current expression in the
<td valign="top" width="42%">Finds all matches of the current text <i>s</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
expression in the text <i>s</i> using the match flags <i>flags</i> match flags</a>. For each match found calls the call-back function <i>cb</i>
- see <a href="match_flag_type.html">match flags</a>. For each as: cb(*this);
match found calls the call-back function <i>cb</i> as: cb(*this); <p>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
<p>If at any stage the call-back function returns false then the number of matches found.</p>
grep operation terminates, otherwise continues until no further
matches are found. Returns the number of matches found.</p>
</td> </td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Grep(std::vector&lt;std::string&gt;&amp;
Grep(std::vector&lt;std::string&gt;&amp; v, <b>const</b> <b> v, <b>const</b> <b>char</b>* p, boost::match_flag_type flags = match_default);</td>
char</b>* p, <b>unsigned</b> <b>int</b> flags = <td valign="top" width="42%">Finds all matches of the current expression in the
match_default);</td> text <i>p</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
<td valign="top" width="42%">Finds all matches of the current match flags</a>. For each match pushes a copy of what matched onto <i>v</i>.
expression in the text <i>p</i> using the match flags <i>flags</i>
- see <a href="match_flag_type.html">match flags</a>. For each
match pushes a copy of what matched onto <i>v</i>. Returns the
number of matches found.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
Grep(std::vector&lt;std::string&gt;&amp; v, <b>const</b>
std::string&amp; s, <b>unsigned</b> <b>int</b> flags =
match_default);</td>
<td valign="top" width="42%">Finds all matches of the current
expression in the text <i>s</i> using the match flags <i>flags</i>
- see <a href="match_flag_type.html">match flags</a>. For each
match pushes a copy of what matched onto <i>v</i>. Returns the
number of matches found.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
Grep(std::vector&lt;<b>unsigned int</b>&gt;&amp; v, <b>const</b>
<b>char</b>* p, <b>unsigned</b> <b>int</b> flags =
match_default);</td>
<td valign="top" width="42%">Finds all matches of the current
expression in the text <i>p</i> using the match flags <i>flags</i>
- see <a href="match_flag_type.html">match flags</a>. For each
match pushes the starting index of what matched onto <i>v</i>.
Returns the number of matches found.</td> Returns the number of matches found.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Grep(std::vector&lt;std::string&gt;&amp;
Grep(std::vector&lt;<b>unsigned int</b>&gt;&amp; v, <b>const</b> v, <b>const</b> std::string&amp; s, boost::match_flag_type flags =
std::string&amp; s, <b>unsigned</b> <b>int</b> flags =
match_default);</td> match_default);</td>
<td valign="top" width="42%">Finds all matches of the current <td valign="top" width="42%">Finds all matches of the current expression in the
expression in the text <i>s</i> using the match flags <i>flags</i> text <i>s</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
- see <a href="match_flag_type.html">match flags</a>. For each match flags</a>. For each match pushes a copy of what matched onto <i>v</i>.
match pushes the starting index of what matched onto <i>v</i>.
Returns the number of matches found.</td> Returns the number of matches found.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Grep(std::vector&lt;<b>unsigned
GrepFiles(GrepFileCallback cb, <b>const</b> <b>char</b>* files, <b> int</b>&gt;&amp; v, <b>const</b> <b>char</b>* p, boost::match_flag_type
bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags =
match_default);</td>
<td valign="top" width="42%">Finds all matches of the current
expression in the files <i>files</i> using the match flags <i>
flags</i> - see <a href="match_flag_type.html">match flags</a>. For
each match calls the call-back function cb.&nbsp;
<p>If the call-back returns false then the algorithm returns
without considering further matches in the current file, or any
further files.&nbsp;</p>
<p>The parameter <i>files</i> can include wild card characters '*'
and '?', if the parameter <i>recurse</i> is true then searches
sub-directories for matching file names.&nbsp;</p>
<p>Returns the total number of matches found.</p>
<p>May throw an exception derived from std::runtime_error if file
io fails.</p>
</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
GrepFiles(GrepFileCallback cb, <b>const</b> std::string&amp; files,
<b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b>
flags = match_default);</td> flags = match_default);</td>
<td valign="top" width="42%">Finds all matches of the current <td valign="top" width="42%">Finds all matches of the current expression in the
expression in the files <i>files</i> using the match flags <i> text <i>p</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
flags</i> - see <a href="match_flag_type.html">match flags</a>. For match flags</a>. For each match pushes the starting index of what matched
each match calls the call-back function cb.&nbsp; onto <i>v</i>. Returns the number of matches found.</td>
<p>If the call-back returns false then the algorithm returns
without considering further matches in the current file, or any
further files.&nbsp;</p>
<p>The parameter <i>files</i> can include wild card characters '*'
and '?', if the parameter <i>recurse</i> is true then searches
sub-directories for matching file names.&nbsp;</p>
<p>Returns the total number of matches found.</p>
<p>May throw an exception derived from std::runtime_error if file
io fails.</p>
</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Grep(std::vector&lt;<b>unsigned
FindFiles(FindFilesCallback cb, <b>const</b> <b>char</b>* files, int</b>&gt;&amp; v, <b>const</b> std::string&amp; s, boost::match_flag_type
<b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b>
flags = match_default);</td> flags = match_default);</td>
<td valign="top" width="42%">Searches <i>files</i> to find all <td valign="top" width="42%">Finds all matches of the current expression in the
those which contain at least one match of the current expression text <i>s</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
using the match flags <i>flags</i> - see <a href="match_flag_type.html">match flags</a>. For each matching file match flags</a>. For each match pushes the starting index of what matched
calls the call-back function cb.&nbsp; onto <i>v</i>. Returns the number of matches found.</td>
<td valign="top" width="7%">&nbsp;</td>
<p>If the call-back returns false then the algorithm returns </tr>
without considering any further files.&nbsp;</p> <tr>
<td valign="top" width="7%">&nbsp;</td>
<p>The parameter <i>files</i> can include wild card characters '*' <td valign="top" width="43%"><b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback
and '?', if the parameter <i>recurse</i> is true then searches cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>,
sub-directories for matching file names.&nbsp;</p> boost::match_flag_type flags = match_default);</td>
<td valign="top" width="42%">Finds all matches of the current expression in the
<p>Returns the total number of files found.</p> files <i>files</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
match flags</a>. For each match calls the call-back function cb.&nbsp;
<p>May throw an exception derived from std::runtime_error if file <p>If the call-back returns false then the algorithm returns without considering
io fails.</p> further matches in the current file, or any further files.&nbsp;</p>
<p>The parameter <i>files</i> can include wild card characters '*' and '?', if the
parameter <i>recurse</i> is true then searches sub-directories for matching
file names.&nbsp;</p>
<p>Returns the total number of matches found.</p>
<p>May throw an exception derived from std::runtime_error if file io fails.</p>
</td> </td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback
FindFiles(FindFilesCallback cb, <b>const</b> std::string&amp; cb, <b>const</b> std::string&amp; files, <b>bool</b> recurse = <b>false</b>,
files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b> boost::match_flag_type flags = match_default);</td>
int</b> flags = match_default);</td> <td valign="top" width="42%">Finds all matches of the current expression in the
<td valign="top" width="42%">Searches <i>files</i> to find all files <i>files</i> using the match flags <i>flags</i> - see <a href="match_flag_type.html">
those which contain at least one match of the current expression match flags</a>. For each match calls the call-back function cb.&nbsp;
using the match flags <i>flags</i> - see <a href="match_flag_type.html">match flags</a>. For each matching file <p>If the call-back returns false then the algorithm returns without considering
calls the call-back function cb.&nbsp; further matches in the current file, or any further files.&nbsp;</p>
<p>The parameter <i>files</i> can include wild card characters '*' and '?', if the
<p>If the call-back returns false then the algorithm returns parameter <i>recurse</i> is true then searches sub-directories for matching
without considering any further files.&nbsp;</p> file names.&nbsp;</p>
<p>Returns the total number of matches found.</p>
<p>The parameter <i>files</i> can include wild card characters '*' <p>May throw an exception derived from std::runtime_error if file io fails.</p>
and '?', if the parameter <i>recurse</i> is true then searches
sub-directories for matching file names.&nbsp;</p>
<p>Returns the total number of files found.</p>
<p>May throw an exception derived from std::runtime_error if file
io fails.</p>
</td> </td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">std::string Merge(<b>const</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback
std::string&amp; in, <b>const</b> std::string&amp; fmt, <b>bool</b> cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>,
copy = <b>true</b>, <b>unsigned</b> <b>int</b> flags = boost::match_flag_type flags = match_default);</td>
<td valign="top" width="42%">Searches <i>files</i> to find all those which contain
at least one match of the current expression using the match flags <i>flags</i>
- see <a href="match_flag_type.html">match flags</a>. For each matching file
calls the call-back function cb.&nbsp;
<p>If the call-back returns false then the algorithm returns without considering
any further files.&nbsp;</p>
<p>The parameter <i>files</i> can include wild card characters '*' and '?', if the
parameter <i>recurse</i> is true then searches sub-directories for matching
file names.&nbsp;</p>
<p>Returns the total number of files found.</p>
<p>May throw an exception derived from std::runtime_error if file io fails.</p>
</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback
cb, <b>const</b> std::string&amp; files, <b>bool</b> recurse = <b>false</b>,
boost::match_flag_type flags = match_default);</td>
<td valign="top" width="42%">Searches <i>files</i> to find all those which contain
at least one match of the current expression using the match flags <i>flags</i>
- see <a href="match_flag_type.html">match flags</a>. For each matching file
calls the call-back function cb.&nbsp;
<p>If the call-back returns false then the algorithm returns without considering
any further files.&nbsp;</p>
<p>The parameter <i>files</i> can include wild card characters '*' and '?', if the
parameter <i>recurse</i> is true then searches sub-directories for matching
file names.&nbsp;</p>
<p>Returns the total number of files found.</p>
<p>May throw an exception derived from std::runtime_error if file io fails.</p>
</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">std::string Merge(<b>const</b> std::string&amp; in, <b>const</b>
std::string&amp; fmt, <b>bool</b> copy = <b>true</b>, boost::match_flag_type
flags = match_default);</td>
<td valign="top" width="42%">Performs a search and replace operation: searches
through the string <i>in</i> for all occurrences of the current expression, for
each occurrence replaces the match with the format string <i>fmt</i>. Uses <i>flags</i>
to determine what gets matched, and how the format string should be treated. If <i>
copy</i> is true then all unmatched sections of input are copied unchanged
to output, if the flag <em>format_first_only</em> is set then only the first
occurance of the pattern found is replaced. Returns the new string. See <a href="format_syntax.html">
also format string syntax</a>, <a href="match_flag_type.html">match flags</a>
and <a href="match_flag_type.html">format flags</a>.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">std::string Merge(<b>const</b> char* in, <b>const</b>
char* fmt, <b>bool</b> copy = <b>true</b>, boost::match_flag_type flags =
match_default);</td> match_default);</td>
<td valign="top" width="42%">Performs a search and replace <td valign="top" width="42%">Performs a search and replace operation: searches
operation: searches through the string <i>in</i> for all through the string <i>in</i> for all occurrences of the current expression, for
occurrences of the current expression, for each occurrence replaces each occurrence replaces the match with the format string <i>fmt</i>. Uses <i>flags</i>
the match with the format string <i>fmt</i>. Uses <i>flags</i> to to determine what gets matched, and how the format string should be treated. If <i>
determine what gets matched, and how the format string should be copy</i> is true then all unmatched sections of input are copied unchanged
treated. If <i>copy</i> is true then all unmatched sections of to output, if the flag <em>format_first_only</em> is set then only the first
input are copied unchanged to output, if the flag <em> occurance of the pattern found is replaced. Returns the new string. See <a href="format_syntax.html">
format_first_only</em> is set then only the first occurance of the also format string syntax</a>, <a href="match_flag_type.html">match flags</a>
pattern found is replaced. Returns the new string. See <a href="format_syntax.html">also format string syntax</a>, <a href="match_flag_type.html">match flags</a> and <a href="match_flag_type.html">format flags</a>.</td> and <a href="match_flag_type.html">format flags</a>.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">std::string Merge(<b>const</b> char*
in, <b>const</b> char* fmt, <b>bool</b> copy = <b>true</b>, <b>
unsigned int</b> flags = match_default);</td>
<td valign="top" width="42%">Performs a search and replace
operation: searches through the string <i>in</i> for all
occurrences of the current expression, for each occurrence replaces
the match with the format string <i>fmt</i>. Uses <i>flags</i> to
determine what gets matched, and how the format string should be
treated. If <i>copy</i> is true then all unmatched sections of
input are copied unchanged to output, if the flag <em>
format_first_only</em> is set then only the first occurance of the
pattern found is replaced. Returns the new string. See <a href="format_syntax.html">also format string syntax</a>, <a href="match_flag_type.html">match flags</a> and <a href="match_flag_type.html">format flags</a>.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td valign="top"><b>unsigned</b> <td valign="top"><b>unsigned</b> Split(std::vector&lt;std::string&gt;&amp; v,
Split(std::vector&lt;std::string&gt;&amp; v, std::string&amp; s, std::string&amp; s, boost::match_flag_type flags = match_default, <b>unsigned</b>
<b>unsigned</b> flags = match_default, <b>unsigned</b> max_count = max_count = ~0);</td>
~0);</td> <td valign="top">Splits the input string and pushes each one onto the vector. If
<td valign="top">Splits the input string and pushes each one onto the expression contains no marked sub-expressions, then one string is outputted
the vector. If the expression contains no marked sub-expressions, for each section of the input that does not match the expression. If the
then one string is outputted for each section of the input that expression does contain marked sub-expressions, then outputs one string for
does not match the expression. If the expression does contain each marked sub-expression each time a match occurs. Outputs no more than <i>max_count</i>
marked sub-expressions, then outputs one string for each marked strings. Before returning, deletes from the input string <i>s</i> all of the
sub-expression each time a match occurs. Outputs no more than <i> input that has been processed (all of the string if <i>max_count</i> was not
max_count</i> strings. Before returning, deletes from the input reached). Returns the number of strings pushed onto the vector.</td>
string <i>s</i> all of the input that has been processed (all of
the string if <i>max_count</i> was not reached). Returns the number
of strings pushed onto the vector.</td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Position(<b>int</b> i = 0)<b>const</b>;</td>
Position(<b>int</b> i = 0)<b>const</b>;</td> <td valign="top" width="42%">Returns the position of what matched sub-expression <i>i</i>.
<td valign="top" width="42%">Returns the position of what matched If <i>i = 0</i> then returns the position of the whole match. Returns
sub-expression <i>i</i>. If <i>i = 0</i> then returns the position RegEx::npos if the supplied index is invalid, or if the specified
of the whole match. Returns RegEx::npos if the supplied index is sub-expression did not participate in the match.</td>
invalid, or if the specified sub-expression did not participate in
the match.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Length(<b>int</b> i = 0)<b>const</b>;</td>
Length(<b>int</b> i = 0)<b>const</b>;</td> <td valign="top" width="42%">Returns the length of what matched sub-expression <i>i</i>.
<td valign="top" width="42%">Returns the length of what matched If <i>i = 0</i> then returns the length of the whole match. Returns RegEx::npos
sub-expression <i>i</i>. If <i>i = 0</i> then returns the length of if the supplied index is invalid, or if the specified sub-expression did not
the whole match. Returns RegEx::npos if the supplied index is participate in the match.</td>
invalid, or if the specified sub-expression did not participate in
the match.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td><strong>bool</strong> Matched(<strong>int</strong> i = <td><strong>bool</strong> Matched(<strong>int</strong> i = 0)<strong>const</strong>;</td>
0)<strong>const</strong>;</td> <td>Returns true if sub-expression <em>i</em> was matched, false otherwise.</td>
<td>Returns true if sub-expression <em>i</em> was matched, false
otherwise.</td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b> <td valign="top" width="43%"><b>unsigned</b> <b>int</b> Line()<b>const</b>;</td>
Line()<b>const</b>;</td> <td valign="top" width="42%">Returns the line on which the match occurred, indexes
<td valign="top" width="42%">Returns the line on which the match start from 1 not zero, if no match occurred then returns RegEx::npos.</td>
occurred, indexes start from 1 not zero, if no match occurred then
returns RegEx::npos.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned int</b> Marks() <td valign="top" width="43%"><b>unsigned int</b> Marks() const;</td>
const;</td> <td valign="top" width="42%">Returns the number of marked sub-expressions
<td valign="top" width="42%">Returns the number of marked contained in the expression. Note that this includes the whole match
sub-expressions contained in the expression. Note that this (sub-expression zero), so the value returned is always &gt;= 1.</td>
includes the whole match (sub-expression zero), so the value
returned is always &gt;= 1.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">std::string What(<b>int</b> <td valign="top" width="43%">std::string What(<b>int</b> i)<b>const</b>;</td>
i)<b>const</b>;</td> <td valign="top" width="42%">Returns a copy of what matched sub-expression <i>i</i>.
<td valign="top" width="42%">Returns a copy of what matched If <i>i = 0</i> then returns a copy of the whole match. Returns a null string
sub-expression <i>i</i>. If <i>i = 0</i> then returns a copy of the if the index is invalid or if the specified sub-expression did not participate
whole match. Returns a null string if the index is invalid or if in a match.</td>
the specified sub-expression did not participate in a match.</td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">std::string <b> <td valign="top" width="43%">std::string <b>operator</b>[](<b>int</b> i)<b>const</b>
operator</b>[](<b>int</b> i)<b>const</b> ;</td> ;</td>
<td valign="top" width="42%">Returns <i>what(i);</i> <td valign="top" width="42%">Returns <i>what(i);</i>
<p>Can be used to simplify access to sub-expression matches, and make usage more
<p>Can be used to simplify access to sub-expression matches, and perl-like.</p>
make usage more perl-like.</p>
</td> </td>
<td valign="top" width="7%">&nbsp;</td> <td valign="top" width="7%">&nbsp;</td>
</tr> </tr>
</table> </table>
<br> <br>
<br> <br>
<p></p> <p></p>
<hr> <hr>
<p>Revised <p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
24 Oct 2003 04 Feb 2004
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p> <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i><EFBFBD> Copyright John Maddock&nbsp;1998- <p><i><EFBFBD> Copyright John Maddock&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2004<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<P><I>Use, modification and distribution are subject to the Boost Software License, <P><I>Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A> Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>
</body> </body>
</html> </html>

View File

@ -42,7 +42,7 @@
iterator first, iterator first,
iterator last, iterator last,
<b>const</b> basic_regex&lt;charT, traits, Allocator&gt;&amp; e, <b>const</b> basic_regex&lt;charT, traits, Allocator&gt;&amp; e,
<b>unsigned</b> flags = match_default) boost::match_flag_type flags = match_default)
</pre> </pre>
<p>The library also defines the following convenience versions, which take either <p>The library also defines the following convenience versions, which take either
a const charT*, or a const std::basic_string&lt;&gt;&amp; in place of a pair of a const charT*, or a const std::basic_string&lt;&gt;&amp; in place of a pair of
@ -53,13 +53,13 @@
<b>unsigned</b> <b>int</b> regex_grep(Predicate foo, <b>unsigned</b> <b>int</b> regex_grep(Predicate foo,
<b>const</b> charT* str, <b>const</b> charT* str,
<b>const</b> basic_regex&lt;charT, traits, Allocator&gt;&amp; e, <b>const</b> basic_regex&lt;charT, traits, Allocator&gt;&amp; e,
<b>unsigned</b> flags = match_default); boost::match_flag_type flags = match_default);
<b>template</b> &lt;<b>class</b> Predicate, <b>class</b> ST, <b>class</b> SA, <b>class</b> Allocator, <b>class</b> charT, <b>class</b> traits&gt; <b>template</b> &lt;<b>class</b> Predicate, <b>class</b> ST, <b>class</b> SA, <b>class</b> Allocator, <b>class</b> charT, <b>class</b> traits&gt;
<b>unsigned</b> <b>int</b> regex_grep(Predicate foo, <b>unsigned</b> <b>int</b> regex_grep(Predicate foo,
<b>const</b> std::basic_string&lt;charT, ST, SA&gt;&amp; s, <b>const</b> std::basic_string&lt;charT, ST, SA&gt;&amp; s,
<b>const</b> basic_regex&lt;charT, traits, Allocator&gt;&amp; e, <b>const</b> basic_regex&lt;charT, traits, Allocator&gt;&amp; e,
<b>unsigned</b> flags = match_default); boost::match_flag_type flags = match_default);
</pre> </pre>
<p>The parameters for the primary version of regex_grep have the following <p>The parameters for the primary version of regex_grep have the following
meanings:&nbsp;</p> meanings:&nbsp;</p>
@ -370,11 +370,10 @@ index[std::string(what[5].first, what[5].second) + std::string(what[6].first, wh
<hr> <hr>
<p>Revised <p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
24 Oct 2003 04 Feb 2004
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p> <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i><EFBFBD> Copyright John Maddock&nbsp;1998- <p><i><EFBFBD> Copyright John Maddock&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2004<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<P><I>Use, modification and distribution are subject to the Boost Software License, <P><I>Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A> Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>

View File

@ -294,7 +294,7 @@ void</B> IndexClasses(map_type&amp; m, <B>const</B> std::string&amp; file)
&nbsp;&nbsp; start = file.begin(); &nbsp;&nbsp; start = file.begin();
&nbsp;&nbsp; end = file.end();&nbsp; &nbsp;&nbsp; end = file.end();&nbsp;
&nbsp;&nbsp; &nbsp;&nbsp; boost::<a href="match_results.html">match_results</a>&lt;std::string::const_iterator&gt; what; &nbsp;&nbsp; &nbsp;&nbsp; boost::<a href="match_results.html">match_results</a>&lt;std::string::const_iterator&gt; what;
&nbsp;&nbsp; <B>unsigned</B> <B>int</B> flags = boost::match_default; &nbsp;&nbsp; boost::match_flag_type flags = boost::match_default;
&nbsp;&nbsp; <B>while</B>(regex_search(start, end, what, expression, flags))&nbsp; &nbsp;&nbsp; <B>while</B>(regex_search(start, end, what, expression, flags))&nbsp;
&nbsp;&nbsp; { &nbsp;&nbsp; {
<FONT color=#000080>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <I>// what[0] contains the whole string <FONT color=#000080>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <I>// what[0] contains the whole string
@ -314,11 +314,10 @@ void</B> IndexClasses(map_type&amp; m, <B>const</B> std::string&amp; file)
<HR> <HR>
<p>Revised <p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
24 Oct 2003 04 Feb 2004
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p> <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i><EFBFBD> Copyright John Maddock&nbsp;1998- <p><i><EFBFBD> Copyright John Maddock&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2004<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<P><I>Use, modification and distribution are subject to the Boost Software License, <P><I>Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A> Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>

View File

@ -38,15 +38,15 @@
<PRE><B>template</B> &lt;<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1, <B>class</B> Traits2, <B>class</B> Alloc2&gt; <PRE><B>template</B> &lt;<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1, <B>class</B> Traits2, <B>class</B> Alloc2&gt;
std::size_t regex_split(OutputIterator out,&nbsp; std::size_t regex_split(OutputIterator out,&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::basic_string&lt;charT, Traits1, Alloc1&gt;&amp; s,&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::basic_string&lt;charT, Traits1, Alloc1&gt;&amp; s,&nbsp;
&nbsp;<B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const</B> basic_regex&lt;charT, Traits2, Alloc2&gt;&amp; e, &nbsp;<B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const</B> basic_regex&lt;charT, Traits2, Alloc2&gt;&amp; e,
&nbsp;<B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned</B> flags, &nbsp;<STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</STRONG>boost::match_flag_type flags,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::size_t max_split); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::size_t max_split);
<B>template</B> &lt;<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1, <B>class</B> Traits2, <B>class</B> Alloc2&gt; <B>template</B> &lt;<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1, <B>class</B> Traits2, <B>class</B> Alloc2&gt;
std::size_t regex_split(OutputIterator out,&nbsp; std::size_t regex_split(OutputIterator out,&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::basic_string&lt;charT, Traits1, Alloc1&gt;&amp; s,&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::basic_string&lt;charT, Traits1, Alloc1&gt;&amp; s,&nbsp;
&nbsp;<B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const</B> basic_regex&lt;charT, Traits2, Alloc2&gt;&amp; e, &nbsp;<B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const</B> basic_regex&lt;charT, Traits2, Alloc2&gt;&amp; e,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <B>unsigned</B> flags = match_default); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boost::match_flag_type flags = match_default);
<B>template</B> &lt;<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1&gt; <B>template</B> &lt;<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1&gt;
std::size_t regex_split(OutputIterator out, std::size_t regex_split(OutputIterator out,
@ -134,11 +134,10 @@ boost::regex e(<FONT color=#000080>"&lt;\\s*A\\s+[^&gt;]*href\\s*=\\s*\"([^\"]*)
<HR> <HR>
<p>Revised <p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
24 Oct 2003 04 Feb 2004
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p> <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i><EFBFBD> Copyright John Maddock&nbsp;1998- <p><i><EFBFBD> Copyright John Maddock&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2004<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<P><I>Use, modification and distribution are subject to the Boost Software License, <P><I>Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A> Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>

View File

@ -1005,7 +1005,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_slow_dot_
{ {
// can't repeat any more, remove the pushed state: // can't repeat any more, remove the pushed state:
destroy_single_repeat(); destroy_single_repeat();
if(rep->can_be_null & mask_skip) if(0 == (rep->can_be_null & mask_skip))
return true; return true;
} }
else if(count == rep->max) else if(count == rep->max)
@ -1057,7 +1057,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_fast_dot_
{ {
// can't repeat any more, remove the pushed state: // can't repeat any more, remove the pushed state:
destroy_single_repeat(); destroy_single_repeat();
if(rep->can_be_null & mask_skip) if(0 == (rep->can_be_null & mask_skip))
return true; return true;
} }
else if(count == rep->max) else if(count == rep->max)
@ -1121,7 +1121,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_char_repe
{ {
// can't repeat any more, remove the pushed state: // can't repeat any more, remove the pushed state:
destroy_single_repeat(); destroy_single_repeat();
if(rep->can_be_null & mask_skip) if(0 == (rep->can_be_null & mask_skip))
return true; return true;
} }
else if(count == rep->max) else if(count == rep->max)
@ -1185,7 +1185,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_short_set
{ {
// can't repeat any more, remove the pushed state: // can't repeat any more, remove the pushed state:
destroy_single_repeat(); destroy_single_repeat();
if(rep->can_be_null & mask_skip) if(0 == (rep->can_be_null & mask_skip))
return true; return true;
} }
else if(count == rep->max) else if(count == rep->max)
@ -1250,7 +1250,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_long_set_
{ {
// can't repeat any more, remove the pushed state: // can't repeat any more, remove the pushed state:
destroy_single_repeat(); destroy_single_repeat();
if(rep->can_be_null & mask_skip) if(0 == (rep->can_be_null & mask_skip))
return true; return true;
} }
else if(count == rep->max) else if(count == rep->max)

View File

@ -877,6 +877,10 @@ a+(b+) "...aaabb,,,ab*abbb?" $1 "...bb,,,ab*abbb?"
- match_default normal REG_EXTENDED REG_PERL - match_default normal REG_EXTENDED REG_PERL
a** ! a** !
a*? aa 0 0 a*? aa 0 0
^a*?$ aa 0 2
^.*?$ aa 0 2
^(?:a)*?$ aa 0 2
^[ab]*?$ aa 0 2
a?? aa 0 0 a?? aa 0 0
a++ ! a++ !
a+? aa 0 1 a+? aa 0 1