Updated docs to include recent changes, and improve general quality.

[SVN r20443]
This commit is contained in:
John Maddock
2003-10-21 11:18:40 +00:00
parent 72a7a13565
commit 515044821c
28 changed files with 3764 additions and 4430 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,110 +1,85 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html> <html>
<head> <head>
<title>Boost.Regex: Contacts</title> <title>Boost.Regex: Contacts</title>
<meta name="generator" content="HTML Tidy, see www.w3.org"> <meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content= <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
"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">
<tr>
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" <td valign="top" width="300">
border="0"> <h3><a href="../../../index.htm"><IMG height="86" alt="C++ Boost" src="../../../c++boost.gif" width="277" border="0"></a></h3>
<tr> </td>
<td valign="top" width="300"> <td width="353">
<h3><a href="../../../index.htm"><img height="86" width="277" alt= <h1 align="center">Boost.Regex</h1>
"C++ Boost" src="../../../c++boost.gif" border=0></a></h3> <h2 align="center">Contacts and Acknowledgements</h2>
</td> </td>
<td width="353"> <td width="50">
<h1 align="center">Boost.Regex</h1> <h3><a href="index.html"><IMG height="45" alt="Boost.Regex Index" src="uarrow.gif" width="43" border="0"></a></h3>
</td>
<h2 align="center">Contacts and Acknowledgements</h2> </tr>
</td> </table>
<td width="50"> <BR>
<h3><a href="index.html"><img height="45" width="43" alt= <BR>
"Boost.Regex Index" src="uarrow.gif" border=0></a></h3> <HR>
</td> <P>The author can be contacted at <A href="mailto:john@johnmaddock.co.uk">john@johnmaddock.co.uk</A>;&nbsp;the
</tr> home page for this library is at <A href="http://www.boost.org">www.boost.org</A>.</P>
</table> <P>I am indebted to Robert Sedgewick's "Algorithms in C++" for forcing me to think
about algorithms and their performance, and to the folks at boost for forcing
<br> me to <I>think</I>, period. The following people have all contributed useful
<br> comments or fixes: Dave Abrahams, Mike Allison, Edan Ayal, Jayashree
Balasubramanian, Jan B<>lsche, Beman Dawes, Paul Baxter, David Bergman, David
Dennerline, Edward Diener, Peter Dimov, Robert Dunn, Fabio Forno, Tobias
<hr> Gabrielsson, Rob Gillen, Marc Gregoire, Chris Hecker, Nick Hodapp, Jesse Jones,
<p>The author can be contacted at <a href="mailto:john_maddock@compuserve.com"> Martin Jost, Boris Krasnovskiy, Jan Hermelink, Max Leung, Wei-hao Lin, Jens
john_maddock@compuserve.com</a>, the home page for this library is Maurer, Richard Peters, Heiko Schmidt, Jason Shirk, Gerald Slacik, Scobie
at <a href="http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm"> Smith, Mike Smyth, Alexander Sokolovsky, Herv<72> Poirier, Michael Raykh, Marc
http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm</a>, Recht, Scott VanCamp, Bruno Voigt, Alexey Voinov, Jerry Waldorf, Rob Ward,
and the official boost version can be obtained from <a href="../../libraries.htm">www.boost.org/libraries.htm</a>.</p> Lealon Watts, Thomas Witt and Yuval Yosef. I am also grateful to the manuals
supplied with the Henry Spencer, Perl and GNU regular expression libraries -
<p>I am indebted to Robert Sedgewick's "Algorithms in C++" for wherever possible I have tried to maintain compatibility with these libraries
forcing me to think about algorithms and their performance, and to and with the POSIX standard - the code however is entirely my own, including
the folks at boost for forcing me to <i>think</i>, period. The any bugs! I can absolutely guarantee that I will not fix any bugs I don't know
following people have all contributed useful comments or fixes: about, so if you have any comments or spot any bugs, please get in touch.</P>
Dave Abrahams, Mike Allison, Edan Ayal, Jayashree Balasubramanian, <P>Useful further information can be found at:</P>
Jan B<>lsche, Beman Dawes, Paul Baxter, David Bergman, David <P>Short&nbsp;tutorials on regular expressions can be <A href="http://etext.lib.virginia.edu/helpsheets/regex.html">
Dennerline, Edward Diener, Peter Dimov, Robert Dunn, Fabio Forno, found here</A> and&nbsp;<A href="http://www.devshed.com/Server_Side/Administration/RegExp/page1.html">here</A>.</P>
Tobias Gabrielsson, Rob Gillen, Marc Gregoire, Chris Hecker, Nick <P>The main book on regular expressions is <A href="http://www.oreilly.com/catalog/regex/">
Hodapp, Jesse Jones, Martin Jost, Boris Krasnovskiy, Jan Hermelink, Mastering Regular Expressions, published by O'Reilly</A>.</P>
Max Leung, Wei-hao Lin, Jens Maurer, Richard Peters, Heiko Schmidt, <P>Information on the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
Jason Shirk, Gerald Slacik, Scobie Smith, Mike Smyth, Alexander Boost.regex standardization proposal</A>, along with other <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1475.html">
Sokolovsky, Herv<72> Poirier, Michael Raykh, Marc Recht, Scott standard library extension proposals</A> can be found on the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/">
VanCamp, Bruno Voigt, Alexey Voinov, Jerry Waldorf, Rob Ward, C++ Committees web pages</A>.</P>
Lealon Watts, Thomas Witt and Yuval Yosef. I am also grateful to <P>The<a href="http://www.opengroup.org/onlinepubs/7908799/toc.htm">Open Unix
the manuals supplied with the Henry Spencer, Perl and GNU regular Specification</a> contains a wealth of useful material, including the
expression libraries - wherever possible I have tried to maintain regular expression syntax, and specifications for <a href="http://www.opengroup.org/onlinepubs/7908799/xsh/regex.h.html">
compatibility with these libraries and with the POSIX standard - &lt;regex.h&gt;</a> and <a href="http://www.opengroup.org/onlinepubs/7908799/xsh/nl_types.h.html">
the code however is entirely my own, including any bugs! I can &lt;nl_types.h&gt;</a>.</P>
absolutely guarantee that I will not fix any bugs I don't know <p>The <a href="http://www.cs.ucr.edu/~stelo/pattern.html">Pattern Matching Pointers</a>
about, so if you have any comments or spot any bugs, please get in site is a "must visit" resource for anyone interested in pattern matching.</p>
touch.</p> <p><a href="http://glimpse.cs.arizona.edu/">Glimpse and Agrep</a>, use a
simplified regular expression syntax to achieve faster search times.</p>
<p>Useful further information can be found at:</p> <p><a href="http://glimpse.cs.arizona.edu/udi.html">Udi Manber</a> and <a href="http://www.dcc.uchile.cl/~rbaeza/">
Ricardo Baeza-Yates</a> both have a selection of useful pattern matching
<p>A short tutorial on regular expressions <a href="http://www.devshed.com/Server_Side/Administration/RegExp/">can be papers available from their respective web sites.</p>
found here</a>.</p> <p></p>
<hr>
<p>The <a href="http://www.opengroup.org/onlinepubs/7908799/toc.htm">Open Unix <p>Revised
Specification</a> contains a wealth of useful material, including <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
the regular expression syntax, and specifications for <a href="http://www.opengroup.org/onlinepubs/7908799/xsh/regex.h.html"> 17 May 2003
&lt;regex.h&gt;</a> and <a href="http://www.opengroup.org/onlinepubs/7908799/xsh/nl_types.h.html"> <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
&lt;nl_types.h&gt;</a>.</p> <p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a>&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
<p>The <a href="http://www.cs.ucr.edu/~stelo/pattern.html">Pattern 2003
Matching Pointers</a> site is a "must visit" resource for anyone <!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
interested in pattern matching.</p> <p align="left"><i>Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee, provided
<p><a href="http://glimpse.cs.arizona.edu/">Glimpse and Agrep</a>, that the above copyright notice appear in all copies and that both that
use a simplified regular expression syntax to achieve faster search copyright notice and this permission notice appear in supporting documentation.
times.</p> Dr John Maddock makes no representations about the suitability of this software
for any purpose. It is provided "as is" without express or implied warranty.</i></p>
<p><a href="http://glimpse.cs.arizona.edu/udi.html">Udi Manber</a> </body>
and <a href="http://www.dcc.uchile.cl/~rbaeza/">Ricardo
Baeza-Yates</a> both have a selection of useful pattern matching
papers available from their respective web sites.</p>
<p></p>
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->17 May 2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
Maddock</a>&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<p align="left"><i>Permission to use, copy, modify, distribute and
sell this software and its documentation for any purpose is hereby
granted without fee, provided that the above copyright notice
appear in all copies and that both that copyright notice and this
permission notice appear in supporting documentation. Dr John
Maddock makes no representations about the suitability of this
software for any purpose. It is provided "as is" without express or
implied warranty.</i></p>
</body>
</html> </html>

View File

@ -27,17 +27,20 @@
<P>Boost 1.31.0.</P> <P>Boost 1.31.0.</P>
<UL> <UL>
<LI> <LI>
Completely rewritten pattern matching code - it is now up to 10 times faster Completely rewritten pattern matching code - it is now up to 10 times faster
than before.</LI> than before.
<LI> <LI>
Reorganized documentation.</LI> Reorganized documentation.
<LI> <LI>
Deprecated all interfaces that are not part of the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm"> Deprecated all interfaces that are not part of the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
regular expression standardization proposal</A>.</LI> regular expression standardization proposal</A>.
<LI> <LI>
Added regex_iterator and regex_token_iterator.</LI> Added regex_iterator and regex_token_iterator.
<LI> <LI>
Added support for Perl style independent sub-expressions.</LI></UL> Added support for Perl style independent sub-expressions.
<LI>
Added non-member operators to the sub_match class, so that you can compare
sub_match's with strings, or add them to a string to produce a new string.</LI></UL>
<P> <P>
<HR> <HR>
<P></P> <P></P>
@ -55,4 +58,3 @@
for any purpose. It is provided "as is" without express or implied warranty.</I></P> for any purpose. It is provided "as is" without express or implied warranty.</I></P>
</body> </body>
</html> </html>

View File

@ -62,7 +62,7 @@
to be hard-coded to the C-locale, consequently this was not an issue for them). to be hard-coded to the C-locale, consequently this was not an issue for them).
That leaves us with the following regular expression to validate credit card That leaves us with the following regular expression to validate credit card
number formats:</P> number formats:</P>
<P>(\d{4}[- ]){3}\d{4}</P> <PRE>(\d{4}[- ]){3}\d{4}</PRE>
<P>Here the parenthesis act to group (and mark for future reference) <P>Here the parenthesis act to group (and mark for future reference)
sub-expressions, and the {4} means "repeat exactly 4 times". This is an example sub-expressions, and the {4} means "repeat exactly 4 times". This is an example
of the extended regular expression syntax used by Perl, awk and egrep. Regex++ of the extended regular expression syntax used by Perl, awk and egrep. Regex++
@ -93,8 +93,9 @@
need two strings - one a regular expression - the other a "<A href="format_syntax.html">format need two strings - one a regular expression - the other a "<A href="format_syntax.html">format
string</A>" that provides a description of the text to replace the match string</A>" that provides a description of the text to replace the match
with. In regex++ this search and replace operation is performed with the with. In regex++ this search and replace operation is performed with the
algorithm regex_replace, for our credit card example we can write two algorithms algorithm<A href="regex_replace.html"> regex_replace</A>, for our credit card
like this to provide the format conversions:</P> example we can write two algorithms like this to provide the format
conversions:</P>
<PRE><I>// match any format with the regular expression: <PRE><I>// match any format with the regular expression:
</I><B>const</B> boost::regex e("\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z"); </I><B>const</B> boost::regex e("\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z");
<B>const</B> std::string machine_format("\\1\\2\\3\\4"); <B>const</B> std::string machine_format("\\1\\2\\3\\4");
@ -126,22 +127,31 @@ std::string human_readable_card_number(<B>const</B> std::string s)
<STRONG>typedef</STRONG> match_results&lt;std::string::const_iterator&gt; smatch; <STRONG>typedef</STRONG> match_results&lt;std::string::const_iterator&gt; smatch;
<STRONG>typedef</STRONG> match_results&lt;std::wstring::const_iterator&gt; wsmatch; <STRONG>typedef</STRONG> match_results&lt;std::wstring::const_iterator&gt; wsmatch;
}</PRE> }</PRE>
<P>The algorithms <A href="regex_search.html">regex_search</A> and <A href="regex_grep.html"> <P>The algorithms <A href="regex_search.html">regex_search</A> and&nbsp;<A href="regex_match.html">regex_match</A>
regex_grep</A> (i.e. finding all matches in a string) make use of make use of match_results to report what matched; the difference between these
match_results to report what matched.</P> algorithms is that <A href="regex_match.html">regex_match</A> will only find
matches that consume <EM>all</EM> of the input text, where as <A href="regex_search.html">
regex_search</A> will <EM>search</EM> for a match anywhere within the text
being matched.</P>
<P>Note that these algorithms are not restricted to searching regular C-strings, <P>Note that these algorithms are not restricted to searching regular C-strings,
any bidirectional iterator type can be searched, allowing for the possibility any bidirectional iterator type can be searched, allowing for the possibility
of seamlessly searching almost any kind of data. of seamlessly searching almost any kind of data.
</P> </P>
<P>For search and replace operations in addition to the algorithm <A href="regex_replace.html"> <P>For search and replace operations, in addition to the algorithm <A href="regex_replace.html">
regex_replace</A> that we have already seen, the algorithm <A href="regex_format.html"> regex_replace</A> that we have already seen, the <A href="match_results.html">match_results</A>
regex_format</A> takes the result of a match and a format string, and class has a format member that takes the result of a match and a format string,
produces a new string by merging the two.</P> and produces a new string by merging the two.</P>
<P>For iterating through all occurences of an expression within a text, there are
two iterator types: <A href="regex_iterator.html">regex_iterator</A> will
enumerate over the <A href="match_results.html">match_results</A> objects
found, while <A href="regex_token_iterator.html">regex_token_iterator</A> will
enumerate a series of strings (similar to perl style split operations).</P>
<P>For those that dislike templates, there is a high level wrapper class RegEx <P>For those that dislike templates, there is a high level wrapper class RegEx
that is an encapsulation of the lower level template code - it provides a that is an encapsulation of the lower level template code - it provides a
simplified interface for those that don't need the full power of the library, simplified interface for those that don't need the full power of the library,
and supports only narrow characters, and the "extended" regular expression and supports only narrow characters, and the "extended" regular expression
syntax. syntax. This class is now deprecated as it does not form part of the regular
expressions C++ standard library proposal.
</P> </P>
<P>The <A href="posix_api.html">POSIX API</A> functions: regcomp, regexec, regfree <P>The <A href="posix_api.html">POSIX API</A> functions: regcomp, regexec, regfree
and regerror, are available in both narrow character and Unicode versions, and and regerror, are available in both narrow character and Unicode versions, and
@ -162,7 +172,7 @@ std::string human_readable_card_number(<B>const</B> std::string s)
17 May 2003 17 May 2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" --> <!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p> </p>
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a>&nbsp;1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P> <P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a>&nbsp;1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
<P align="left"><I>Permission to use, copy, modify, distribute and sell this software <P align="left"><I>Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee, provided and its documentation for any purpose is hereby granted without fee, provided
that the above copyright notice appear in all copies and that both that that the above copyright notice appear in all copies and that both that
@ -171,6 +181,3 @@ std::string human_readable_card_number(<B>const</B> std::string s)
for any purpose. It is provided "as is" without express or implied warranty.</I></P> for any purpose. It is provided "as is" without express or implied warranty.</I></P>
</body> </body>
</html> </html>

View File

@ -1,46 +1,36 @@
<!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: match_flag_type</title>
<title>Boost.Regex: match_flag_type</title> <meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content= <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
"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">
<tr>
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" <td valign="top" width="300">
border="0"> <h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
<tr> </td>
<td valign="top" width="300"> <td width="353">
<h3><a href="../../../index.htm"><img height="86" width="277" alt= <h1 align="center">Boost.Regex</h1>
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3> <h2 align="center">match_flag_type</h2>
</td> </td>
<td width="353"> <td width="50">
<h1 align="center">Boost.Regex</h1> <h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
</td>
<h2 align="center">match_flag_type</h2> </tr>
</td> </table>
<td width="50"> <br>
<h3><a href="index.html"><img height="45" width="43" alt= <br>
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3> <hr>
</td> <h3>Synopsis</h3>
</tr> <p>The type <code>match_flag_type</code> is an implementation defined bitmask type
</table> (17.3.2.1.2) that controls how a regular expression is matched against a
character sequence.&nbsp; The behavior of the format flags is descibed in more
<br> detail in the <A href="format_syntax.html">format syntax guide</A>.</p>
<br> <pre>
<hr>
<h3>Synopsis</h3>
<p>The type <code>match_flag_type</code> is an implementation
defined bitmask type (17.3.2.1.2) that controls how a regular
expression is matched against a character sequence.</p>
<pre>
namespace std{ namespace regex_constants{ namespace std{ namespace regex_constants{
typedef bitmask_type match_flag_type; typedef bitmask_type match_flag_type;
@ -70,261 +60,213 @@ static const match_flag_type format_all;
} // namespace regex_constants } // namespace regex_constants
} // namespace std } // namespace std
</pre> </pre>
<h3>Description</h3>
<h3>Description</h3> <p>The type <code>match_flag_type</code> is an implementation defined bitmask type
(17.3.2.1.2). When matching a regular expression against a sequence of
<p>The type <code>match_flag_type</code> is an implementation characters [first, last) then setting its elements has the effects listed in
defined bitmask type (17.3.2.1.2). When matching a regular the table below:</p>
expression against a sequence of characters [first, last) then <p></p>
setting its elements has the effects listed in the table below:</p> <table id="Table2" cellspacing="1" cellpadding="7" width="100%" border="0">
<tr>
<p></p> <td valign="top" width="50%">
<p>Element</p>
<table id="Table2" cellspacing="1" cellpadding="7" width="100%" </td>
border="0"> <td valign="top" width="50%">
<tr> <p>Effect if set</p>
<td valign="top" width="50%"> </td>
<p>Element</p> </tr>
</td> <tr>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>Effect if set</p> <p>match_default</p>
</td> </td>
</tr> <td valign="top" width="50%">
<p>Specifies that matching of regular expressions proceeds without any
<tr> modification of the normal rules used in ECMA-262, ECMAScript Language
<td valign="top" width="50%"> Specification, Chapter 15 part 10, RegExp (Regular Expression) Objects (FWD.1)</p>
<p>match_default</p> </td>
</td> </tr>
<td valign="top" width="50%"> <tr>
<p>Specifies that matching of regular expressions proceeds without <td valign="top" width="50%">match_not_bob</td>
any modification of the normal rules used in ECMA-262, ECMAScript <td valign="top" width="50%">Specifies that the expression "\A" should not match
Language Specification, Chapter 15 part 10, RegExp (Regular against the sub-sequence [first,first).</td>
Expression) Objects (FWD.1)</p> </tr>
</td> <tr>
</tr> <td valign="top" width="50%">match_not_eob</td>
<td valign="top" width="50%">Specifies that the expressions "\z" and
<tr> "\Z"&nbsp;should not match against the sub-sequence [last,last).</td>
<td valign="top" width="50%">match_not_bob</td> </tr>
<td valign="top" width="50%">Specifies that the expression "\A" <tr>
should not match against the sub-sequence [first,first).</td> <td valign="top" width="50%">
</tr> <p>match_not_bol</p>
</td>
<tr> <td valign="top" width="50%">
<td valign="top" width="50%">match_not_eob</td> <p>Specifies that the expression "^" should not be matched against the
<td valign="top" width="50%">Specifies that the expressions "\z" sub-sequence [first,first).</p>
and "\Z"&nbsp;should not match against the sub-sequence </td>
[last,last).</td> </tr>
</tr> <tr>
<td valign="top" width="50%">
<tr> <p>match_not_eol</p>
<td valign="top" width="50%"> </td>
<p>match_not_bol</p> <td valign="top" width="50%">
</td> <p>Specifies that the expression "$" should not be matched against the
<td valign="top" width="50%"> sub-sequence [last,last).</p>
<p>Specifies that the expression "^" should not be matched against </td>
the sub-sequence [first,first).</p> </tr>
</td> <tr>
</tr> <td valign="top" width="50%">
<p>match_not_bow</p>
<tr> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>match_not_eol</p> <p>Specifies that the expression "\b" should not be matched against the
</td> sub-sequence [first,first).</p>
<td valign="top" width="50%"> </td>
<p>Specifies that the expression "$" should not be matched against </tr>
the sub-sequence [last,last).</p> <tr>
</td> <td valign="top" width="50%">
</tr> <p>match_not_eow</p>
</td>
<tr> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>Specifies that the expression "\b" should not be matched against the
<p>match_not_bow</p> sub-sequence [last,last).</p>
</td> </td>
<td valign="top" width="50%"> </tr>
<p>Specifies that the expression "\b" should not be matched against <tr>
the sub-sequence [first,first).</p> <td valign="top" width="50%">
</td> <p>match_any</p>
</tr> </td>
<td valign="top" width="50%">
<tr> <p>Specifies that if more than one match is possible then any match is an
<td valign="top" width="50%"> acceptable result.</p>
<p>match_not_eow</p> </td>
</td> </tr>
<td valign="top" width="50%"> <tr>
<p>Specifies that the expression "\b" should not be matched against <td valign="top" width="50%">
the sub-sequence [last,last).</p> <p>match_not_null</p>
</td> </td>
</tr> <td valign="top" width="50%">
<p>Specifies that the expression can not be matched against an empty sequence.</p>
<tr> </td>
<td valign="top" width="50%"> </tr>
<p>match_any</p> <tr>
</td> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>match_continuous</p>
<p>Specifies that if more than one match is possible then any match </td>
is an acceptable result.</p> <td valign="top" width="50%">
</td> <p>Specifies that the expression must match a sub-sequence that begins at <i>first</i>.</p>
</tr> </td>
</tr>
<tr> <tr>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>match_not_null</p> <p>match_partial</p>
</td> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>Specifies that the expression can not be matched against an <p>Specifies that if no match can be found, then it is acceptable to return a
empty sequence.</p> match [from, last) where from!=last, if there exists some sequence of
</td> characters [from,to) of which [from,last) is a prefix, and which would result
</tr> in a full match.</p>
</td>
<tr> </tr>
<td valign="top" width="50%"> <tr>
<p>match_continuous</p> <td valign="top" width="50%">
</td> <p>match_prev_avail</p>
<td valign="top" width="50%"> </td>
<p>Specifies that the expression must match a sub-sequence that <td valign="top" width="50%">
begins at <i>first</i>.</p> <p>Specifies that <code>--first</code> is a valid iterator position, when this
</td> flag is set then the flags <code>match_not_bol</code> and <code>match_not_bow</code>
</tr> are ignored by the regular expression algorithms (RE.7) and iterators (RE.8).</p>
</td>
<tr> </tr>
<td valign="top" width="50%"> <tr>
<p>match_partial</p> <td valign="top" width="50%">match_not_dot_newline</td>
</td> <td valign="top" width="50%">Specifies that the expression "." does not match a
<td valign="top" width="50%"> newline character.</td>
<p>Specifies that if no match can be found, then it is acceptable </tr>
to return a match [from, last) where from!=last, if there exists <tr>
some sequence of characters [from,to) of which [from,last) is a <td valign="top" width="50%">match_not_dot_null</td>
prefix, and which would result in a full match.</p> <td valign="top" width="50%">Specified that the expression "." does not match a
</td> character null '\0'.</td>
</tr> </tr>
<tr>
<tr> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>format_default</p>
<p>match_prev_avail</p> </td>
</td> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>Specifies that when a regular expression match is to be replaced by a new
<p>Specifies that <code>--first</code> is a valid iterator string, that the new string is constructed using the rules used by the
position, when this flag is set then the flags <code> ECMAScript replace function in ECMA-262, ECMAScript Language Specification,
match_not_bol</code> and <code>match_not_bow</code> are ignored by Chapter 15 part 5.4.11 String.prototype.replace. (FWD.1). In addition during
the regular expression algorithms (RE.7) and iterators (RE.8).</p> search and replace operations then all non-overlapping occurrences of the
</td> regular expression are located and replaced, and sections of the input that did
</tr> not match the expression, are copied unchanged to the output string.</p>
</td>
<tr> </tr>
<td valign="top" width="50%">match_not_dot_newline</td> <tr>
<td valign="top" width="50%">Specifies that the expression "." does <td valign="top" width="50%">
not match a newline character.</td> <p>format_sed</p>
</tr> </td>
<td valign="top" width="50%">
<tr> <p>Specifies that when a regular expression match is to be replaced by a new
<td valign="top" width="50%">match_not_dot_null</td> string, that the new string is constructed using the rules used by the Unix sed
<td valign="top" width="50%">Specified that the expression "." does utility in IEEE Std 1003.1-2001, Portable Operating SystemInterface (POSIX ),
not match a character null '\0'.</td> Shells and Utilities..</p>
</tr> </td>
</tr>
<tr> <tr>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>format_default</p> <p>format_perl</p>
</td> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>Specifies that when a regular expression match is to be replaced <p>
by a new string, that the new string is constructed using the rules Specifies that when a regular expression match is to be replaced by a new
used by the ECMAScript replace function in ECMA-262, ECMAScript string, that the new string is constructed using the same rules as Perl 5.</p>
Language Specification, Chapter 15 part 5.4.11 </td>
String.prototype.replace. (FWD.1). In addition during search and </tr>
replace operations then all non-overlapping occurrences of the <tr>
regular expression are located and replaced, and sections of the <td valign="top" width="50%" height="32">format_all</td>
input that did not match the expression, are copied unchanged to <td valign="top" width="50%" height="32">Specifies that all syntax extensions are
the output string.</p> enabled, including conditional (?ddexpression1:expression2) replacements: see
</td> the <A href="format_syntax.html">format string guide</A> for more details.</td>
</tr> </tr>
<tr>
<tr> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>format_no_copy</p>
<p>format_sed</p> </td>
</td> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>When specified during a search and replace operation, then sections of the
<p>Specifies that when a regular expression match is to be replaced character container sequence being searched that do match the regular
by a new string, that the new string is constructed using the rules expression, are not copied to the output string.</p>
used by the Unix sed utility in IEEE Std 1003.1-2001, Portable </td>
Operating SystemInterface (POSIX ), Shells and Utilities..</p> </tr>
</td> <tr>
</tr> <td valign="top" width="50%">
<p>format_first_only</p>
<tr> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>format_perl</p> <p>When specified during a search and replace operation, then only the first
</td> occurrence of the regular expression is replaced.</p>
<td valign="top" width="50%"> </td>
<p>Specifies that when a regular expression match is to be replaced </tr>
by a new string, that the new string is constructed using an </table>
implementation defined superset of the rules used by the ECMAScript <br>
replace function in ECMA-262, ECMAScript Language Specification, <br>
Chapter 15 part 5.4.11 String.prototype.replace (FWD.1).</p> <p></p>
</td> <hr>
</tr> <br>
<br>
<tr> <p>Revised
<td valign="top" width="50%" height="32">format_all</td> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
<td valign="top" width="50%" height="32">Specifies that all syntax 17 May 2003
extensions are enabled, including conditional <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
(?ddexpression1:expression2) replacements.</td> <p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a>&nbsp;1998-
</tr> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
2003
<tr> <!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<td valign="top" width="50%"> <p align="left"><i>Permission to use, copy, modify, distribute and sell this software
<p>format_no_copy</p> and its documentation for any purpose is hereby granted without fee, provided
</td> that the above copyright notice appear in all copies and that both that
<td valign="top" width="50%"> copyright notice and this permission notice appear in supporting documentation.
<p>When specified during a search and replace operation, then Dr John Maddock makes no representations about the suitability of this software
sections of the character container sequence being searched that do for any purpose. It is provided "as is" without express or implied warranty.</i></p>
match the regular expression, are not copied to the output </body>
string.</p>
</td>
</tr>
<tr>
<td valign="top" width="50%">
<p>format_first_only</p>
</td>
<td valign="top" width="50%">
<p>When specified during a search and replace operation, then only
the first occurrence of the regular expression is replaced.</p>
</td>
</tr>
</table>
<br>
<br>
<p></p>
<hr>
<br>
<br>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
17 May 2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i>&copy; Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
Maddock</a>&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<p align="left"><i>Permission to use, copy, modify, distribute and
sell this software and its documentation for any purpose is hereby
granted without fee, provided that the above copyright notice
appear in all copies and that both that copyright notice and this
permission notice appear in supporting documentation. Dr John
Maddock makes no representations about the suitability of this
software for any purpose. It is provided "as is" without express or
implied warranty.</i></p>
</body>
</html> </html>

View File

@ -1,77 +1,57 @@
<!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 match_results</title>
<title>Boost.Regex: class match_results</title> <meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content= <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
"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">
<tr>
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" <td valign="top" width="300">
border="0"> <h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
<tr> </td>
<td valign="top" width="300"> <td width="353">
<h3><a href="../../../index.htm"><img height="86" width="277" alt= <h1 align="center">Boost.Regex</h1>
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3> <h2 align="center">class match_results</h2>
</td> </td>
<td width="353"> <td width="50">
<h1 align="center">Boost.Regex</h1> <h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
</td>
<h2 align="center">class match_results</h2> </tr>
</td> </table>
<td width="50"> <br>
<h3><a href="index.html"><img height="45" width="43" alt= <br>
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3> <hr>
</td> <h3>Contents</h3>
</tr> <dl class="index">
</table> <dt><a href="#synopsis">Synopsis</a> <dt><a href="#description">Description</a></dt>
</dl>
<br> <h3><a name="synopsis"></a>Synopsis</h3>
<br> <p>#include &lt;<a href="../../../boost/regex.hpp">boost/regex.hpp</a>&gt;</p>
<p>Regular expressions are different from many simple pattern-matching algorithms
in that as well as finding an overall match they can also produce
<hr> sub-expression matches: each sub-expression being delimited in the pattern by a
<h3>Contents</h3> pair of parenthesis (...). There has to be some method for reporting
sub-expression matches back to the user: this is achieved this by defining a
<dl class="index"> class <i>match_results</i> that acts as an indexed collection of sub-expression
<dt><a href="#synopsis">Synopsis</a></dt> matches, each sub-expression match being contained in an object of type <i><a href="sub_match.html">
sub_match</a></i> .</p>
<dt><a href="#description">Description</a></dt> <p>Template class match_results denotes a collection of character sequences
</dl> representing the result of a regular expression match. Objects of type
match_results are passed to the algorithms <a href="regex_match.html">regex_match</a>
<h3><a name="synopsis"></a>Synopsis</h3> and <a href="regex_search.html">regex_search</a>, and are returned by the
iterator <a href="regex_iterator.html">regex_iterator</a> .&nbsp; Storage for
<p>#include &lt;<a href="../../../boost/regex.hpp">boost/regex.hpp</a>&gt;</p> the collection is allocated and freed as necessary by the member functions of
class match_results.</p>
<p>Regular expressions are different from many simple <p>The template class match_results conforms to the requirements of a Sequence, as
pattern-matching algorithms in that as well as finding an overall specified in (lib.sequence.reqmts), except that only operations defined for
match they can also produce sub-expression matches: each const-qualified Sequences are supported.</p>
sub-expression being delimited in the pattern by a pair of <p>Class template match_results is most commonly used as one of the typedefs
parenthesis (...). There has to be some method for reporting cmatch, wcmatch, smatch, or wsmatch:</p>
sub-expression matches back to the user: this is achieved this by <pre>
defining a class <i>match_results</i> that acts as an indexed
collection of sub-expression matches, each sub-expression match
being contained in an object of type <i><a href="sub_match.html">
sub_match</a></i> .</p>
<p>Template class match_results denotes a collection of character
sequences representing the result of a regular expression match.
Objects of type match_results are passed to the algorithms <a href="regex_match.html">regex_match</a> and <a href="regex_search.html">
regex_search</a>, and are returned by the iterator <a href="regex_iterator.html">regex_iterator</a> .&nbsp; Storage for the
collection is allocated and freed as necessary by the member
functions of class match_results.</p>
<p>The template class match_results conforms to the requirements of
a Sequence, as specified in (lib.sequence.reqmts), except that only
operations defined for const-qualified Sequences are supported.</p>
<p>Class template match_results is most commonly used as one of the
typedefs cmatch, wcmatch, smatch, or wsmatch:</p>
<pre>
template &lt;class BidirectionalIterator, template &lt;class BidirectionalIterator,
class Allocator = allocator&lt;sub_match&lt;BidirectionalIterator&gt; &gt; class Allocator = allocator&lt;sub_match&lt;BidirectionalIterator&gt; &gt;
class match_results; class match_results;
@ -98,414 +78,354 @@ public:
typedef basic_string&lt;char_type&gt; string_type; typedef basic_string&lt;char_type&gt; string_type;
// construct/copy/destroy: // construct/copy/destroy:
explicit match_results(const Allocator&amp; a = Allocator()); explicit <A href="#c1">match_results</A>(const Allocator&amp; a = Allocator());
match_results(const match_results&amp; m); <A href="#c2">match_results</A>(const match_results&amp; m);
match_results&amp; operator=(const match_results&amp; m); <A href="#c3">match_results</A>&amp; <A href="#c3">operator</A>=(const match_results&amp; m);
~match_results(); ~match_results();
// size: // size:
size_type size() const; size_type <A href="#m1">size</A>() const;
size_type max_size() const; size_type <A href="#m2">max_size</A>() const;
bool empty() const; bool <A href="#m3">empty</A>() const;
// element access: // element access:
difference_type length(int sub = 0) const; difference_type <A href="#m4">length</A>(int sub = 0) const;
difference_type position(unsigned int sub = 0) const; difference_type <A href="#m5">position</A>(unsigned int sub = 0) const;
string_type str(int sub = 0) const; string_type <A href="#m6">str</A>(int sub = 0) const;
const_reference operator[](int n) const; const_reference <A href="#m7">operator</A>[](int n) const;
const_reference prefix() const; const_reference <A href="#m8">prefix</A>() const;
const_reference suffix() const; const_reference <A href="#m9">suffix</A>() const;
const_iterator begin() const; const_iterator <A href="#m10">begin</A>() const;
const_iterator end() const; const_iterator <A href="#m11">end</A>() const;
// format: // format:
template &lt;class OutputIterator&gt; template &lt;class OutputIterator&gt;
OutputIterator format(OutputIterator out, OutputIterator <A href="#m12">format</A>(OutputIterator out,
const string_type&amp; fmt, const string_type&amp; fmt,
match_flag_type flags = format_default) const; match_flag_type flags = format_default) const;
string_type format(const string_type&amp; fmt, string_type <A href="#m13">format</A>(const string_type&amp; fmt,
match_flag_type flags = format_default) const; match_flag_type flags = format_default) const;
allocator_type get_allocator() const; allocator_type <A href="#m14">get_allocator</A>() const;
void swap(match_results&amp; that); void <A href="#m15">swap</A>(match_results&amp; that);
}; };
template &lt;class BidirectionalIterator, class Allocator&gt; template &lt;class BidirectionalIterator, class Allocator&gt;
bool operator == (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1, bool <A href="#n1">operator</A> == (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2); const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
template &lt;class BidirectionalIterator, class Allocator&gt; template &lt;class BidirectionalIterator, class Allocator&gt;
bool operator != (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1, bool <A href="#n2">operator</A> != (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2); const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
template &lt;class charT, class traits, class BidirectionalIterator, class Allocator&gt; template &lt;class charT, class traits, class BidirectionalIterator, class Allocator&gt;
basic_ostream&lt;charT, traits&gt;&amp; basic_ostream&lt;charT, traits&gt;&amp;
operator &lt;&lt; (basic_ostream&lt;charT, traits&gt;&amp; os, <A href="#n3">operator</A> &lt;&lt; (basic_ostream&lt;charT, traits&gt;&amp; os,
const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m); const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m);
template &lt;class BidirectionalIterator, class Allocator&gt; template &lt;class BidirectionalIterator, class Allocator&gt;
void swap(match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1, void <A href="#n4">swap</A>(match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2); match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
</pre> </pre>
<h3><a name="description"></a>Description</h3>
<h3><a name="description"></a>Description</h3> <h4>match_results constructors</h4>
<p>In all <code>match_results</code> constructors, a copy of the Allocator
<h4>match_results constructors</h4> argument is used for any memory allocation performed by the constructor or
member functions during the lifetime of the object.</p>
<p>In all <code>match_results</code> constructors, a copy of the <pre><A name=c1></A>
Allocator argument is used for any memory allocation performed by
the constructor or member functions during the lifetime of the
object.</p>
<pre>
match_results(const Allocator&amp; a = Allocator()); match_results(const Allocator&amp; a = Allocator());
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Constructs an object of class match_results. The postconditions
<p><b>Effects:</b> Constructs an object of class match_results. The of this function are indicated in the table:</p>
postconditions of this function are indicated in the table:</p> <p align="center"></p>
<center>
<p align="center"></p> <table id="Table2" cellspacing="1" cellpadding="7" width="624" border="1">
<tbody>
<center> <tr>
<table id="Table2" cellspacing="1" cellpadding="7" width="624" <td valign="top" width="50%"><b></b>
border="1"> <p><b>Element</b></p>
<tbody> </td>
<tr> <td valign="top" width="50%"><b></b>
<td valign="top" width="50%"><b></b> <p><b>Value</b></p>
<p><b>Element</b></p> </td>
</td> </tr>
<td valign="top" width="50%"><b></b> <tr>
<p><b>Value</b></p> <td valign="top" width="50%">
</td> <p>empty()</p>
</tr> </td>
<td valign="top" width="50%">
<tr> <p>true</p>
<td valign="top" width="50%"> </td>
<p>empty()</p> </tr>
</td> <tr>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>true</p> <p>size()</p>
</td> </td>
</tr> <td valign="top" width="50%">
<p>0</p>
<tr> </td>
<td valign="top" width="50%"> </tr>
<p>size()</p> <tr>
</td> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>str()</p>
<p>0</p> </td>
</td> <td valign="top" width="50%">
</tr> <p>basic_string&lt;charT&gt;()</p>
</td>
<tr> </tr>
<td valign="top" width="50%"> </tbody>
<p>str()</p> </table>
</td> </center>
<td valign="top" width="50%"> <p>&nbsp;</p>
<p>basic_string&lt;charT&gt;()</p> <pre><A name=c2></A>
</td>
</tr>
</tbody>
</table>
</center>
<p>&nbsp;</p>
<pre>
match_results(const match_results&amp; m); match_results(const match_results&amp; m);
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Constructs an object of class match_results, as a copy of m.</p>
<p><b>Effects:</b> Constructs an object of class match_results, as <pre><A name=c3></A>
a copy of m.</p>
<pre>
match_results&amp; operator=(const match_results&amp; m); match_results&amp; operator=(const match_results&amp; m);
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Assigns m to *this. The postconditions of this function are
<p><b>Effects:</b> Assigns m to *this. The postconditions of this indicated in the table:</p>
function are indicated in the table:</p> <p align="center"></p>
<center>
<p align="center"></p> <table id="Table3" cellspacing="1" cellpadding="7" width="624" border="1">
<tbody>
<center> <tr>
<table id="Table3" cellspacing="1" cellpadding="7" width="624" <td valign="top" width="50%"><b></b>
border="1"> <p><b>Element</b></p>
<tbody> </td>
<tr> <td valign="top" width="50%"><b></b>
<td valign="top" width="50%"><b></b> <p><b>Value</b></p>
<p><b>Element</b></p> </td>
</td> </tr>
<td valign="top" width="50%"><b></b> <tr>
<p><b>Value</b></p> <td valign="top" width="50%">
</td> <p>empty()</p>
</tr> </td>
<td valign="top" width="50%">
<tr> <p>m.empty().</p>
<td valign="top" width="50%"> </td>
<p>empty()</p> </tr>
</td> <tr>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>m.empty().</p> <p>size()</p>
</td> </td>
</tr> <td valign="top" width="50%">
<p>m.size().</p>
<tr> </td>
<td valign="top" width="50%"> </tr>
<p>size()</p> <tr>
</td> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>str(n)</p>
<p>m.size().</p> </td>
</td> <td valign="top" width="50%">
</tr> <p>m.str(n) for all integers n &lt; m.size().</p>
</td>
<tr> </tr>
<td valign="top" width="50%"> <tr>
<p>str(n)</p> <td valign="top" width="50%">
</td> <p>prefix()</p>
<td valign="top" width="50%"> </td>
<p>m.str(n) for all integers n &lt; m.size().</p> <td valign="top" width="50%">
</td> <p>m.prefix().</p>
</tr> </td>
</tr>
<tr> <tr>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>prefix()</p> <p>suffix()</p>
</td> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>m.prefix().</p> <p>m.suffix().</p>
</td> </td>
</tr> </tr>
<tr>
<tr> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>(*this)[n]</p>
<p>suffix()</p> </td>
</td> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>m[n] for all integers n &lt; m.size().</p>
<p>m.suffix().</p> </td>
</td> </tr>
</tr> <tr>
<td valign="top" width="50%">
<tr> <p>length(n)</p>
<td valign="top" width="50%"> </td>
<p>(*this)[n]</p> <td valign="top" width="50%">
</td> <p>m.length(n) for all integers n &lt; m.size().</p>
<td valign="top" width="50%"> </td>
<p>m[n] for all integers n &lt; m.size().</p> </tr>
</td> <tr>
</tr> <td valign="top" width="50%">
<p>position(n)</p>
<tr> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>length(n)</p> <p>m.position(n) for all integers n &lt; m.size().</p>
</td> </td>
<td valign="top" width="50%"> </tr>
<p>m.length(n) for all integers n &lt; m.size().</p> </tbody>
</td> </table>
</tr> </center>
<h4>match_results size</h4>
<tr> <pre><A name=m1></A>
<td valign="top" width="50%">
<p>position(n)</p>
</td>
<td valign="top" width="50%">
<p>m.position(n) for all integers n &lt; m.size().</p>
</td>
</tr>
</tbody>
</table>
</center>
<h4>match_results size</h4>
<pre>
size_type size()const; size_type size()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns the number of sub_match elements stored in *this; that
<p><b>Effects:</b> Returns the number of sub_match elements stored is the number of marked sub-expressions in the regular expression that was
in *this.</p> matched plus one.</p>
<pre><A name=m2></A>
<pre>
size_type max_size()const; size_type max_size()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns the maximum number of sub_match elements that can be
<p><b>Effects:</b> Returns the maximum number of sub_match elements stored in *this.</p>
that can be stored in *this.</p> <pre><A name=m3></A>
<pre>
bool empty()const; bool empty()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns <code>size() == 0</code>.</p>
<p><b>Effects:</b> Returns <code>size() == 0</code>.</p> <h4>match_results element access</h4>
<pre><A name=m4></A>
<h4>match_results element access</h4>
<pre>
difference_type length(int sub = 0)const; difference_type length(int sub = 0)const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns the length of sub-expression <EM>sub</EM>, that is to
<p><b>Effects:</b> Returns <code>(*this)[sub].length()</code>.</p> say: <code>(*this)[sub].length()</code>.</p>
<pre><A name=m5></A>
<pre>
difference_type position(unsigned int sub = 0)const; difference_type position(unsigned int sub = 0)const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns the starting location of sub-expression <EM>sub</EM>,
<p><b>Effects:</b> Returns <code>std::distance(prefix().first, or -1 if <EM>sub</EM> was not matched <code>.</code></p>
(*this)[sub].first).</code></p> <pre><A name=m6></A>
<pre>
string_type str(int sub = 0)const; string_type str(int sub = 0)const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns sub-expression <EM>sub</EM> as a string:&nbsp; <code>string_type((*this)[sub]).</code></p>
<p><b>Effects:</b> Returns <code> <pre><A name=m7></A>
string_type((*this)[sub]).</code></p>
<pre>
const_reference operator[](int n) const; const_reference operator[](int n) const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns a reference to the <code>sub_match</code> object
<p><b>Effects:</b> Returns a reference to the <code> representing the character sequence that matched marked sub-expression <i>n</i>.
sub_match</code> object representing the character sequence that If <code>n == 0</code> then returns a reference to a <code>sub_match</code> object
matched marked sub-expression <i>n</i>. If <code>n == 0</code> then representing the character sequence that matched the whole regular
returns a reference to a <code>sub_match</code> object representing expression.&nbsp; If <EM>n</EM> is out of range, or if <EM>n</EM> is an
the character sequence that matched the whole regular unmatched sub-expression, then returns a sub_match object whose <EM>matched</EM>
expression.</p> member is <EM>false</EM>.</p>
<pre><A name=m8></A>
<pre>
const_reference prefix()const; const_reference prefix()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns a reference to the <code>sub_match</code> object
<p><b>Effects:</b> Returns a reference to the <code> representing the character sequence from the start of the string being
sub_match</code> object representing the character sequence from matched/searched, to the start of the match found.</p>
the start of the string being matched/searched, to the start of the <pre><A name=m9></A>
match found.</p>
<pre>
const_reference suffix()const; const_reference suffix()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns a reference to the <code>sub_match</code> object
<p><b>Effects:</b> Returns a reference to the <code> representing the character sequence from the end of the match found to the end
sub_match</code> object representing the character sequence from of the string being matched/searched.</p>
the end of the match found to the end of the string being <pre><A name=m10></A>
matched/searched.</p>
<pre>
const_iterator begin()const; const_iterator begin()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns a starting iterator that enumerates over all the marked
<p><b>Effects:</b> Returns a starting iterator that enumerates over sub-expression matches stored in *this.</p>
all the marked sub-expression matches stored in *this.</p> <pre><A name=m11></A>
<pre>
const_iterator end()const; const_iterator end()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns a terminating iterator that enumerates over all the
<p><b>Effects:</b> Returns a terminating iterator that enumerates marked sub-expression matches stored in *this.</p>
over all the marked sub-expression matches stored in *this.</p> <h4><A name="format"></A>match_results reformatting</h4>
<pre><A name=m12></A>
<h4>match_results reformatting</h4>
<pre>
template &lt;class OutputIterator&gt; template &lt;class OutputIterator&gt;
OutputIterator format(OutputIterator out, OutputIterator format(OutputIterator out,
const string_type&amp; fmt, const string_type&amp; fmt,
<a href="match_flag_type.html">match_flag_type</a> flags = format_default); <a href="match_flag_type.html">match_flag_type</a> flags = format_default);
</pre> </pre>
<b></b>
<b></b> <p><b>Requires:</b> The type OutputIterator conforms to the Output Iterator
<p><b>Requires:</b> The type OutputIterator conforms to the Output requirements (24.1.2).</p>
Iterator requirements (24.1.2).</p> <b></b>
<p><b>Effects:</b> Copies the character sequence <i>[fmt.begin(), fmt.end())</i> to
<b></b> OutputIterator <i>out</i>. For each format specifier or escape sequence in <i>fmt</i>,
<p><b>Effects:</b> Copies the character sequence <i>[fmt.begin(), replace that sequence with either the character(s) it represents, or the
fmt.end())</i> to OutputIterator <i>out</i>. For each format sequence of characters within *this to which it refers. The bitmasks specified
specifier or escape sequence in <i>fmt</i>, replace that sequence in <i><a href="match_flag_type.html">flags</a></i> determines what <a href="format_syntax.html">
with either the character(s) it represents, or the sequence of format specifiers or escape sequences are recognized</a>, by default this is
characters within *this to which it refers. The bitmasks specified the format used by ECMA-262, ECMAScript Language Specification, Chapter 15 part
in <i><a href="match_flag_type.html">flags</a></i> determines what 5.4.11 String.prototype.replace.</p>
<a href="format_syntax.html">format specifiers or escape sequences <b></b>
are recognized</a>, by default this is the format used by ECMA-262, <p><b>Returns:</b> <i>out</i>.</p>
ECMAScript Language Specification, Chapter 15 part 5.4.11 <pre><A name=m13></A>
String.prototype.replace.</p>
<b></b>
<p><b>Returns:</b> <i>out</i>.</p>
<pre>
string_type format(const string_type&amp; fmt, string_type format(const string_type&amp; fmt,
<a href="match_flag_type.html">match_flag_type</a> flags = format_default); <a href="match_flag_type.html">match_flag_type</a> flags = format_default);
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns a copy of the string <i>fmt</i>. For each format
<p><b>Effects:</b> Returns a copy of the string <i>fmt</i>. For specifier or escape sequence in <i>fmt</i>, replace that sequence with either
each format specifier or escape sequence in <i>fmt</i>, replace the character(s) it represents, or the sequence of characters within *this to
that sequence with either the character(s) it represents, or the which it refers. The bitmasks specified in <i><a href="match_flag_type.html">flags</a></i>
sequence of characters within *this to which it refers. The determines what <a href="format_syntax.html">format specifiers or escape sequences
bitmasks specified in <i><a href="match_flag_type.html"> are recognized</a>, by default this is the format used by ECMA-262,
flags</a></i> determines what <a href="format_syntax.html">format ECMAScript Language Specification, Chapter 15 part 5.4.11
specifiers or escape sequences are recognized</a>, by default this String.prototype.replace.</p>
is the format used by ECMA-262, ECMAScript Language Specification, <pre><A name=m14></A>
Chapter 15 part 5.4.11 String.prototype.replace.</p>
<pre>
allocator_type get_allocator()const; allocator_type get_allocator()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns a copy of the Allocator that was passed to the object's
<p><b>Effects:</b> Returns a copy of the Allocator that was passed constructor.</p>
to the object's constructor.</p> <pre><A name=m15></A>
<pre>
void swap(match_results&amp; that); void swap(match_results&amp; that);
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Swaps the contents of the two sequences.</p>
<p><b>Effects:</b> Swaps the contents of the two sequences.</p> <b></b>
<p><b>Postcondition:</b> <code>*this</code> contains the sequence of matched
<b></b> sub-expressions that were in <code>that</code>, <code>that</code> contains the
<p><b>Postcondition:</b> <code>*this</code> contains the sequence sequence of matched sub-expressions that were in <code>*this</code>.</p>
of matched sub-expressions that were in <code>that</code>, <code> <b></b>
that</code> contains the sequence of matched sub-expressions that <p><b>Complexity:</b> constant time.</p>
were in <code>*this</code>.</p> <h4>match_results non-members</h4>
<PRE><A name=n1></A>template &lt;class BidirectionalIterator, class Allocator&gt;
<b></b> bool operator == (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
<p><b>Complexity:</b> constant time.</p> const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);</PRE>
<P><B>Effects:</B> Compares the two sequences for equality.</P>
<p></p> <PRE><A name=n2></A>template &lt;class BidirectionalIterator, class Allocator&gt;
bool operator != (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
<hr> const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);</PRE>
<p>Revised <P><B>Effects:</B> Compares the two sequences for inequality.</P>
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> <PRE><A name=n3></A>template &lt;class charT, class traits, class BidirectionalIterator, class Allocator&gt;
17 May 2003 basic_ostream&lt;charT, traits&gt;&amp;
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p> operator &lt;&lt; (basic_ostream&lt;charT, traits&gt;&amp; os,
const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m);</PRE>
<p><i>&copy; Copyright <a href="mailto:jm@regex.fsnet.co.uk">John <P><B>Effects:</B> Writes the contents of <EM>m</EM> to the stream <EM>os</EM> as
Maddock</a>&nbsp;1998- if by calling <code>os &lt;&lt; m.str();</code> Returns <EM>os</EM>..</P>
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> <PRE><A name=n4></A>template &lt;class BidirectionalIterator, class Allocator&gt;
2003 void swap(match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p> match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);</PRE>
<P><B>Effects:</B> Swaps the contents of the two sequences.</P>
<p align="left"><i>Permission to use, copy, modify, distribute and <p></p>
sell this software and its documentation for any purpose is hereby <hr>
granted without fee, provided that the above copyright notice <p>Revised
appear in all copies and that both that copyright notice and this <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
permission notice appear in supporting documentation. Dr John 17 May 2003
Maddock makes no representations about the suitability of this <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
software for any purpose. It is provided "as is" without express or <p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a>&nbsp;1998-
implied warranty.</i></p> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
</body> 2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<p align="left"><i>Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee, provided
that the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting documentation.
Dr John Maddock makes no representations about the suitability of this software
for any purpose. It is provided "as is" without express or implied warranty.</i></p>
</body>
</html> </html>

View File

@ -25,14 +25,15 @@
<HR> <HR>
<p></p> <p></p>
<P>If you are using Microsoft or Borland C++ and link to a dll version of the run <P>If you are using Microsoft or Borland C++ and link to a dll version of the run
time library, then you will also link to one of the dll versions of time library, then you can choose to also link to a dll version of boost.regex
boost.regex. While these dll's are redistributable, there are no "standard" by defining the symbol BOOST_REGEX_DYN_LINK when you compile your code. While
versions, so when installing on the users PC, you should place these in a these dll's are redistributable, there are no "standard" versions, so when
directory private to your application, and not in the PC's directory path. Note installing on the users PC, you should place these in a directory private to
that if you link to a static version of your run time library, then you will your application, and not in the PC's directory path. Note that if you link to
also link to a static version of boost.regex and no dll's will need to be a static version of your run time library, then you will also link to a static
distributed. The possible boost.regex dll and library names are computed version of boost.regex and no dll's will need to be distributed. The possible
according to the following formula:<BR> boost.regex dll and library names are computed according to the following
formula:<BR>
</P> </P>
<P></P> <P></P>
<P>BOOST_LIB_PREFIX<BR> <P>BOOST_LIB_PREFIX<BR>

View File

@ -42,40 +42,39 @@ template &lt;class BidirectionalIterator,
class regex_iterator class regex_iterator
{ {
public: public:
typedef basic_regex&lt;charT, traits, Allocator&gt; regex_type; typedef <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator&gt; regex_type;
typedef match_results&lt;BidirectionalIterator&gt; value_type; typedef <A href="match_results.html">match_results</A>&lt;BidirectionalIterator&gt; value_type;
typedef typename iterator_traits&lt;BidirectionalIterator&gt;::difference_type difference_type; typedef typename iterator_traits&lt;BidirectionalIterator&gt;::difference_type difference_type;
typedef const value_type* pointer; typedef const value_type* pointer;
typedef const value_type&amp; reference; typedef const value_type&amp; reference;
typedef std::forward_iterator_tag iterator_category; typedef std::forward_iterator_tag iterator_category;
regex_iterator(); <A href="#c1">regex_iterator</A>();
regex_iterator(BidirectionalIterator a, BidirectionalIterator b, <A href="#c2">regex_iterator</A>(BidirectionalIterator a, BidirectionalIterator b,
const regex_type&amp; re, const regex_type&amp; re,
match_flag_type m = match_default); <A href="match_flag_type.html">match_flag_type</A> m = match_default);
regex_iterator(const regex_iterator&amp;); <A href="#c3">regex_iterator</A>(const regex_iterator&amp;);
regex_iterator&amp; operator=(const regex_iterator&amp;); regex_iterator&amp; <A href="#o1">operator</A>=(const regex_iterator&amp;);
bool operator==(const regex_iterator&amp;); bool <A href="#o2">operator</A>==(const regex_iterator&amp;)const;
bool operator!=(const regex_iterator&amp;); bool <A href="#o3">operator</A>!=(const regex_iterator&amp;)const;
const value_type&amp; operator*(); const value_type&amp; <A href="#o4">operator</A>*()const;
const value_type* operator-&gt;(); const value_type* <A href="#o5">operator</A>-&gt;()const;
regex_iterator&amp; operator++(); regex_iterator&amp; <A href="#o6">operator</A>++();
regex_iterator operator++(int); regex_iterator <A href="#o7">operator</A>++(int);
}; };
</pre> </pre>
<h3><a name="description"></a>Description</h3> <h3><a name="description"></a>Description</h3>
<p>A regex_iterator is constructed from a pair of iterators, and enumerates all <p>A regex_iterator is constructed from a pair of iterators, and enumerates all
occurrences of a regular expression within that iterator range.</p> occurrences of a regular expression within that iterator range.</p>
<pre> <pre><A name=c1></A>
regex_iterator(); regex_iterator();
</pre> </pre>
<b></b> <b></b>
<p><b>Effects:</b> constructs an end of sequence regex_iterator.</p> <p><b>Effects:</b> constructs an end of sequence regex_iterator.</p>
<pre> <pre><A name=c2></A>regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
const regex_type&amp; re, const regex_type&amp; re,
match_flag_type m = match_default); <A href="match_flag_type.html">match_flag_type</A> m = match_default);
</pre> </pre>
<b></b> <b></b>
<p><b>Effects:</b> constructs a regex_iterator that will enumerate all occurrences <p><b>Effects:</b> constructs a regex_iterator that will enumerate all occurrences
@ -88,32 +87,32 @@ regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
Boost.regex is <A href="configuration.html">configured</A> in recursive mode), Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html"> or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
<pre> <pre><A name=c3></A>
regex_iterator(const regex_iterator&amp; that); regex_iterator(const regex_iterator&amp; that);
</pre> </pre>
<b></b> <b></b>
<p><b>Effects:</b> constructs a copy of <code>that</code>.</p> <p><b>Effects:</b> constructs a copy of <code>that</code>.</p>
<b></b> <b></b>
<p><b>Postconditions:</b> <code>*this == that</code>.</p> <p><b>Postconditions:</b> <code>*this == that</code>.</p>
<pre> <pre><A name=o1></A>
regex_iterator&amp; operator=(const regex_iterator&amp;); regex_iterator&amp; operator=(const regex_iterator&amp;);
</pre> </pre>
<b></b> <b></b>
<p><b>Effects:</b> sets&nbsp;<code>*this</code> equal to those in <code>that</code>.</p> <p><b>Effects:</b> sets&nbsp;<code>*this</code> equal to those in <code>that</code>.</p>
<b></b> <b></b>
<p><b>Postconditions:</b> <code>*this == that</code>.</p> <p><b>Postconditions:</b> <code>*this == that</code>.</p>
<pre> <pre><A name=o2></A>
bool operator==(const regex_iterator&amp; that); bool operator==(const regex_iterator&amp; that)const;
</pre> </pre>
<b></b> <b></b>
<p><b>Effects:</b> returns true if *this is equal to that.</p> <p><b>Effects:</b> returns true if *this is equal to that.</p>
<pre> <pre><A name=o3></A>
bool operator!=(const regex_iterator&amp;); bool operator!=(const regex_iterator&amp;)const;
</pre> </pre>
<b></b> <b></b>
<p><b>Effects:</b> returns <code>!(*this == that)</code>.</p> <p><b>Effects:</b> returns <code>!(*this == that)</code>.</p>
<pre> <pre><A name=o4></A>
const value_type&amp; operator*(); const value_type&amp; operator*()const;
</pre> </pre>
<p><b>Effects:</b> dereferencing a regex_iterator object <em>it</em> yields a <p><b>Effects:</b> dereferencing a regex_iterator object <em>it</em> yields a
const reference to a <a href="match_results.html">match_results</a> object, const reference to a <a href="match_results.html">match_results</a> object,
@ -159,7 +158,8 @@ const value_type&amp; operator*();
<p>(*it).prefix().last</p> <p>(*it).prefix().last</p>
</td> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>(*it)[0].first</p> <p>The same as the start of the match found:<BR>
(*it)[0].first</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -167,7 +167,8 @@ const value_type&amp; operator*();
<p>(*it).prefix().matched</p> <p>(*it).prefix().matched</p>
</td> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>(*it).prefix().first != (*it).prefix().second</p> <p>True if the prefix did not match an empty string:<BR>
(*it).prefix().first != (*it).prefix().second</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -175,7 +176,8 @@ const value_type&amp; operator*();
<p>(*it).suffix().first</p> <p>(*it).suffix().first</p>
</td> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>(*it)[0].second</p> <p>The same as the end of the match found:<BR>
(*it)[0].second</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -191,7 +193,8 @@ const value_type&amp; operator*();
<p>(*it).suffix().matched</p> <p>(*it).suffix().matched</p>
</td> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>(*it).suffix().first != (*it).suffix().second</p> <p>True if the suffix did not match an empty string:<BR>
(*it).suffix().first != (*it).suffix().second</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -259,12 +262,12 @@ const value_type&amp; operator*();
</table> </table>
<br> <br>
<br> <br>
<pre> <pre><A name=o5></A>
const value_type* operator-&gt;(); const value_type* operator-&gt;()const;
</pre> </pre>
<b></b> <b></b>
<p><b>Effects:</b> returns <code>&amp;(*this)</code>.</p> <p><b>Effects:</b> returns <code>&amp;(*this)</code>.</p>
<pre> <pre><A name=o6></A>
regex_iterator&amp; operator++(); regex_iterator&amp; operator++();
</pre> </pre>
<p><strong>Effects:</strong> moves the iterator to the next match in the <p><strong>Effects:</strong> moves the iterator to the next match in the
@ -282,7 +285,7 @@ regex_iterator&amp; operator++();
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
<b></b> <b></b>
<p><b>Returns:</b> <code>*this</code>.</p> <p><b>Returns:</b> <code>*this</code>.</p>
<pre> <pre><A name=o7></A>
regex_iterator operator++(int); regex_iterator operator++(int);
</pre> </pre>
<b></b> <b></b>

View File

@ -31,47 +31,53 @@
</dl> </dl>
<H3><A name="synopsis"></A>Synopsis</H3> <H3><A name="synopsis"></A>Synopsis</H3>
<PRE><A name=query_match></A>#include &lt;<A href="../../../boost/regex.hpp">boost/regex.hpp</A>&gt; </PRE> <PRE><A name=query_match></A>#include &lt;<A href="../../../boost/regex.hpp">boost/regex.hpp</A>&gt; </PRE>
<P>The algorithm regex _match determines whether a given regular expression <P>
matches a given sequence denoted by a pair of bidirectional-iterators, the The algorithm regex _match determines whether a given regular expression
algorithm is defined as follows, <STRONG>note that the result is true only if the matches all of a given character sequence denoted by a pair of
expression matches the whole of the input sequence</STRONG>, the main use of bidirectional-iterators, the algorithm is defined as follows, the main use of
this function is data input validation. this function is data input validation.
<P><STRONG>Note that the result is true only if the expression matches the whole of
the input sequence.&nbsp;</STRONG> If you want to search for an expression
somewhere within the sequence then use <A href="regex_search.html">regex_search</A>.&nbsp;
If you want to match a prefix of the character string then use <A href="regex_search.html">
regex_search</A> with the flag <A href="match_flag_type.html">match_continuous</A>
set.
<PRE>template &lt;class BidirectionalIterator, class Allocator, class charT, <PRE>template &lt;class BidirectionalIterator, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_match(BidirectionalIterator first, BidirectionalIterator last, bool <A href="#f1">regex_match</A>(BidirectionalIterator first, BidirectionalIterator last,
<A href="match_results.html">match_results</A>&lt;BidirectionalIterator, Allocator&gt;&amp; m, <A href="match_results.html">match_results</A>&lt;BidirectionalIterator, Allocator&gt;&amp; m,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default); <A href="match_flag_type.html">match_flag_type</A> flags = match_default);
template &lt;class BidirectionalIterator, class charT, class traits, class Allocator2&gt; template &lt;class BidirectionalIterator, class charT, class traits, class Allocator2&gt;
bool regex_match(BidirectionalIterator first, BidirectionalIterator last, bool <A href="#f2">regex_match</A>(BidirectionalIterator first, BidirectionalIterator last,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default); <A href="match_flag_type.html">match_flag_type</A> flags = match_default);
template &lt;class charT, class Allocator, class traits, class Allocator2&gt; template &lt;class charT, class Allocator, class traits, class Allocator2&gt;
bool regex_match(const charT* str, <A href="match_results.html">match_results</A>&lt;const charT*, Allocator&gt;&amp; m, bool <A href="#f3">regex_match</A>(const charT* str, <A href="match_results.html">match_results</A>&lt;const charT*, Allocator&gt;&amp; m,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default); <A href="match_flag_type.html">match_flag_type</A> flags = match_default);
template &lt;class ST, class SA, class Allocator, class charT, template &lt;class ST, class SA, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool <A href="#f4">regex_match</A>(const basic_string&lt;charT, ST, SA&gt;&amp; s,
<A href="match_results.html">match_results</A>&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator, Allocator&gt;&amp; m, <A href="match_results.html">match_results</A>&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator, Allocator&gt;&amp; m,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default); <A href="match_flag_type.html">match_flag_type</A> flags = match_default);
template &lt;class charT, class traits, class Allocator2&gt; template &lt;class charT, class traits, class Allocator2&gt;
bool regex_match(const charT* str, bool <A href="#f5">regex_match</A>(const charT* str,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default); <A href="match_flag_type.html">match_flag_type</A> flags = match_default);
template &lt;class ST, class SA, class charT, class traits, class Allocator2&gt; template &lt;class ST, class SA, class charT, class traits, class Allocator2&gt;
bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool <A href="#f6">regex_match</A>(const basic_string&lt;charT, ST, SA&gt;&amp; s,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default); <A href="match_flag_type.html">match_flag_type</A> flags = match_default);
</PRE> </PRE>
<H3><A name="description"></A>Description</H3> <H3><A name="description"></A>Description</H3>
<PRE>template &lt;class BidirectionalIterator, class Allocator, class charT, <PRE><A name=f1></A>template &lt;class BidirectionalIterator, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_match(BidirectionalIterator first, BidirectionalIterator last, bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
<A href="match_results.html">match_results</A>&lt;BidirectionalIterator, Allocator&gt;&amp; m, <A href="match_results.html">match_results</A>&lt;BidirectionalIterator, Allocator&gt;&amp; m,
@ -84,9 +90,9 @@ bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
flags</I> is used to <A href="match_flag_type.html">control how the expression flags</I> is used to <A href="match_flag_type.html">control how the expression
is matched</A> against the character sequence. Returns true if such a match is matched</A> against the character sequence. Returns true if such a match
exists, false otherwise.</P> exists, false otherwise.</P>
<P><STRONG>Throws:</STRONG> <code>std::runtime_error</code> if the complexity of matching the <P><STRONG>Throws:</STRONG> <code>std::runtime_error</code> if the complexity of
expression against an N character string begins to exceed O(N<SUP>2</SUP>), or matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
if the program runs out of stack space while matching the expression (if or if the program runs out of stack space while matching the expression (if
Boost.regex is <A href="configuration.html">configured</A> in recursive mode), Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html"> or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
@ -231,20 +237,20 @@ bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
<P></P> <P></P>
<DIV></DIV> <DIV></DIV>
<PRE>&nbsp;</PRE> <PRE>&nbsp;</PRE>
<PRE>template &lt;class BidirectionalIterator, class charT, class traits, class Allocator2&gt; <PRE><A name=f2></A>template &lt;class BidirectionalIterator, class charT, class traits, class Allocator2&gt;
bool regex_match(BidirectionalIterator first, BidirectionalIterator last, bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE> <A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
<P><B> Effects:</B> Behaves "as if" by constructing an instance of <CODE><A href="match_results.html"> <P><B> Effects:</B> Behaves "as if" by constructing an instance of <CODE><A href="match_results.html">
match_results</A>&lt;</CODE>BidirectionalIterator<CODE>&gt; what</CODE>, match_results</A>&lt;</CODE>BidirectionalIterator<CODE>&gt; what</CODE>,
and then returning the result of <CODE>regex_match(first, last, what, e, flags)</CODE>.</P> and then returning the result of <CODE>regex_match(first, last, what, e, flags)</CODE>.</P>
<PRE>template &lt;class charT, class Allocator, class traits, class Allocator2&gt; <PRE><A name=f3></A>template &lt;class charT, class Allocator, class traits, class Allocator2&gt;
bool regex_match(const charT* str, <A href="match_results.html">match_results</A>&lt;const charT*, Allocator&gt;&amp; m, bool regex_match(const charT* str, <A href="match_results.html">match_results</A>&lt;const charT*, Allocator&gt;&amp; m,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE> <A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
<P><B> Effects:</B> Returns the result of <CODE>regex_match(str, str + <P><B> Effects:</B> Returns the result of <CODE>regex_match(str, str +
char_traits&lt;charT&gt;::length(str), m, e, flags)</CODE>.</P> char_traits&lt;charT&gt;::length(str), m, e, flags)</CODE>.</P>
<PRE>template &lt;class ST, class SA, class Allocator, class charT, <PRE><A name=f4></A>template &lt;class ST, class SA, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s,
<A href="match_results.html">match_results</A>&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator, Allocator&gt;&amp; m, <A href="match_results.html">match_results</A>&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator, Allocator&gt;&amp; m,
@ -252,13 +258,13 @@ bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE> <A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
<P><B> Effects:</B> Returns the result of <CODE>regex_match(s.begin(), s.end(), m, e, <P><B> Effects:</B> Returns the result of <CODE>regex_match(s.begin(), s.end(), m, e,
flags)</CODE>.</P> flags)</CODE>.</P>
<PRE>template &lt;class charT, class traits, class Allocator2&gt; <PRE><A name=f5></A>template &lt;class charT, class traits, class Allocator2&gt;
bool regex_match(const charT* str, bool regex_match(const charT* str,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE> <A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
<P><B> Effects:</B> Returns the result of <CODE>regex_match(str, str + <P><B> Effects:</B> Returns the result of <CODE>regex_match(str, str +
char_traits&lt;charT&gt;::length(str), e, flags)</CODE>.</P> char_traits&lt;charT&gt;::length(str), e, flags)</CODE>.</P>
<PRE>template &lt;class ST, class SA, class charT, class traits, class Allocator2&gt; <PRE><A name=f6></A>template &lt;class ST, class SA, class charT, class traits, class Allocator2&gt;
bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE> <A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>

View File

@ -29,7 +29,7 @@
<H3><A name="synopsis"></A>Synopsis</H3> <H3><A name="synopsis"></A>Synopsis</H3>
<PRE>#include &lt;<A href="../../../boost/regex.hpp">boost/regex.hpp</A>&gt; </PRE> <PRE>#include &lt;<A href="../../../boost/regex.hpp">boost/regex.hpp</A>&gt; </PRE>
<P>The algorithm regex_replace&nbsp;searches&nbsp;through&nbsp;a string finding <P>The algorithm regex_replace&nbsp;searches&nbsp;through&nbsp;a string finding
all the matches to the regular expression: for each match it then calls <A href="match_results.html"> all the matches to the regular expression: for each match it then calls <A href="match_results.html#format">
match_results::format</A> to format the string and sends the result to the match_results::format</A> to format the string and sends the result to the
output iterator. Sections of text that do not match are copied to the output output iterator. Sections of text that do not match are copied to the output
unchanged only if the <EM>flags</EM> parameter does not have the flag <A href="match_flag_type.html"> unchanged only if the <EM>flags</EM> parameter does not have the flag <A href="match_flag_type.html">
@ -37,39 +37,87 @@
is set then only the first occurrence is replaced rather than all is set then only the first occurrence is replaced rather than all
occurrences.&nbsp;<PRE>template &lt;class OutputIterator, class BidirectionalIterator, class traits, occurrences.&nbsp;<PRE>template &lt;class OutputIterator, class BidirectionalIterator, class traits,
class Allocator, class charT&gt; class Allocator, class charT&gt;
OutputIterator regex_replace(OutputIterator out, OutputIterator <A href="#f1">regex_replace</A>(OutputIterator out,
BidirectionalIterator first, BidirectionalIterator first,
BidirectionalIterator last, BidirectionalIterator last,
const basic_regex&lt;charT, traits, Allocator&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator&gt;&amp; e,
const basic_string&lt;charT&gt;&amp; fmt, const basic_string&lt;charT&gt;&amp; fmt,
match_flag_type flags = match_default); <A href="match_flag_type.html">match_flag_type flags = match_default</A>);
template &lt;class traits, class Allocator, class charT&gt; template &lt;class traits, class Allocator, class charT&gt;
basic_string&lt;charT&gt; regex_replace(const basic_string&lt;charT&gt;&amp; s, basic_string&lt;charT&gt; <A href="#f2">regex_replace</A>(const basic_string&lt;charT&gt;&amp; s,
const basic_regex&lt;charT, traits, Allocator&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator&gt;&amp; e,
const basic_string&lt;charT&gt;&amp; fmt, const basic_string&lt;charT&gt;&amp; fmt,
match_flag_type flags = match_default); <A href="match_flag_type.html">match_flag_type flags = match_default</A>);
</PRE> </PRE>
<H3><A name="description"></A>Description</H3> <H3><A name="description"></A>Description</H3>
<PRE>template &lt;class OutputIterator, class BidirectionalIterator, class traits, <PRE><A name=f1></A>template &lt;class OutputIterator, class BidirectionalIterator, class traits,
class Allocator, class charT&gt; class Allocator, class charT&gt;
OutputIterator regex_replace(OutputIterator out, OutputIterator regex_replace(OutputIterator out,
BidirectionalIterator first, BidirectionalIterator first,
BidirectionalIterator last, BidirectionalIterator last,
const basic_regex&lt;charT, traits, Allocator&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator&gt;&amp; e,
const basic_string&lt;charT&gt;&amp; fmt, const basic_string&lt;charT&gt;&amp; fmt,
match_flag_type flags = match_default);</PRE> <A href="match_flag_type.html">match_flag_type flags = match_default</A>);</PRE>
<P><B> Effects:</B> Finds all the non-overlapping matches <I>m</I> of type <CODE>match_results&lt;BidirectionalIterator&gt; <P>Enumerates all the occurences of expression <EM>e</EM> in the sequence [first,
</CODE>that occur within the sequence [first, last). If no such matches are last), replacing each occurence with the string that results by merging the
found and <CODE>!(flags &amp; format_no_copy)</CODE> then calls <CODE>std::copy(first, match found with the format string <EM>fmt</EM>, and copies the resulting
last, out)</CODE>. Otherwise, for each match found, if <CODE>!(flags &amp; string to <EM>out</EM>.&nbsp;</P>
format_no_copy)</CODE> calls <CODE>std::copy(m.prefix().first, m.prefix().last, <P>If the flag format_no_copy is set in <EM>flags</EM> then unmatched sections of
out)</CODE>, and then calls <CODE>m.format(out, fmt, flags)</CODE>. Finally text are not copied to output.&nbsp;
if <CODE>!(flags &amp; format_no_copy)</CODE> calls <CODE>std::copy(last_m.suffix().first, </P>
last_m,suffix().last, out) </CODE>where <CODE>last_m</CODE> is a copy of the <P>If the flag format_first_only is set in <EM>flags</EM> then only the first
last match found. If <CODE>flags &amp; format_first_only</CODE> is non-zero occurence of <EM>e</EM> is replaced.&nbsp;
then only the first match found is replaced.</P> </P>
<P>The manner in which the format string <EM>fmt</EM> is interpretted, along with
the rules used&nbsp;for finding matches,&nbsp;are determined by the <A href="match_flag_type.html">
flags</A> set in <EM>flags</EM></P>
<P><B>Effects:</B> Constructs an
<SPAN class="spelle">regex_iterator</SPAN>
object:
</P>
<PRE><SPAN style="FONT-SIZE: 10pt">regex_iterator&lt;</SPAN><SPAN class=spelle><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">BidirectionalIterator</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt">, </SPAN><SPAN class=spelle><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">charT</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt">, traits, Allocator&gt; <BR> </SPAN><SPAN class=grame><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">i(</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt">first, last, e, flags)</SPAN>, </PRE>
<P>and uses
<SPAN class="spelle">
<I>i</I></SPAN>
to enumerate through all of the matches <I>m</I> of type
<SPAN class="spelle">
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">match_results</SPAN>
</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&lt;<SPAN class="spelle">BidirectionalIterator</SPAN>&gt; </SPAN>that
occur within the sequence [first, last).
</P>
<P>If no such matches are found
<SPAN class="grame">and </SPAN></P>
<PRE><SPAN class=grame></SPAN><SPAN class=grame><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">!</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(flags &amp; <SPAN class=spelle>format_no_copy</SPAN>)</SPAN> </PRE>
<P>then calls
</P>
<PRE><SPAN class=spelle><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">std::copy</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(first, last, out)</SPAN>. </PRE>
<P>Otherwise, for each match found,
<SPAN class="grame">if </SPAN></P>
<PRE><SPAN class=grame></SPAN><SPAN class=grame><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">!</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(flags &amp; <SPAN class=spelle>format_no_copy</SPAN>)</SPAN> </PRE>
<P>calls
</P>
<PRE><SPAN class=spelle><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">std::copy</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(<SPAN class=spelle>m.prefix</SPAN>().first, <SPAN class=spelle>m.prefix</SPAN>().last, out)</SPAN>, </PRE>
<P>and then calls
</P>
<PRE><SPAN class=spelle><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">m.format</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(out, <SPAN class=spelle>fmt</SPAN>, flags)</SPAN>. </PRE>
<P>Finally
<SPAN class="grame">if </SPAN></P>
<PRE><SPAN class=grame></SPAN><SPAN class=grame><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">!</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(flags &amp; <SPAN class=spelle>format_no_copy</SPAN>)</SPAN> </PRE>
<P>calls
</P>
<PRE><SPAN class=spelle><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">std::copy</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(<SPAN class=spelle>last_m.suffix</SPAN>().first, <SPAN class=spelle>last_m,suffix</SPAN>().last, out) </SPAN></PRE>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"></SPAN>where
<SPAN class="spelle">
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">last_m</SPAN>
</SPAN>
is a copy of the last match found.
</P>
<P>If
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">flags &amp;
<SPAN class="spelle">format_first_only</SPAN></SPAN>
is non-zero then only the first match found is replaced.</P>
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of <P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>), matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
or if the program runs out of stack space while matching the expression (if or if the program runs out of stack space while matching the expression (if
@ -78,11 +126,11 @@ OutputIterator regex_replace(OutputIterator out,
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
<P><B> Returns:</B> <CODE>out</CODE>. <P><B> Returns:</B> <CODE>out</CODE>.
</P> </P>
<PRE>template &lt;class traits, class Allocator, class charT&gt; <PRE><A name=f2></A>template &lt;class traits, class Allocator, class charT&gt;
basic_string&lt;charT&gt; regex_replace(const basic_string&lt;charT&gt;&amp; s, basic_string&lt;charT&gt; regex_replace(const basic_string&lt;charT&gt;&amp; s,
const basic_regex&lt;charT, traits, Allocator&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator&gt;&amp; e,
const basic_string&lt;charT&gt;&amp; fmt, const basic_string&lt;charT&gt;&amp; fmt,
match_flag_type flags = match_default);</PRE> <A href="match_flag_type.html">match_flag_type flags = match_default</A>);</PRE>
<P><B> Effects:</B> Constructs an object <CODE>basic_string&lt;charT&gt; result</CODE>, <P><B> Effects:</B> Constructs an object <CODE>basic_string&lt;charT&gt; result</CODE>,
calls <CODE>regex_replace(back_inserter(result), s.begin(), s.end(), e, fmt, calls <CODE>regex_replace(back_inserter(result), s.begin(), s.end(), e, fmt,
flags)</CODE>, and then returns <CODE>result</CODE>. flags)</CODE>, and then returns <CODE>result</CODE>.

View File

@ -37,7 +37,7 @@
<PRE>template &lt;class BidirectionalIterator, <PRE>template &lt;class BidirectionalIterator,
class Allocator, class charT, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_search(BidirectionalIterator first, BidirectionalIterator last, bool <A href="#f1">regex_search</A>(BidirectionalIterator first, BidirectionalIterator last,
<a href="match_results.html">match_results</a>&lt;BidirectionalIterator, Allocator&gt;&amp; m, <a href="match_results.html">match_results</a>&lt;BidirectionalIterator, Allocator&gt;&amp; m,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator2&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator2&gt;&amp; e,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default); <a href="match_flag_type.html">match_flag_type</a> flags = match_default);
@ -45,7 +45,7 @@ bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
template &lt;class ST, class SA, template &lt;class ST, class SA,
class Allocator, class charT, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool <A href="#f2">regex_search</A>(const basic_string&lt;charT, ST, SA&gt;&amp; s,
<a href="match_results.html">match_results</a>&lt; <a href="match_results.html">match_results</a>&lt;
typename basic_string&lt;charT, ST,SA&gt;::const_iterator, typename basic_string&lt;charT, ST,SA&gt;::const_iterator,
Allocator&gt;&amp; m, Allocator&gt;&amp; m,
@ -54,32 +54,32 @@ bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
template&lt;class charT, class Allocator, class traits, template&lt;class charT, class Allocator, class traits,
class Allocator2&gt; class Allocator2&gt;
bool regex_search(const charT* str, bool <A href="#f3">regex_search</A>(const charT* str,
<a href="match_results.html">match_results</a>&lt;const charT*, Allocator&gt;&amp; m, <a href="match_results.html">match_results</a>&lt;const charT*, Allocator&gt;&amp; m,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator2&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator2&gt;&amp; e,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default); <a href="match_flag_type.html">match_flag_type</a> flags = match_default);
template &lt;class BidirectionalIterator, class Allocator, template &lt;class BidirectionalIterator, class Allocator,
class charT, class traits&gt; class charT, class traits&gt;
bool regex_search(BidirectionalIterator first, BidirectionalIterator last, bool <A href="#f4">regex_search</A>(BidirectionalIterator first, BidirectionalIterator last,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default); <a href="match_flag_type.html">match_flag_type</a> flags = match_default);
template &lt;class charT, class Allocator, template &lt;class charT, class Allocator,
class traits&gt; class traits&gt;
bool regex_search(const charT* str, bool <A href="#f5">regex_search</A>(const charT* str,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default); <a href="match_flag_type.html">match_flag_type</a> flags = match_default);
template&lt;class ST, class SA, template&lt;class ST, class SA,
class Allocator, class charT, class Allocator, class charT,
class traits&gt; class traits&gt;
bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool <A href="#f6">regex_search</A>(const basic_string&lt;charT, ST, SA&gt;&amp; s,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default); <a href="match_flag_type.html">match_flag_type</a> flags = match_default);
</PRE> </PRE>
<H3><A name="description"></A>Description</H3> <H3><A name="description"></A>Description</H3>
<PRE>template &lt;class BidirectionalIterator, class Allocator, class charT, <PRE><A name=f1></A>template &lt;class BidirectionalIterator, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_search(BidirectionalIterator first, BidirectionalIterator last, bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
<a href="match_results.html">match_results</a>&lt;BidirectionalIterator, Allocator&gt;&amp; m, <a href="match_results.html">match_results</a>&lt;BidirectionalIterator, Allocator&gt;&amp; m,
@ -234,13 +234,13 @@ bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
</TD></TR></TABLE> </TD></TR></TABLE>
</CENTER> </CENTER>
</DIV> </DIV>
<PRE>template &lt;class charT, class Allocator, class traits, class Allocator2&gt; <PRE><A name=f2></A>template &lt;class charT, class Allocator, class traits, class Allocator2&gt;
bool regex_search(const charT* str, <a href="match_results.html">match_results</a>&lt;const charT*, Allocator&gt;&amp; m, bool regex_search(const charT* str, <a href="match_results.html">match_results</a>&lt;const charT*, Allocator&gt;&amp; m,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator2&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator2&gt;&amp; e,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE> <a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
<P><B> Effects:</B> Returns the result of <CODE>regex_search(str, str + <P><B> Effects:</B> Returns the result of <CODE>regex_search(str, str +
char_traits&lt;charT&gt;::length(str), m, e, flags)</CODE>.</P> char_traits&lt;charT&gt;::length(str), m, e, flags)</CODE>.</P>
<PRE>template &lt;class ST, class SA, class Allocator, class charT, <PRE><A name=f3></A>template &lt;class ST, class SA, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
<a href="match_results.html">match_results</a>&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator, Allocator&gt;&amp; m, <a href="match_results.html">match_results</a>&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator, Allocator&gt;&amp; m,
@ -248,7 +248,7 @@ bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE> <a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
<P><B> Effects:</B> Returns the result of <CODE>regex_search(s.begin(), s.end(), m, <P><B> Effects:</B> Returns the result of <CODE>regex_search(s.begin(), s.end(), m,
e, flags)</CODE>.</P> e, flags)</CODE>.</P>
<PRE>template &lt;class iterator, class Allocator, class charT, <PRE><A name=f4></A>template &lt;class iterator, class Allocator, class charT,
class traits&gt; class traits&gt;
bool regex_search(iterator first, iterator last, bool regex_search(iterator first, iterator last,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e,
@ -256,13 +256,13 @@ bool regex_search(iterator first, iterator last,
<P><B> Effects:</B> Behaves "as if" by constructing an instance of <CODE><a href="match_results.html"> <P><B> Effects:</B> Behaves "as if" by constructing an instance of <CODE><a href="match_results.html">
match_results</a>&lt;</CODE>BidirectionalIterator<CODE>&gt; what</CODE>, match_results</a>&lt;</CODE>BidirectionalIterator<CODE>&gt; what</CODE>,
and then returning the result of <CODE>regex_search(first, last, what, e, flags)</CODE>.</P> and then returning the result of <CODE>regex_search(first, last, what, e, flags)</CODE>.</P>
<PRE>template &lt;class charT, class Allocator, class traits&gt; <PRE><A name=f5></A>template &lt;class charT, class Allocator, class traits&gt;
bool regex_search(const charT* str bool regex_search(const charT* str
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE> <a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
<P><B> Effects:</B> Returns the result of <CODE>regex_search(str, str + <P><B> Effects:</B> Returns the result of <CODE>regex_search(str, str +
char_traits&lt;charT&gt;::length(str), e, flags)</CODE>.</P> char_traits&lt;charT&gt;::length(str), e, flags)</CODE>.</P>
<PRE>template &lt;class ST, class SA, class Allocator, class charT, <PRE><A name=f6></A>template &lt;class ST, class SA, class Allocator, class charT,
class traits&gt; class traits&gt;
bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e,

View File

@ -45,35 +45,35 @@ template &lt;class BidirectionalIterator,
class regex_token_iterator class regex_token_iterator
{ {
public: public:
typedef basic_regex&lt;charT, traits, Allocator&gt; regex_type; typedef <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator&gt; regex_type;
typedef basic_string&lt;charT&gt; value_type; typedef basic_string&lt;charT&gt; value_type;
typedef typename iterator_traits&lt;BidirectionalIterator&gt;::difference_type difference_type; typedef typename iterator_traits&lt;BidirectionalIterator&gt;::difference_type difference_type;
typedef const value_type* pointer; typedef const value_type* pointer;
typedef const value_type&amp; reference; typedef const value_type&amp; reference;
typedef std::forward_iterator_tag iterator_category; typedef std::forward_iterator_tag iterator_category;
regex_token_iterator(); <A href="#c1">regex_token_iterator</A>();
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re, <A href="#c2">regex_token_iterator</A>(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re,
int submatch = 0, match_flag_type m = match_default); int submatch = 0, <A href="match_flag_type.html">match_flag_type</A> m = match_default);
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re, <A href="#c3">regex_token_iterator</A>(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re,
const std::vector&lt;int&gt;&amp; submatches, match_flag_type m = match_default); const std::vector&lt;int&gt;&amp; submatches, match_flag_type m = match_default);
template &lt;std::size_t N&gt; template &lt;std::size_t N&gt;
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re, <A href="#c4">regex_token_iterator</A>(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re,
const int (&amp;submatches)[N], match_flag_type m = match_default); const int (&amp;submatches)[N], match_flag_type m = match_default);
regex_token_iterator(const regex_token_iterator&amp;); <A href="#c5">regex_token_iterator</A>(const regex_token_iterator&amp;);
regex_token_iterator&amp; operator=(const regex_token_iterator&amp;); regex_token_iterator&amp; <A href="#o1">operator</A>=(const regex_token_iterator&amp;);
bool operator==(const regex_token_iterator&amp;); bool <A href="#o2">operator</A>==(const regex_token_iterator&amp;)const;
bool operator!=(const regex_token_iterator&amp;); bool <A href="#o3">operator</A>!=(const regex_token_iterator&amp;)const;
const value_type&amp; operator*(); const value_type&amp; <A href="#o4">operator</A>*()const;
const value_type* operator-&gt;(); const value_type* <A href="#o5">operator</A>-&gt;()const;
regex_token_iterator&amp; operator++(); regex_token_iterator&amp; <A href="#o6">operator</A>++();
regex_token_iterator operator++(int); regex_token_iterator <A href="#o7">operator</A>++(int);
}; };
</PRE> </PRE>
<H3><A name="description"></A>Description</H3> <H3><A name="description"></A>Description</H3>
<PRE>regex_token_iterator();</PRE> <PRE><A name=c1></A>regex_token_iterator();</PRE>
<P><B> Effects:</B> constructs an end of sequence iterator.</P> <P><B> Effects:</B> constructs an end of sequence iterator.</P>
<PRE>regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re, <PRE><A name=c2></A>regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re,
int submatch = 0, match_flag_type m = match_default);</PRE> int submatch = 0, match_flag_type m = match_default);</PRE>
<P><B> Preconditions: </B><CODE>!re.empty()</CODE>.</P> <P><B> Preconditions: </B><CODE>!re.empty()</CODE>.</P>
<P><B> Effects:</B> constructs a regex_token_iterator that will enumerate one <P><B> Effects:</B> constructs a regex_token_iterator that will enumerate one
@ -88,7 +88,7 @@ public:
Boost.regex is <A href="configuration.html">configured</A> in recursive mode), Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html"> or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
<PRE>regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re, <PRE><A name=c3></A>regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re,
const std::vector&lt;int&gt;&amp; submatches, match_flag_type m = match_default);</PRE> const std::vector&lt;int&gt;&amp; submatches, match_flag_type m = match_default);</PRE>
<P><B> Preconditions:</B> <CODE>submatches.size() &amp;&amp; !re.empty()</CODE>.</P> <P><B> Preconditions:</B> <CODE>submatches.size() &amp;&amp; !re.empty()</CODE>.</P>
<P><B> Effects:</B> constructs a regex_token_iterator that will enumerate <EM>submatches.size()</EM> <P><B> Effects:</B> constructs a regex_token_iterator that will enumerate <EM>submatches.size()</EM>
@ -106,7 +106,7 @@ public:
Boost.regex is <A href="configuration.html">configured</A> in recursive mode), Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html"> or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
<PRE>template &lt;std::size_t N&gt; <PRE><A name=c4></A>template &lt;std::size_t N&gt;
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re, regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re,
const int (&amp;submatches)[R], match_flag_type m = match_default);</PRE> const int (&amp;submatches)[R], match_flag_type m = match_default);</PRE>
<P><B> Preconditions: </B><CODE>!re.empty()</CODE>.</P> <P><B> Preconditions: </B><CODE>!re.empty()</CODE>.</P>
@ -126,25 +126,25 @@ regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const reg
Boost.regex is <A href="configuration.html">configured</A> in recursive mode), Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html"> or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
<PRE>regex_token_iterator(const regex_token_iterator&amp; that);</PRE> <PRE><A name=c5></A>regex_token_iterator(const regex_token_iterator&amp; that);</PRE>
<P><B> Effects: </B>constructs a copy of <CODE>that</CODE>.</P> <P><B> Effects: </B>constructs a copy of <CODE>that</CODE>.</P>
<P><B> Postconditions:</B> <CODE>*this == that</CODE>.</P> <P><B> Postconditions:</B> <CODE>*this == that</CODE>.</P>
<PRE>regex_token_iterator&amp; operator=(const regex_token_iterator&amp; that);</PRE> <PRE><A name=o1></A>regex_token_iterator&amp; operator=(const regex_token_iterator&amp; that);</PRE>
<P><B> Effects: </B>sets <CODE>*this</CODE> to be equal to&nbsp;<CODE>that</CODE>.</P> <P><B> Effects: </B>sets <CODE>*this</CODE> to be equal to&nbsp;<CODE>that</CODE>.</P>
<P><B> Postconditions:</B> <CODE>*this == that</CODE>.</P> <P><B> Postconditions:</B> <CODE>*this == that</CODE>.</P>
<PRE>bool operator==(const regex_token_iterator&amp;);</PRE> <PRE><A name=o2></A>bool operator==(const regex_token_iterator&amp;)const;</PRE>
<P> <P>
<B>Effects: </B>returns true if *this is the same position as that.</P> <B>Effects: </B>returns true if *this is the same position as that.</P>
<PRE>bool operator!=(const regex_token_iterator&amp;);</PRE> <PRE><A name=o3></A>bool operator!=(const regex_token_iterator&amp;)const;</PRE>
<P> <P>
<B>Effects: </B>returns <CODE>!(*this == that)</CODE>.</P> <B>Effects: </B>returns <CODE>!(*this == that)</CODE>.</P>
<PRE>const value_type&amp; operator*();</PRE> <PRE><A name=o4></A>const value_type&amp; operator*()const;</PRE>
<P> <P>
<B>Effects: </B>returns the current string being enumerated.</P> <B>Effects: </B>returns the current string being enumerated.</P>
<PRE>const value_type* operator-&gt;();</PRE> <PRE><A name=o5></A>const value_type* operator-&gt;()const;</PRE>
<P> <P>
<B>Effects: </B>returns <CODE>&amp;(*this)</CODE>.</P> <B>Effects: </B>returns <CODE>&amp;(*this)</CODE>.</P>
<PRE>regex_token_iterator&amp; operator++();</PRE> <PRE><A name=o6></A>regex_token_iterator&amp; operator++();</PRE>
<P> <P>
<B>Effects: </B>Moves on to the next string to be enumerated.</P> <B>Effects: </B>Moves on to the next string to be enumerated.</P>
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of <P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
@ -155,7 +155,7 @@ regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const reg
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
<B> <B>
<P> <P>
Returns:</B><CODE> *this</CODE>.</P><PRE>regex_token_iterator&amp; operator++(int);</PRE> Returns:</B><CODE> *this</CODE>.</P><PRE><A name=o7></A>regex_token_iterator&amp; operator++(int);</PRE>
<P><B> Effects:</B> constructs a copy <CODE>result</CODE> of <CODE>*this</CODE>, <P><B> Effects:</B> constructs a copy <CODE>result</CODE> of <CODE>*this</CODE>,
then calls <CODE>++(*this)</CODE>.</P> then calls <CODE>++(*this)</CODE>.</P>
<P><B> Returns:</B> <CODE>result</CODE>.<A name="examples"></A> <P><B> Returns:</B> <CODE>result</CODE>.<A name="examples"></A>

View File

@ -38,6 +38,9 @@
<P>Objects of type <EM>sub_match</EM> may only obtained by subscripting an object <P>Objects of type <EM>sub_match</EM> may only obtained by subscripting an object
of type <EM><A href="match_results.html">match_results</A></EM> of type <EM><A href="match_results.html">match_results</A></EM>
. .
<P>Objects of type <EM>sub_match</EM> may be compared to objects of type <EM>std::basic_string</EM>,
or <EM>const charT*</EM> or <EM>const charT</EM>
.
<P>When the marked sub-expression denoted by an object of type sub_match&lt;&gt; <P>When the marked sub-expression denoted by an object of type sub_match&lt;&gt;
participated in a regular expression match then member <CODE>matched</CODE> evaluates participated in a regular expression match then member <CODE>matched</CODE> evaluates
to true, and members <CODE>first</CODE> and <CODE>second</CODE> denote the to true, and members <CODE>first</CODE> and <CODE>second</CODE> denote the
@ -61,154 +64,197 @@ public:
typedef typename iterator_traits&lt;BidirectionalIterator&gt;::difference_type difference_type; typedef typename iterator_traits&lt;BidirectionalIterator&gt;::difference_type difference_type;
typedef BidirectionalIterator iterator; typedef BidirectionalIterator iterator;
bool matched; bool <A href="#m1">matched</A>;
difference_type length()const; difference_type <A href="#m2">length</A>()const;
operator basic_string&lt;value_type&gt;()const; operator <A href="#m3">basic_string</A>&lt;value_type&gt;()const;
basic_string&lt;value_type&gt; str()const; basic_string&lt;value_type&gt; <A href="#m4">str</A>()const;
int compare(const sub_match&amp; s)const; int <A href="#m5">compare</A>(const sub_match&amp; s)const;
int compare(const basic_string&lt;value_type&gt;&amp; s)const; int <A href="#m6">compare</A>(const basic_string&lt;value_type&gt;&amp; s)const;
int compare(const value_type* s)const; int <A href="#m7">compare</A>(const value_type* s)const;
}; };
//
// comparisons to another sub_match:
//
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o11">operator</A> == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o12">operator</A> != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o13">operator</A> &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o14">operator</A> &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o15">operator</A> &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o16">operator</A> &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
//
// comparisons to a basic_string:
//
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator == (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs, bool <A href="#o21">operator</A> == (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator != (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs, bool <A href="#o22">operator</A> != (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt; (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs, bool <A href="#o23">operator</A> &lt; (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt; (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs, bool <A href="#o24">operator</A> &gt; (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt;= (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs, bool <A href="#o25">operator</A> &gt;= (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt;= (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs, bool <A href="#o26">operator</A> &lt;= (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o31">operator</A> == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs); const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o32">operator</A> != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs); const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o33">operator</A> &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs); const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o34">operator</A> &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs); const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o35">operator</A> &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs); const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o36">operator</A> &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs); const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);
//
// comparisons to a pointer to a character array:
//
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool <A href="#o41">operator</A> == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool <A href="#o42">operator</A> != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool <A href="#o43">operator</A> &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool <A href="#o44">operator</A> &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool <A href="#o45">operator</A> &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool <A href="#o46">operator</A> &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o51">operator</A> == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o52">operator</A> != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o53">operator</A> &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o54">operator</A> &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o55">operator</A> &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o56">operator</A> &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs);
//
// comparisons to a single character:
//
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool <A href="#o61">operator</A> == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool <A href="#o62">operator</A> != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool <A href="#o63">operator</A> &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool <A href="#o64">operator</A> &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool <A href="#o65">operator</A> &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool <A href="#o66">operator</A> &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o71">operator</A> == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o72">operator</A> != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o73">operator</A> &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o74">operator</A> &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o75">operator</A> &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o76">operator</A> &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs);
//
// addition operators:
//
template &lt;class RandomAccessIterator, class traits, class Allocator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;
<A href="#o81">operator</A> + (const std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;&amp; s,
const sub_match&lt;RandomAccessIterator&gt;&amp; m);
template &lt;class RandomAccessIterator, class traits, class Allocator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;
<A href="#o82">operator</A> + (const sub_match&lt;RandomAccessIterator&gt;&amp; m,
const std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;&amp; s);
template &lt;class RandomAccessIterator&gt; std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
<A href="#o83">operator</A> + (typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const* s,
const sub_match&lt;RandomAccessIterator&gt;&amp; m);
template &lt;class RandomAccessIterator&gt; std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
<A href="#o84">operator</A> + (const sub_match&lt;RandomAccessIterator&gt;&amp; m,
typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const * s);
template &lt;class RandomAccessIterator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
<A href="#o85">operator</A> + (typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const&amp; s,
const sub_match&lt;RandomAccessIterator&gt;&amp; m);
template &lt;class RandomAccessIterator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
<A href="#o86">operator</A> + (const sub_match&lt;RandomAccessIterator&gt;&amp; m,
typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const&amp; s);
template &lt;class RandomAccessIterator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
<A href="#o87">operator</A> + (const sub_match&lt;RandomAccessIterator&gt;&amp; m1,
const sub_match&lt;RandomAccessIterator&gt;&amp; m2);
//
// stream inserter:
//
template &lt;class charT, class traits, class BidirectionalIterator&gt; template &lt;class charT, class traits, class BidirectionalIterator&gt;
basic_ostream&lt;charT, traits&gt;&amp; basic_ostream&lt;charT, traits&gt;&amp;
operator &lt;&lt; (basic_ostream&lt;charT, traits&gt;&amp; os, <A href="#oi">operator</A> &lt;&lt; (basic_ostream&lt;charT, traits&gt;&amp; os,
const sub_match&lt;BidirectionalIterator&gt;&amp; m); const sub_match&lt;BidirectionalIterator&gt;&amp; m);
} // namespace boost</PRE> } // namespace boost</PRE>
@ -225,188 +271,278 @@ basic_ostream&lt;charT, traits&gt;&amp;
<P>An iterator denoting the position of the start of the match.</P> <P>An iterator denoting the position of the start of the match.</P>
<PRE>iterator second</PRE> <PRE>iterator second</PRE>
<P>An iterator denoting the position of the end of the match.</P> <P>An iterator denoting the position of the end of the match.</P>
<PRE>bool matched</PRE> <PRE><A name=m1></A>bool matched</PRE>
<P>A Boolean value denoting whether this sub-expression participated in the match.</P> <P>A Boolean value denoting whether this sub-expression participated in the match.</P>
<PRE>static difference_type length();</PRE> <PRE><A name=m2></A>static difference_type length();</PRE>
<P>
<P> <B> <B>Effects: </B>returns the length of this matched sub-expression, or 0 if this
Effects: </B>returns <CODE>(matched ? 0 : distance(first, second))</CODE>.</P><PRE>operator basic_string&lt;value_type&gt;()const;</PRE> sub-expression was not matched: <CODE>matched ? distance(first, second) : 0)</CODE>.</P>
<PRE><A name=m3></A>operator basic_string&lt;value_type&gt;()const;</PRE>
<P> <B> <P>
Effects: </B>returns <CODE>(matched ? basic_string&lt;value_type&gt;(first, <B>Effects: </B>converts *this into a string: returns <CODE>(matched ?
second) : basic_string&lt;value_type&gt;()).</P></CODE><PRE>basic_string&lt;value_type&gt; str()const;</PRE> basic_string&lt;value_type&gt;(first, second) :
basic_string&lt;value_type&gt;()).</P>
<P><B> </CODE><PRE><A name=m4></A>basic_string&lt;value_type&gt; str()const;</PRE>
Effects: </B>returns <CODE>(matched ? basic_string&lt;value_type&gt;(first, <P><B> Effects: </B>returns a string representation of *this:&nbsp; <CODE>(matched ?
second) : basic_string&lt;value_type&gt;())</CODE>.</P><PRE>int compare(const sub_match&amp; s)const;</PRE> basic_string&lt;value_type&gt;(first, second) :
basic_string&lt;value_type&gt;())</CODE>.</P>
<P> <B> <PRE><A name=m5></A>int compare(const sub_match&amp; s)const;</PRE>
Effects: </B>returns <CODE>str().compare(s.str())</CODE>.</P><PRE>int compare(const basic_string&lt;value_type&gt;&amp; s)const;</PRE> <P>
<B>Effects: </B>performs a lexical comparison to <EM>s</EM>: returns <CODE>str().compare(s.str())</CODE>.</P>
<P><B> <PRE><A name=m6></A>int compare(const basic_string&lt;value_type&gt;&amp; s)const;</PRE>
Effects: </B>returns <CODE>str().compare(s)</CODE>.</P><PRE>int compare(const value_type* s)const;</PRE> <P><B> Effects: </B>compares *this to the string s: returns <CODE>str().compare(s)</CODE>.</P>
<PRE><A name=m7></A>int compare(const value_type* s)const;</PRE>
<P> <B> <P>
Effects: </B>returns <CODE>str().compare(s)</CODE>.</P> <B>Effects:<B></B> </B>compares *this to the null-terminated string <EM>s</EM>:<B>&nbsp;</B>returns
<CODE>str().compare(s)</CODE>.</P>
<H4> <H4>
sub_match non-member operators</H4> sub_match non-member operators</H4>
<PRE>template &lt;class BidirectionalIterator&gt; <H5>Comparisons against self</H5>
<PRE><A name=o11></A>template &lt;class BidirectionalIterator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.compare(rhs) == 0</CODE>.</P>
Effects: </B>returns <CODE>lhs.compare(rhs) == 0</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o12></A>template &lt;class BidirectionalIterator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.compare(rhs) != 0</CODE>.</P>
Effects: </B>returns <CODE>lhs.compare(rhs) != 0</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o13></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.compare(rhs) &lt; 0</CODE>.</P>
Effects: </B>returns <CODE>lhs.compare(rhs) &lt; 0</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o14></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P><B> Effects: </B>returns <CODE>lhs.compare(rhs) &lt;= 0</CODE>.</P>
<P><B> <PRE><A name=o15></A>template &lt;class BidirectionalIterator&gt;
Effects: </B>returns <CODE>lhs.compare(rhs) &lt;= 0</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.compare(rhs) &gt;= 0</CODE>.</P>
Effects: </B>returns <CODE>lhs.compare(rhs) &gt;= 0</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o16></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.compare(rhs) &gt; 0</CODE>.</P>
Effects: </B>returns <CODE>lhs.compare(rhs) &gt; 0</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <H5>Comparisons with std::basic_string</H5>
<pre><A name=o21></A>
template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator == (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits,
Allocator&gt;&amp; lhs, const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
</pre>
<P><B>Effects: </B>returns <CODE>lhs == rhs.str()</CODE>.</P>
<PRE><A name=o22></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator != (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs != rhs.str()</CODE>.</P>
<PRE><A name=o23></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt; (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs&nbsp;&lt; rhs.str()</CODE>.</P>
<PRE><A name=o24></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt; (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs&nbsp;&gt; rhs.str()</CODE>.</P>
<PRE><A name=o25></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt;= (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs &gt;= rhs.str()</CODE>.</P>
<PRE><A name=o26></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt;= (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs &lt;= rhs.str()</CODE>.</P>
<PRE><A name=o31></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs.str() == rhs</CODE>.</P>
<PRE><A name=o32></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs.str() != rhs</CODE>.</P>
<PRE><A name=o33></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs.str()&nbsp;&lt; rhs</CODE>.</P>
<PRE><A name=o34></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs.str()&nbsp;&gt; rhs</CODE>.</P>
<PRE><A name=o35></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs.str() &gt;= rhs</CODE>.</P>
<PRE><A name=o36></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs.str() &lt;= rhs</CODE>.</P>
<H5>Comparisons with null-terminated strings</H5>
<PRE><A name=o41></A>template &lt;class BidirectionalIterator&gt;
bool operator == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool operator == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs == rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs == rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o42></A>template &lt;class BidirectionalIterator&gt;
bool operator != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool operator != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs != rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs != rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE></A><A name=o43></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool operator &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &lt; rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &lt; rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o44></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool operator &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &gt; rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &gt; rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o45></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool operator &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &gt;= rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &gt;= rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o46></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool operator &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &lt;= rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &lt;= rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o51></A>template &lt;class BidirectionalIterator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() == rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() == rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o52></A>template &lt;class BidirectionalIterator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() != rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() != rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o53></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &lt; rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &lt; rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o54></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &gt; rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &gt; rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o55></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &gt;= rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &gt;= rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o56></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &lt;= rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &lt;= rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <H5>Comparisons with a single character</H5>
<PRE><A name=o61></A>template &lt;class BidirectionalIterator&gt;
bool operator == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool operator == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs == rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs == rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o62></A>template &lt;class BidirectionalIterator&gt;
bool operator != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool operator != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs != rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs != rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o63></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool operator &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &lt; rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &lt; rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o64></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool operator &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &gt; rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &gt; rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o65></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool operator &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &gt;= rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &gt;= rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o66></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool operator &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &lt;= rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &lt;= rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o71></A>template &lt;class BidirectionalIterator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() == rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() == rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o72></A>template &lt;class BidirectionalIterator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() != rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() != rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o73></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &lt; rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &lt; rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o74></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &gt; rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &gt; rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o75></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &gt;= rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &gt;= rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o76></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &lt;= rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &lt;= rhs</CODE>.</P><PRE>template &lt;class charT, class traits, class BidirectionalIterator&gt; <h5>Addition operators</h5>
<P>The addition operators for sub_match allow you to add a sub_match to any type
to which you can add a std::string and obtain a new string as the result.</P>
<PRE><A name=o81></A>template &lt;class RandomAccessIterator, class traits, class Allocator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;
operator + (const std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;&amp; s,
const sub_match&lt;RandomAccessIterator&gt;&amp; m); </PRE>
<P><B>Effects: </B>returns <CODE>s + m.str()</CODE>.</P>
<PRE><A name=o82></A>template &lt;class RandomAccessIterator, class traits, class Allocator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;
operator + (const sub_match&lt;RandomAccessIterator&gt;&amp; m,
const std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;&amp; s); </PRE>
<P><B>Effects: </B>returns <CODE>m.str() + s</CODE>.</P>
<PRE><A name=o83></A>template &lt;class RandomAccessIterator&gt; std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
operator + (typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const* s,
const sub_match&lt;RandomAccessIterator&gt;&amp; m); </PRE>
<P><B>Effects: </B>returns <CODE>s + m.str()</CODE>.</P>
<PRE><A name=o84></A>template &lt;class RandomAccessIterator&gt; std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
operator + (const sub_match&lt;RandomAccessIterator&gt;&amp; m,
typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const * s);</PRE>
<P><B>Effects: </B>returns <CODE>m.str() + s</CODE>.</P>
<PRE><A name=o85></A>template &lt;class RandomAccessIterator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
operator + (typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const&amp; s,
const sub_match&lt;RandomAccessIterator&gt;&amp; m); </PRE>
<P><B>Effects: </B>returns <CODE>s + m.str()</CODE>.</P>
<PRE><A name=o86></A>template &lt;class RandomAccessIterator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
operator + (const sub_match&lt;RandomAccessIterator&gt;&amp; m,
typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const&amp; s); </PRE>
<P><B>Effects: </B>returns <CODE>m.str() + s</CODE>.</P>
<PRE><A name=o87></A>template &lt;class RandomAccessIterator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
operator + (const sub_match&lt;RandomAccessIterator&gt;&amp; m1,
const sub_match&lt;RandomAccessIterator&gt;&amp; m2);</PRE>
<P><B>Effects: </B>returns&nbsp;<CODE>m1.str() + m2.str()</CODE>.</P>
<h5>Stream inserter</h5>
<PRE><A name=oi></A>template &lt;class charT, class traits, class BidirectionalIterator&gt;
basic_ostream&lt;charT, traits&gt;&amp; basic_ostream&lt;charT, traits&gt;&amp;
operator &lt;&lt; (basic_ostream&lt;charT, traits&gt;&amp; os operator &lt;&lt; (basic_ostream&lt;charT, traits&gt;&amp; os
const sub_match&lt;BidirectionalIterator&gt;&amp; m);</PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; m);</PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>(os &lt;&lt; m.str())</CODE>.
Effects: </B>returns <CODE>(os &lt;&lt; m.str())</CODE>.
<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 -->
@ -422,5 +558,3 @@ basic_ostream&lt;charT, traits&gt;&amp;
for any purpose. It is provided "as is" without express or implied warranty.</I></P> for any purpose. It is provided "as is" without express or implied warranty.</I></P>
</body> </body>
</html> </html>

View File

@ -23,6 +23,11 @@
</TABLE> </TABLE>
</P> </P>
<HR> <HR>
<P>The regex library is thread safe when Boost is: you can verify that Boost is in
thread safe mode by checking to see if BOOST_HAS_THREADS is defined: this macro
is set automatically by the config system when threading support is turned on
in your compiler.
</P>
<P>Class <A href="basic_regex.html">basic_regex</A>&lt;&gt; and its typedefs regex <P>Class <A href="basic_regex.html">basic_regex</A>&lt;&gt; and its typedefs regex
and wregex are thread safe, in that compiled regular expressions can safely be and wregex are thread safe, in that compiled regular expressions can safely be
shared between threads. The matching algorithms <A href="regex_match.html">regex_match</A>, shared between threads. The matching algorithms <A href="regex_match.html">regex_match</A>,
@ -65,4 +70,3 @@
for any purpose. It is provided "as is" without express or implied warranty.</I></P> for any purpose. It is provided "as is" without express or implied warranty.</I></P>
</body> </body>
</html> </html>

File diff suppressed because it is too large Load Diff

View File

@ -1,110 +1,85 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html> <html>
<head> <head>
<title>Boost.Regex: Contacts</title> <title>Boost.Regex: Contacts</title>
<meta name="generator" content="HTML Tidy, see www.w3.org"> <meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content= <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
"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">
<tr>
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" <td valign="top" width="300">
border="0"> <h3><a href="../../../index.htm"><IMG height="86" alt="C++ Boost" src="../../../c++boost.gif" width="277" border="0"></a></h3>
<tr> </td>
<td valign="top" width="300"> <td width="353">
<h3><a href="../../../index.htm"><img height="86" width="277" alt= <h1 align="center">Boost.Regex</h1>
"C++ Boost" src="../../../c++boost.gif" border=0></a></h3> <h2 align="center">Contacts and Acknowledgements</h2>
</td> </td>
<td width="353"> <td width="50">
<h1 align="center">Boost.Regex</h1> <h3><a href="index.html"><IMG height="45" alt="Boost.Regex Index" src="uarrow.gif" width="43" border="0"></a></h3>
</td>
<h2 align="center">Contacts and Acknowledgements</h2> </tr>
</td> </table>
<td width="50"> <BR>
<h3><a href="index.html"><img height="45" width="43" alt= <BR>
"Boost.Regex Index" src="uarrow.gif" border=0></a></h3> <HR>
</td> <P>The author can be contacted at <A href="mailto:john@johnmaddock.co.uk">john@johnmaddock.co.uk</A>;&nbsp;the
</tr> home page for this library is at <A href="http://www.boost.org">www.boost.org</A>.</P>
</table> <P>I am indebted to Robert Sedgewick's "Algorithms in C++" for forcing me to think
about algorithms and their performance, and to the folks at boost for forcing
<br> me to <I>think</I>, period. The following people have all contributed useful
<br> comments or fixes: Dave Abrahams, Mike Allison, Edan Ayal, Jayashree
Balasubramanian, Jan B<>lsche, Beman Dawes, Paul Baxter, David Bergman, David
Dennerline, Edward Diener, Peter Dimov, Robert Dunn, Fabio Forno, Tobias
<hr> Gabrielsson, Rob Gillen, Marc Gregoire, Chris Hecker, Nick Hodapp, Jesse Jones,
<p>The author can be contacted at <a href="mailto:john_maddock@compuserve.com"> Martin Jost, Boris Krasnovskiy, Jan Hermelink, Max Leung, Wei-hao Lin, Jens
john_maddock@compuserve.com</a>, the home page for this library is Maurer, Richard Peters, Heiko Schmidt, Jason Shirk, Gerald Slacik, Scobie
at <a href="http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm"> Smith, Mike Smyth, Alexander Sokolovsky, Herv<72> Poirier, Michael Raykh, Marc
http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm</a>, Recht, Scott VanCamp, Bruno Voigt, Alexey Voinov, Jerry Waldorf, Rob Ward,
and the official boost version can be obtained from <a href="../../libraries.htm">www.boost.org/libraries.htm</a>.</p> Lealon Watts, Thomas Witt and Yuval Yosef. I am also grateful to the manuals
supplied with the Henry Spencer, Perl and GNU regular expression libraries -
<p>I am indebted to Robert Sedgewick's "Algorithms in C++" for wherever possible I have tried to maintain compatibility with these libraries
forcing me to think about algorithms and their performance, and to and with the POSIX standard - the code however is entirely my own, including
the folks at boost for forcing me to <i>think</i>, period. The any bugs! I can absolutely guarantee that I will not fix any bugs I don't know
following people have all contributed useful comments or fixes: about, so if you have any comments or spot any bugs, please get in touch.</P>
Dave Abrahams, Mike Allison, Edan Ayal, Jayashree Balasubramanian, <P>Useful further information can be found at:</P>
Jan B<>lsche, Beman Dawes, Paul Baxter, David Bergman, David <P>Short&nbsp;tutorials on regular expressions can be <A href="http://etext.lib.virginia.edu/helpsheets/regex.html">
Dennerline, Edward Diener, Peter Dimov, Robert Dunn, Fabio Forno, found here</A> and&nbsp;<A href="http://www.devshed.com/Server_Side/Administration/RegExp/page1.html">here</A>.</P>
Tobias Gabrielsson, Rob Gillen, Marc Gregoire, Chris Hecker, Nick <P>The main book on regular expressions is <A href="http://www.oreilly.com/catalog/regex/">
Hodapp, Jesse Jones, Martin Jost, Boris Krasnovskiy, Jan Hermelink, Mastering Regular Expressions, published by O'Reilly</A>.</P>
Max Leung, Wei-hao Lin, Jens Maurer, Richard Peters, Heiko Schmidt, <P>Information on the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
Jason Shirk, Gerald Slacik, Scobie Smith, Mike Smyth, Alexander Boost.regex standardization proposal</A>, along with other <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1475.html">
Sokolovsky, Herv<72> Poirier, Michael Raykh, Marc Recht, Scott standard library extension proposals</A> can be found on the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/">
VanCamp, Bruno Voigt, Alexey Voinov, Jerry Waldorf, Rob Ward, C++ Committees web pages</A>.</P>
Lealon Watts, Thomas Witt and Yuval Yosef. I am also grateful to <P>The<a href="http://www.opengroup.org/onlinepubs/7908799/toc.htm">Open Unix
the manuals supplied with the Henry Spencer, Perl and GNU regular Specification</a> contains a wealth of useful material, including the
expression libraries - wherever possible I have tried to maintain regular expression syntax, and specifications for <a href="http://www.opengroup.org/onlinepubs/7908799/xsh/regex.h.html">
compatibility with these libraries and with the POSIX standard - &lt;regex.h&gt;</a> and <a href="http://www.opengroup.org/onlinepubs/7908799/xsh/nl_types.h.html">
the code however is entirely my own, including any bugs! I can &lt;nl_types.h&gt;</a>.</P>
absolutely guarantee that I will not fix any bugs I don't know <p>The <a href="http://www.cs.ucr.edu/~stelo/pattern.html">Pattern Matching Pointers</a>
about, so if you have any comments or spot any bugs, please get in site is a "must visit" resource for anyone interested in pattern matching.</p>
touch.</p> <p><a href="http://glimpse.cs.arizona.edu/">Glimpse and Agrep</a>, use a
simplified regular expression syntax to achieve faster search times.</p>
<p>Useful further information can be found at:</p> <p><a href="http://glimpse.cs.arizona.edu/udi.html">Udi Manber</a> and <a href="http://www.dcc.uchile.cl/~rbaeza/">
Ricardo Baeza-Yates</a> both have a selection of useful pattern matching
<p>A short tutorial on regular expressions <a href="http://www.devshed.com/Server_Side/Administration/RegExp/">can be papers available from their respective web sites.</p>
found here</a>.</p> <p></p>
<hr>
<p>The <a href="http://www.opengroup.org/onlinepubs/7908799/toc.htm">Open Unix <p>Revised
Specification</a> contains a wealth of useful material, including <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
the regular expression syntax, and specifications for <a href="http://www.opengroup.org/onlinepubs/7908799/xsh/regex.h.html"> 17 May 2003
&lt;regex.h&gt;</a> and <a href="http://www.opengroup.org/onlinepubs/7908799/xsh/nl_types.h.html"> <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
&lt;nl_types.h&gt;</a>.</p> <p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a>&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
<p>The <a href="http://www.cs.ucr.edu/~stelo/pattern.html">Pattern 2003
Matching Pointers</a> site is a "must visit" resource for anyone <!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
interested in pattern matching.</p> <p align="left"><i>Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee, provided
<p><a href="http://glimpse.cs.arizona.edu/">Glimpse and Agrep</a>, that the above copyright notice appear in all copies and that both that
use a simplified regular expression syntax to achieve faster search copyright notice and this permission notice appear in supporting documentation.
times.</p> Dr John Maddock makes no representations about the suitability of this software
for any purpose. It is provided "as is" without express or implied warranty.</i></p>
<p><a href="http://glimpse.cs.arizona.edu/udi.html">Udi Manber</a> </body>
and <a href="http://www.dcc.uchile.cl/~rbaeza/">Ricardo
Baeza-Yates</a> both have a selection of useful pattern matching
papers available from their respective web sites.</p>
<p></p>
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->17 May 2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
Maddock</a>&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<p align="left"><i>Permission to use, copy, modify, distribute and
sell this software and its documentation for any purpose is hereby
granted without fee, provided that the above copyright notice
appear in all copies and that both that copyright notice and this
permission notice appear in supporting documentation. Dr John
Maddock makes no representations about the suitability of this
software for any purpose. It is provided "as is" without express or
implied warranty.</i></p>
</body>
</html> </html>

View File

@ -27,17 +27,20 @@
<P>Boost 1.31.0.</P> <P>Boost 1.31.0.</P>
<UL> <UL>
<LI> <LI>
Completely rewritten pattern matching code - it is now up to 10 times faster Completely rewritten pattern matching code - it is now up to 10 times faster
than before.</LI> than before.
<LI> <LI>
Reorganized documentation.</LI> Reorganized documentation.
<LI> <LI>
Deprecated all interfaces that are not part of the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm"> Deprecated all interfaces that are not part of the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
regular expression standardization proposal</A>.</LI> regular expression standardization proposal</A>.
<LI> <LI>
Added regex_iterator and regex_token_iterator.</LI> Added regex_iterator and regex_token_iterator.
<LI> <LI>
Added support for Perl style independent sub-expressions.</LI></UL> Added support for Perl style independent sub-expressions.
<LI>
Added non-member operators to the sub_match class, so that you can compare
sub_match's with strings, or add them to a string to produce a new string.</LI></UL>
<P> <P>
<HR> <HR>
<P></P> <P></P>
@ -55,4 +58,3 @@
for any purpose. It is provided "as is" without express or implied warranty.</I></P> for any purpose. It is provided "as is" without express or implied warranty.</I></P>
</body> </body>
</html> </html>

View File

@ -62,7 +62,7 @@
to be hard-coded to the C-locale, consequently this was not an issue for them). to be hard-coded to the C-locale, consequently this was not an issue for them).
That leaves us with the following regular expression to validate credit card That leaves us with the following regular expression to validate credit card
number formats:</P> number formats:</P>
<P>(\d{4}[- ]){3}\d{4}</P> <PRE>(\d{4}[- ]){3}\d{4}</PRE>
<P>Here the parenthesis act to group (and mark for future reference) <P>Here the parenthesis act to group (and mark for future reference)
sub-expressions, and the {4} means "repeat exactly 4 times". This is an example sub-expressions, and the {4} means "repeat exactly 4 times". This is an example
of the extended regular expression syntax used by Perl, awk and egrep. Regex++ of the extended regular expression syntax used by Perl, awk and egrep. Regex++
@ -93,8 +93,9 @@
need two strings - one a regular expression - the other a "<A href="format_syntax.html">format need two strings - one a regular expression - the other a "<A href="format_syntax.html">format
string</A>" that provides a description of the text to replace the match string</A>" that provides a description of the text to replace the match
with. In regex++ this search and replace operation is performed with the with. In regex++ this search and replace operation is performed with the
algorithm regex_replace, for our credit card example we can write two algorithms algorithm<A href="regex_replace.html"> regex_replace</A>, for our credit card
like this to provide the format conversions:</P> example we can write two algorithms like this to provide the format
conversions:</P>
<PRE><I>// match any format with the regular expression: <PRE><I>// match any format with the regular expression:
</I><B>const</B> boost::regex e("\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z"); </I><B>const</B> boost::regex e("\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z");
<B>const</B> std::string machine_format("\\1\\2\\3\\4"); <B>const</B> std::string machine_format("\\1\\2\\3\\4");
@ -126,22 +127,31 @@ std::string human_readable_card_number(<B>const</B> std::string s)
<STRONG>typedef</STRONG> match_results&lt;std::string::const_iterator&gt; smatch; <STRONG>typedef</STRONG> match_results&lt;std::string::const_iterator&gt; smatch;
<STRONG>typedef</STRONG> match_results&lt;std::wstring::const_iterator&gt; wsmatch; <STRONG>typedef</STRONG> match_results&lt;std::wstring::const_iterator&gt; wsmatch;
}</PRE> }</PRE>
<P>The algorithms <A href="regex_search.html">regex_search</A> and <A href="regex_grep.html"> <P>The algorithms <A href="regex_search.html">regex_search</A> and&nbsp;<A href="regex_match.html">regex_match</A>
regex_grep</A> (i.e. finding all matches in a string) make use of make use of match_results to report what matched; the difference between these
match_results to report what matched.</P> algorithms is that <A href="regex_match.html">regex_match</A> will only find
matches that consume <EM>all</EM> of the input text, where as <A href="regex_search.html">
regex_search</A> will <EM>search</EM> for a match anywhere within the text
being matched.</P>
<P>Note that these algorithms are not restricted to searching regular C-strings, <P>Note that these algorithms are not restricted to searching regular C-strings,
any bidirectional iterator type can be searched, allowing for the possibility any bidirectional iterator type can be searched, allowing for the possibility
of seamlessly searching almost any kind of data. of seamlessly searching almost any kind of data.
</P> </P>
<P>For search and replace operations in addition to the algorithm <A href="regex_replace.html"> <P>For search and replace operations, in addition to the algorithm <A href="regex_replace.html">
regex_replace</A> that we have already seen, the algorithm <A href="regex_format.html"> regex_replace</A> that we have already seen, the <A href="match_results.html">match_results</A>
regex_format</A> takes the result of a match and a format string, and class has a format member that takes the result of a match and a format string,
produces a new string by merging the two.</P> and produces a new string by merging the two.</P>
<P>For iterating through all occurences of an expression within a text, there are
two iterator types: <A href="regex_iterator.html">regex_iterator</A> will
enumerate over the <A href="match_results.html">match_results</A> objects
found, while <A href="regex_token_iterator.html">regex_token_iterator</A> will
enumerate a series of strings (similar to perl style split operations).</P>
<P>For those that dislike templates, there is a high level wrapper class RegEx <P>For those that dislike templates, there is a high level wrapper class RegEx
that is an encapsulation of the lower level template code - it provides a that is an encapsulation of the lower level template code - it provides a
simplified interface for those that don't need the full power of the library, simplified interface for those that don't need the full power of the library,
and supports only narrow characters, and the "extended" regular expression and supports only narrow characters, and the "extended" regular expression
syntax. syntax. This class is now deprecated as it does not form part of the regular
expressions C++ standard library proposal.
</P> </P>
<P>The <A href="posix_api.html">POSIX API</A> functions: regcomp, regexec, regfree <P>The <A href="posix_api.html">POSIX API</A> functions: regcomp, regexec, regfree
and regerror, are available in both narrow character and Unicode versions, and and regerror, are available in both narrow character and Unicode versions, and
@ -162,7 +172,7 @@ std::string human_readable_card_number(<B>const</B> std::string s)
17 May 2003 17 May 2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" --> <!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p> </p>
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a>&nbsp;1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P> <P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a>&nbsp;1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
<P align="left"><I>Permission to use, copy, modify, distribute and sell this software <P align="left"><I>Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee, provided and its documentation for any purpose is hereby granted without fee, provided
that the above copyright notice appear in all copies and that both that that the above copyright notice appear in all copies and that both that
@ -171,6 +181,3 @@ std::string human_readable_card_number(<B>const</B> std::string s)
for any purpose. It is provided "as is" without express or implied warranty.</I></P> for any purpose. It is provided "as is" without express or implied warranty.</I></P>
</body> </body>
</html> </html>

View File

@ -1,46 +1,36 @@
<!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: match_flag_type</title>
<title>Boost.Regex: match_flag_type</title> <meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content= <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
"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">
<tr>
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" <td valign="top" width="300">
border="0"> <h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
<tr> </td>
<td valign="top" width="300"> <td width="353">
<h3><a href="../../../index.htm"><img height="86" width="277" alt= <h1 align="center">Boost.Regex</h1>
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3> <h2 align="center">match_flag_type</h2>
</td> </td>
<td width="353"> <td width="50">
<h1 align="center">Boost.Regex</h1> <h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
</td>
<h2 align="center">match_flag_type</h2> </tr>
</td> </table>
<td width="50"> <br>
<h3><a href="index.html"><img height="45" width="43" alt= <br>
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3> <hr>
</td> <h3>Synopsis</h3>
</tr> <p>The type <code>match_flag_type</code> is an implementation defined bitmask type
</table> (17.3.2.1.2) that controls how a regular expression is matched against a
character sequence.&nbsp; The behavior of the format flags is descibed in more
<br> detail in the <A href="format_syntax.html">format syntax guide</A>.</p>
<br> <pre>
<hr>
<h3>Synopsis</h3>
<p>The type <code>match_flag_type</code> is an implementation
defined bitmask type (17.3.2.1.2) that controls how a regular
expression is matched against a character sequence.</p>
<pre>
namespace std{ namespace regex_constants{ namespace std{ namespace regex_constants{
typedef bitmask_type match_flag_type; typedef bitmask_type match_flag_type;
@ -70,261 +60,213 @@ static const match_flag_type format_all;
} // namespace regex_constants } // namespace regex_constants
} // namespace std } // namespace std
</pre> </pre>
<h3>Description</h3>
<h3>Description</h3> <p>The type <code>match_flag_type</code> is an implementation defined bitmask type
(17.3.2.1.2). When matching a regular expression against a sequence of
<p>The type <code>match_flag_type</code> is an implementation characters [first, last) then setting its elements has the effects listed in
defined bitmask type (17.3.2.1.2). When matching a regular the table below:</p>
expression against a sequence of characters [first, last) then <p></p>
setting its elements has the effects listed in the table below:</p> <table id="Table2" cellspacing="1" cellpadding="7" width="100%" border="0">
<tr>
<p></p> <td valign="top" width="50%">
<p>Element</p>
<table id="Table2" cellspacing="1" cellpadding="7" width="100%" </td>
border="0"> <td valign="top" width="50%">
<tr> <p>Effect if set</p>
<td valign="top" width="50%"> </td>
<p>Element</p> </tr>
</td> <tr>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>Effect if set</p> <p>match_default</p>
</td> </td>
</tr> <td valign="top" width="50%">
<p>Specifies that matching of regular expressions proceeds without any
<tr> modification of the normal rules used in ECMA-262, ECMAScript Language
<td valign="top" width="50%"> Specification, Chapter 15 part 10, RegExp (Regular Expression) Objects (FWD.1)</p>
<p>match_default</p> </td>
</td> </tr>
<td valign="top" width="50%"> <tr>
<p>Specifies that matching of regular expressions proceeds without <td valign="top" width="50%">match_not_bob</td>
any modification of the normal rules used in ECMA-262, ECMAScript <td valign="top" width="50%">Specifies that the expression "\A" should not match
Language Specification, Chapter 15 part 10, RegExp (Regular against the sub-sequence [first,first).</td>
Expression) Objects (FWD.1)</p> </tr>
</td> <tr>
</tr> <td valign="top" width="50%">match_not_eob</td>
<td valign="top" width="50%">Specifies that the expressions "\z" and
<tr> "\Z"&nbsp;should not match against the sub-sequence [last,last).</td>
<td valign="top" width="50%">match_not_bob</td> </tr>
<td valign="top" width="50%">Specifies that the expression "\A" <tr>
should not match against the sub-sequence [first,first).</td> <td valign="top" width="50%">
</tr> <p>match_not_bol</p>
</td>
<tr> <td valign="top" width="50%">
<td valign="top" width="50%">match_not_eob</td> <p>Specifies that the expression "^" should not be matched against the
<td valign="top" width="50%">Specifies that the expressions "\z" sub-sequence [first,first).</p>
and "\Z"&nbsp;should not match against the sub-sequence </td>
[last,last).</td> </tr>
</tr> <tr>
<td valign="top" width="50%">
<tr> <p>match_not_eol</p>
<td valign="top" width="50%"> </td>
<p>match_not_bol</p> <td valign="top" width="50%">
</td> <p>Specifies that the expression "$" should not be matched against the
<td valign="top" width="50%"> sub-sequence [last,last).</p>
<p>Specifies that the expression "^" should not be matched against </td>
the sub-sequence [first,first).</p> </tr>
</td> <tr>
</tr> <td valign="top" width="50%">
<p>match_not_bow</p>
<tr> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>match_not_eol</p> <p>Specifies that the expression "\b" should not be matched against the
</td> sub-sequence [first,first).</p>
<td valign="top" width="50%"> </td>
<p>Specifies that the expression "$" should not be matched against </tr>
the sub-sequence [last,last).</p> <tr>
</td> <td valign="top" width="50%">
</tr> <p>match_not_eow</p>
</td>
<tr> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>Specifies that the expression "\b" should not be matched against the
<p>match_not_bow</p> sub-sequence [last,last).</p>
</td> </td>
<td valign="top" width="50%"> </tr>
<p>Specifies that the expression "\b" should not be matched against <tr>
the sub-sequence [first,first).</p> <td valign="top" width="50%">
</td> <p>match_any</p>
</tr> </td>
<td valign="top" width="50%">
<tr> <p>Specifies that if more than one match is possible then any match is an
<td valign="top" width="50%"> acceptable result.</p>
<p>match_not_eow</p> </td>
</td> </tr>
<td valign="top" width="50%"> <tr>
<p>Specifies that the expression "\b" should not be matched against <td valign="top" width="50%">
the sub-sequence [last,last).</p> <p>match_not_null</p>
</td> </td>
</tr> <td valign="top" width="50%">
<p>Specifies that the expression can not be matched against an empty sequence.</p>
<tr> </td>
<td valign="top" width="50%"> </tr>
<p>match_any</p> <tr>
</td> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>match_continuous</p>
<p>Specifies that if more than one match is possible then any match </td>
is an acceptable result.</p> <td valign="top" width="50%">
</td> <p>Specifies that the expression must match a sub-sequence that begins at <i>first</i>.</p>
</tr> </td>
</tr>
<tr> <tr>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>match_not_null</p> <p>match_partial</p>
</td> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>Specifies that the expression can not be matched against an <p>Specifies that if no match can be found, then it is acceptable to return a
empty sequence.</p> match [from, last) where from!=last, if there exists some sequence of
</td> characters [from,to) of which [from,last) is a prefix, and which would result
</tr> in a full match.</p>
</td>
<tr> </tr>
<td valign="top" width="50%"> <tr>
<p>match_continuous</p> <td valign="top" width="50%">
</td> <p>match_prev_avail</p>
<td valign="top" width="50%"> </td>
<p>Specifies that the expression must match a sub-sequence that <td valign="top" width="50%">
begins at <i>first</i>.</p> <p>Specifies that <code>--first</code> is a valid iterator position, when this
</td> flag is set then the flags <code>match_not_bol</code> and <code>match_not_bow</code>
</tr> are ignored by the regular expression algorithms (RE.7) and iterators (RE.8).</p>
</td>
<tr> </tr>
<td valign="top" width="50%"> <tr>
<p>match_partial</p> <td valign="top" width="50%">match_not_dot_newline</td>
</td> <td valign="top" width="50%">Specifies that the expression "." does not match a
<td valign="top" width="50%"> newline character.</td>
<p>Specifies that if no match can be found, then it is acceptable </tr>
to return a match [from, last) where from!=last, if there exists <tr>
some sequence of characters [from,to) of which [from,last) is a <td valign="top" width="50%">match_not_dot_null</td>
prefix, and which would result in a full match.</p> <td valign="top" width="50%">Specified that the expression "." does not match a
</td> character null '\0'.</td>
</tr> </tr>
<tr>
<tr> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>format_default</p>
<p>match_prev_avail</p> </td>
</td> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>Specifies that when a regular expression match is to be replaced by a new
<p>Specifies that <code>--first</code> is a valid iterator string, that the new string is constructed using the rules used by the
position, when this flag is set then the flags <code> ECMAScript replace function in ECMA-262, ECMAScript Language Specification,
match_not_bol</code> and <code>match_not_bow</code> are ignored by Chapter 15 part 5.4.11 String.prototype.replace. (FWD.1). In addition during
the regular expression algorithms (RE.7) and iterators (RE.8).</p> search and replace operations then all non-overlapping occurrences of the
</td> regular expression are located and replaced, and sections of the input that did
</tr> not match the expression, are copied unchanged to the output string.</p>
</td>
<tr> </tr>
<td valign="top" width="50%">match_not_dot_newline</td> <tr>
<td valign="top" width="50%">Specifies that the expression "." does <td valign="top" width="50%">
not match a newline character.</td> <p>format_sed</p>
</tr> </td>
<td valign="top" width="50%">
<tr> <p>Specifies that when a regular expression match is to be replaced by a new
<td valign="top" width="50%">match_not_dot_null</td> string, that the new string is constructed using the rules used by the Unix sed
<td valign="top" width="50%">Specified that the expression "." does utility in IEEE Std 1003.1-2001, Portable Operating SystemInterface (POSIX ),
not match a character null '\0'.</td> Shells and Utilities..</p>
</tr> </td>
</tr>
<tr> <tr>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>format_default</p> <p>format_perl</p>
</td> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>Specifies that when a regular expression match is to be replaced <p>
by a new string, that the new string is constructed using the rules Specifies that when a regular expression match is to be replaced by a new
used by the ECMAScript replace function in ECMA-262, ECMAScript string, that the new string is constructed using the same rules as Perl 5.</p>
Language Specification, Chapter 15 part 5.4.11 </td>
String.prototype.replace. (FWD.1). In addition during search and </tr>
replace operations then all non-overlapping occurrences of the <tr>
regular expression are located and replaced, and sections of the <td valign="top" width="50%" height="32">format_all</td>
input that did not match the expression, are copied unchanged to <td valign="top" width="50%" height="32">Specifies that all syntax extensions are
the output string.</p> enabled, including conditional (?ddexpression1:expression2) replacements: see
</td> the <A href="format_syntax.html">format string guide</A> for more details.</td>
</tr> </tr>
<tr>
<tr> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>format_no_copy</p>
<p>format_sed</p> </td>
</td> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>When specified during a search and replace operation, then sections of the
<p>Specifies that when a regular expression match is to be replaced character container sequence being searched that do match the regular
by a new string, that the new string is constructed using the rules expression, are not copied to the output string.</p>
used by the Unix sed utility in IEEE Std 1003.1-2001, Portable </td>
Operating SystemInterface (POSIX ), Shells and Utilities..</p> </tr>
</td> <tr>
</tr> <td valign="top" width="50%">
<p>format_first_only</p>
<tr> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>format_perl</p> <p>When specified during a search and replace operation, then only the first
</td> occurrence of the regular expression is replaced.</p>
<td valign="top" width="50%"> </td>
<p>Specifies that when a regular expression match is to be replaced </tr>
by a new string, that the new string is constructed using an </table>
implementation defined superset of the rules used by the ECMAScript <br>
replace function in ECMA-262, ECMAScript Language Specification, <br>
Chapter 15 part 5.4.11 String.prototype.replace (FWD.1).</p> <p></p>
</td> <hr>
</tr> <br>
<br>
<tr> <p>Revised
<td valign="top" width="50%" height="32">format_all</td> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
<td valign="top" width="50%" height="32">Specifies that all syntax 17 May 2003
extensions are enabled, including conditional <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
(?ddexpression1:expression2) replacements.</td> <p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a>&nbsp;1998-
</tr> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
2003
<tr> <!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<td valign="top" width="50%"> <p align="left"><i>Permission to use, copy, modify, distribute and sell this software
<p>format_no_copy</p> and its documentation for any purpose is hereby granted without fee, provided
</td> that the above copyright notice appear in all copies and that both that
<td valign="top" width="50%"> copyright notice and this permission notice appear in supporting documentation.
<p>When specified during a search and replace operation, then Dr John Maddock makes no representations about the suitability of this software
sections of the character container sequence being searched that do for any purpose. It is provided "as is" without express or implied warranty.</i></p>
match the regular expression, are not copied to the output </body>
string.</p>
</td>
</tr>
<tr>
<td valign="top" width="50%">
<p>format_first_only</p>
</td>
<td valign="top" width="50%">
<p>When specified during a search and replace operation, then only
the first occurrence of the regular expression is replaced.</p>
</td>
</tr>
</table>
<br>
<br>
<p></p>
<hr>
<br>
<br>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
17 May 2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
<p><i>&copy; Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
Maddock</a>&nbsp;1998-
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<p align="left"><i>Permission to use, copy, modify, distribute and
sell this software and its documentation for any purpose is hereby
granted without fee, provided that the above copyright notice
appear in all copies and that both that copyright notice and this
permission notice appear in supporting documentation. Dr John
Maddock makes no representations about the suitability of this
software for any purpose. It is provided "as is" without express or
implied warranty.</i></p>
</body>
</html> </html>

View File

@ -1,77 +1,57 @@
<!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 match_results</title>
<title>Boost.Regex: class match_results</title> <meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content= <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
"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">
<tr>
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" <td valign="top" width="300">
border="0"> <h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
<tr> </td>
<td valign="top" width="300"> <td width="353">
<h3><a href="../../../index.htm"><img height="86" width="277" alt= <h1 align="center">Boost.Regex</h1>
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3> <h2 align="center">class match_results</h2>
</td> </td>
<td width="353"> <td width="50">
<h1 align="center">Boost.Regex</h1> <h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
</td>
<h2 align="center">class match_results</h2> </tr>
</td> </table>
<td width="50"> <br>
<h3><a href="index.html"><img height="45" width="43" alt= <br>
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3> <hr>
</td> <h3>Contents</h3>
</tr> <dl class="index">
</table> <dt><a href="#synopsis">Synopsis</a> <dt><a href="#description">Description</a></dt>
</dl>
<br> <h3><a name="synopsis"></a>Synopsis</h3>
<br> <p>#include &lt;<a href="../../../boost/regex.hpp">boost/regex.hpp</a>&gt;</p>
<p>Regular expressions are different from many simple pattern-matching algorithms
in that as well as finding an overall match they can also produce
<hr> sub-expression matches: each sub-expression being delimited in the pattern by a
<h3>Contents</h3> pair of parenthesis (...). There has to be some method for reporting
sub-expression matches back to the user: this is achieved this by defining a
<dl class="index"> class <i>match_results</i> that acts as an indexed collection of sub-expression
<dt><a href="#synopsis">Synopsis</a></dt> matches, each sub-expression match being contained in an object of type <i><a href="sub_match.html">
sub_match</a></i> .</p>
<dt><a href="#description">Description</a></dt> <p>Template class match_results denotes a collection of character sequences
</dl> representing the result of a regular expression match. Objects of type
match_results are passed to the algorithms <a href="regex_match.html">regex_match</a>
<h3><a name="synopsis"></a>Synopsis</h3> and <a href="regex_search.html">regex_search</a>, and are returned by the
iterator <a href="regex_iterator.html">regex_iterator</a> .&nbsp; Storage for
<p>#include &lt;<a href="../../../boost/regex.hpp">boost/regex.hpp</a>&gt;</p> the collection is allocated and freed as necessary by the member functions of
class match_results.</p>
<p>Regular expressions are different from many simple <p>The template class match_results conforms to the requirements of a Sequence, as
pattern-matching algorithms in that as well as finding an overall specified in (lib.sequence.reqmts), except that only operations defined for
match they can also produce sub-expression matches: each const-qualified Sequences are supported.</p>
sub-expression being delimited in the pattern by a pair of <p>Class template match_results is most commonly used as one of the typedefs
parenthesis (...). There has to be some method for reporting cmatch, wcmatch, smatch, or wsmatch:</p>
sub-expression matches back to the user: this is achieved this by <pre>
defining a class <i>match_results</i> that acts as an indexed
collection of sub-expression matches, each sub-expression match
being contained in an object of type <i><a href="sub_match.html">
sub_match</a></i> .</p>
<p>Template class match_results denotes a collection of character
sequences representing the result of a regular expression match.
Objects of type match_results are passed to the algorithms <a href="regex_match.html">regex_match</a> and <a href="regex_search.html">
regex_search</a>, and are returned by the iterator <a href="regex_iterator.html">regex_iterator</a> .&nbsp; Storage for the
collection is allocated and freed as necessary by the member
functions of class match_results.</p>
<p>The template class match_results conforms to the requirements of
a Sequence, as specified in (lib.sequence.reqmts), except that only
operations defined for const-qualified Sequences are supported.</p>
<p>Class template match_results is most commonly used as one of the
typedefs cmatch, wcmatch, smatch, or wsmatch:</p>
<pre>
template &lt;class BidirectionalIterator, template &lt;class BidirectionalIterator,
class Allocator = allocator&lt;sub_match&lt;BidirectionalIterator&gt; &gt; class Allocator = allocator&lt;sub_match&lt;BidirectionalIterator&gt; &gt;
class match_results; class match_results;
@ -98,414 +78,354 @@ public:
typedef basic_string&lt;char_type&gt; string_type; typedef basic_string&lt;char_type&gt; string_type;
// construct/copy/destroy: // construct/copy/destroy:
explicit match_results(const Allocator&amp; a = Allocator()); explicit <A href="#c1">match_results</A>(const Allocator&amp; a = Allocator());
match_results(const match_results&amp; m); <A href="#c2">match_results</A>(const match_results&amp; m);
match_results&amp; operator=(const match_results&amp; m); <A href="#c3">match_results</A>&amp; <A href="#c3">operator</A>=(const match_results&amp; m);
~match_results(); ~match_results();
// size: // size:
size_type size() const; size_type <A href="#m1">size</A>() const;
size_type max_size() const; size_type <A href="#m2">max_size</A>() const;
bool empty() const; bool <A href="#m3">empty</A>() const;
// element access: // element access:
difference_type length(int sub = 0) const; difference_type <A href="#m4">length</A>(int sub = 0) const;
difference_type position(unsigned int sub = 0) const; difference_type <A href="#m5">position</A>(unsigned int sub = 0) const;
string_type str(int sub = 0) const; string_type <A href="#m6">str</A>(int sub = 0) const;
const_reference operator[](int n) const; const_reference <A href="#m7">operator</A>[](int n) const;
const_reference prefix() const; const_reference <A href="#m8">prefix</A>() const;
const_reference suffix() const; const_reference <A href="#m9">suffix</A>() const;
const_iterator begin() const; const_iterator <A href="#m10">begin</A>() const;
const_iterator end() const; const_iterator <A href="#m11">end</A>() const;
// format: // format:
template &lt;class OutputIterator&gt; template &lt;class OutputIterator&gt;
OutputIterator format(OutputIterator out, OutputIterator <A href="#m12">format</A>(OutputIterator out,
const string_type&amp; fmt, const string_type&amp; fmt,
match_flag_type flags = format_default) const; match_flag_type flags = format_default) const;
string_type format(const string_type&amp; fmt, string_type <A href="#m13">format</A>(const string_type&amp; fmt,
match_flag_type flags = format_default) const; match_flag_type flags = format_default) const;
allocator_type get_allocator() const; allocator_type <A href="#m14">get_allocator</A>() const;
void swap(match_results&amp; that); void <A href="#m15">swap</A>(match_results&amp; that);
}; };
template &lt;class BidirectionalIterator, class Allocator&gt; template &lt;class BidirectionalIterator, class Allocator&gt;
bool operator == (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1, bool <A href="#n1">operator</A> == (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2); const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
template &lt;class BidirectionalIterator, class Allocator&gt; template &lt;class BidirectionalIterator, class Allocator&gt;
bool operator != (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1, bool <A href="#n2">operator</A> != (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2); const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
template &lt;class charT, class traits, class BidirectionalIterator, class Allocator&gt; template &lt;class charT, class traits, class BidirectionalIterator, class Allocator&gt;
basic_ostream&lt;charT, traits&gt;&amp; basic_ostream&lt;charT, traits&gt;&amp;
operator &lt;&lt; (basic_ostream&lt;charT, traits&gt;&amp; os, <A href="#n3">operator</A> &lt;&lt; (basic_ostream&lt;charT, traits&gt;&amp; os,
const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m); const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m);
template &lt;class BidirectionalIterator, class Allocator&gt; template &lt;class BidirectionalIterator, class Allocator&gt;
void swap(match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1, void <A href="#n4">swap</A>(match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2); match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
</pre> </pre>
<h3><a name="description"></a>Description</h3>
<h3><a name="description"></a>Description</h3> <h4>match_results constructors</h4>
<p>In all <code>match_results</code> constructors, a copy of the Allocator
<h4>match_results constructors</h4> argument is used for any memory allocation performed by the constructor or
member functions during the lifetime of the object.</p>
<p>In all <code>match_results</code> constructors, a copy of the <pre><A name=c1></A>
Allocator argument is used for any memory allocation performed by
the constructor or member functions during the lifetime of the
object.</p>
<pre>
match_results(const Allocator&amp; a = Allocator()); match_results(const Allocator&amp; a = Allocator());
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Constructs an object of class match_results. The postconditions
<p><b>Effects:</b> Constructs an object of class match_results. The of this function are indicated in the table:</p>
postconditions of this function are indicated in the table:</p> <p align="center"></p>
<center>
<p align="center"></p> <table id="Table2" cellspacing="1" cellpadding="7" width="624" border="1">
<tbody>
<center> <tr>
<table id="Table2" cellspacing="1" cellpadding="7" width="624" <td valign="top" width="50%"><b></b>
border="1"> <p><b>Element</b></p>
<tbody> </td>
<tr> <td valign="top" width="50%"><b></b>
<td valign="top" width="50%"><b></b> <p><b>Value</b></p>
<p><b>Element</b></p> </td>
</td> </tr>
<td valign="top" width="50%"><b></b> <tr>
<p><b>Value</b></p> <td valign="top" width="50%">
</td> <p>empty()</p>
</tr> </td>
<td valign="top" width="50%">
<tr> <p>true</p>
<td valign="top" width="50%"> </td>
<p>empty()</p> </tr>
</td> <tr>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>true</p> <p>size()</p>
</td> </td>
</tr> <td valign="top" width="50%">
<p>0</p>
<tr> </td>
<td valign="top" width="50%"> </tr>
<p>size()</p> <tr>
</td> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>str()</p>
<p>0</p> </td>
</td> <td valign="top" width="50%">
</tr> <p>basic_string&lt;charT&gt;()</p>
</td>
<tr> </tr>
<td valign="top" width="50%"> </tbody>
<p>str()</p> </table>
</td> </center>
<td valign="top" width="50%"> <p>&nbsp;</p>
<p>basic_string&lt;charT&gt;()</p> <pre><A name=c2></A>
</td>
</tr>
</tbody>
</table>
</center>
<p>&nbsp;</p>
<pre>
match_results(const match_results&amp; m); match_results(const match_results&amp; m);
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Constructs an object of class match_results, as a copy of m.</p>
<p><b>Effects:</b> Constructs an object of class match_results, as <pre><A name=c3></A>
a copy of m.</p>
<pre>
match_results&amp; operator=(const match_results&amp; m); match_results&amp; operator=(const match_results&amp; m);
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Assigns m to *this. The postconditions of this function are
<p><b>Effects:</b> Assigns m to *this. The postconditions of this indicated in the table:</p>
function are indicated in the table:</p> <p align="center"></p>
<center>
<p align="center"></p> <table id="Table3" cellspacing="1" cellpadding="7" width="624" border="1">
<tbody>
<center> <tr>
<table id="Table3" cellspacing="1" cellpadding="7" width="624" <td valign="top" width="50%"><b></b>
border="1"> <p><b>Element</b></p>
<tbody> </td>
<tr> <td valign="top" width="50%"><b></b>
<td valign="top" width="50%"><b></b> <p><b>Value</b></p>
<p><b>Element</b></p> </td>
</td> </tr>
<td valign="top" width="50%"><b></b> <tr>
<p><b>Value</b></p> <td valign="top" width="50%">
</td> <p>empty()</p>
</tr> </td>
<td valign="top" width="50%">
<tr> <p>m.empty().</p>
<td valign="top" width="50%"> </td>
<p>empty()</p> </tr>
</td> <tr>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>m.empty().</p> <p>size()</p>
</td> </td>
</tr> <td valign="top" width="50%">
<p>m.size().</p>
<tr> </td>
<td valign="top" width="50%"> </tr>
<p>size()</p> <tr>
</td> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>str(n)</p>
<p>m.size().</p> </td>
</td> <td valign="top" width="50%">
</tr> <p>m.str(n) for all integers n &lt; m.size().</p>
</td>
<tr> </tr>
<td valign="top" width="50%"> <tr>
<p>str(n)</p> <td valign="top" width="50%">
</td> <p>prefix()</p>
<td valign="top" width="50%"> </td>
<p>m.str(n) for all integers n &lt; m.size().</p> <td valign="top" width="50%">
</td> <p>m.prefix().</p>
</tr> </td>
</tr>
<tr> <tr>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>prefix()</p> <p>suffix()</p>
</td> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>m.prefix().</p> <p>m.suffix().</p>
</td> </td>
</tr> </tr>
<tr>
<tr> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>(*this)[n]</p>
<p>suffix()</p> </td>
</td> <td valign="top" width="50%">
<td valign="top" width="50%"> <p>m[n] for all integers n &lt; m.size().</p>
<p>m.suffix().</p> </td>
</td> </tr>
</tr> <tr>
<td valign="top" width="50%">
<tr> <p>length(n)</p>
<td valign="top" width="50%"> </td>
<p>(*this)[n]</p> <td valign="top" width="50%">
</td> <p>m.length(n) for all integers n &lt; m.size().</p>
<td valign="top" width="50%"> </td>
<p>m[n] for all integers n &lt; m.size().</p> </tr>
</td> <tr>
</tr> <td valign="top" width="50%">
<p>position(n)</p>
<tr> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>length(n)</p> <p>m.position(n) for all integers n &lt; m.size().</p>
</td> </td>
<td valign="top" width="50%"> </tr>
<p>m.length(n) for all integers n &lt; m.size().</p> </tbody>
</td> </table>
</tr> </center>
<h4>match_results size</h4>
<tr> <pre><A name=m1></A>
<td valign="top" width="50%">
<p>position(n)</p>
</td>
<td valign="top" width="50%">
<p>m.position(n) for all integers n &lt; m.size().</p>
</td>
</tr>
</tbody>
</table>
</center>
<h4>match_results size</h4>
<pre>
size_type size()const; size_type size()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns the number of sub_match elements stored in *this; that
<p><b>Effects:</b> Returns the number of sub_match elements stored is the number of marked sub-expressions in the regular expression that was
in *this.</p> matched plus one.</p>
<pre><A name=m2></A>
<pre>
size_type max_size()const; size_type max_size()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns the maximum number of sub_match elements that can be
<p><b>Effects:</b> Returns the maximum number of sub_match elements stored in *this.</p>
that can be stored in *this.</p> <pre><A name=m3></A>
<pre>
bool empty()const; bool empty()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns <code>size() == 0</code>.</p>
<p><b>Effects:</b> Returns <code>size() == 0</code>.</p> <h4>match_results element access</h4>
<pre><A name=m4></A>
<h4>match_results element access</h4>
<pre>
difference_type length(int sub = 0)const; difference_type length(int sub = 0)const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns the length of sub-expression <EM>sub</EM>, that is to
<p><b>Effects:</b> Returns <code>(*this)[sub].length()</code>.</p> say: <code>(*this)[sub].length()</code>.</p>
<pre><A name=m5></A>
<pre>
difference_type position(unsigned int sub = 0)const; difference_type position(unsigned int sub = 0)const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns the starting location of sub-expression <EM>sub</EM>,
<p><b>Effects:</b> Returns <code>std::distance(prefix().first, or -1 if <EM>sub</EM> was not matched <code>.</code></p>
(*this)[sub].first).</code></p> <pre><A name=m6></A>
<pre>
string_type str(int sub = 0)const; string_type str(int sub = 0)const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns sub-expression <EM>sub</EM> as a string:&nbsp; <code>string_type((*this)[sub]).</code></p>
<p><b>Effects:</b> Returns <code> <pre><A name=m7></A>
string_type((*this)[sub]).</code></p>
<pre>
const_reference operator[](int n) const; const_reference operator[](int n) const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns a reference to the <code>sub_match</code> object
<p><b>Effects:</b> Returns a reference to the <code> representing the character sequence that matched marked sub-expression <i>n</i>.
sub_match</code> object representing the character sequence that If <code>n == 0</code> then returns a reference to a <code>sub_match</code> object
matched marked sub-expression <i>n</i>. If <code>n == 0</code> then representing the character sequence that matched the whole regular
returns a reference to a <code>sub_match</code> object representing expression.&nbsp; If <EM>n</EM> is out of range, or if <EM>n</EM> is an
the character sequence that matched the whole regular unmatched sub-expression, then returns a sub_match object whose <EM>matched</EM>
expression.</p> member is <EM>false</EM>.</p>
<pre><A name=m8></A>
<pre>
const_reference prefix()const; const_reference prefix()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns a reference to the <code>sub_match</code> object
<p><b>Effects:</b> Returns a reference to the <code> representing the character sequence from the start of the string being
sub_match</code> object representing the character sequence from matched/searched, to the start of the match found.</p>
the start of the string being matched/searched, to the start of the <pre><A name=m9></A>
match found.</p>
<pre>
const_reference suffix()const; const_reference suffix()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns a reference to the <code>sub_match</code> object
<p><b>Effects:</b> Returns a reference to the <code> representing the character sequence from the end of the match found to the end
sub_match</code> object representing the character sequence from of the string being matched/searched.</p>
the end of the match found to the end of the string being <pre><A name=m10></A>
matched/searched.</p>
<pre>
const_iterator begin()const; const_iterator begin()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns a starting iterator that enumerates over all the marked
<p><b>Effects:</b> Returns a starting iterator that enumerates over sub-expression matches stored in *this.</p>
all the marked sub-expression matches stored in *this.</p> <pre><A name=m11></A>
<pre>
const_iterator end()const; const_iterator end()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns a terminating iterator that enumerates over all the
<p><b>Effects:</b> Returns a terminating iterator that enumerates marked sub-expression matches stored in *this.</p>
over all the marked sub-expression matches stored in *this.</p> <h4><A name="format"></A>match_results reformatting</h4>
<pre><A name=m12></A>
<h4>match_results reformatting</h4>
<pre>
template &lt;class OutputIterator&gt; template &lt;class OutputIterator&gt;
OutputIterator format(OutputIterator out, OutputIterator format(OutputIterator out,
const string_type&amp; fmt, const string_type&amp; fmt,
<a href="match_flag_type.html">match_flag_type</a> flags = format_default); <a href="match_flag_type.html">match_flag_type</a> flags = format_default);
</pre> </pre>
<b></b>
<b></b> <p><b>Requires:</b> The type OutputIterator conforms to the Output Iterator
<p><b>Requires:</b> The type OutputIterator conforms to the Output requirements (24.1.2).</p>
Iterator requirements (24.1.2).</p> <b></b>
<p><b>Effects:</b> Copies the character sequence <i>[fmt.begin(), fmt.end())</i> to
<b></b> OutputIterator <i>out</i>. For each format specifier or escape sequence in <i>fmt</i>,
<p><b>Effects:</b> Copies the character sequence <i>[fmt.begin(), replace that sequence with either the character(s) it represents, or the
fmt.end())</i> to OutputIterator <i>out</i>. For each format sequence of characters within *this to which it refers. The bitmasks specified
specifier or escape sequence in <i>fmt</i>, replace that sequence in <i><a href="match_flag_type.html">flags</a></i> determines what <a href="format_syntax.html">
with either the character(s) it represents, or the sequence of format specifiers or escape sequences are recognized</a>, by default this is
characters within *this to which it refers. The bitmasks specified the format used by ECMA-262, ECMAScript Language Specification, Chapter 15 part
in <i><a href="match_flag_type.html">flags</a></i> determines what 5.4.11 String.prototype.replace.</p>
<a href="format_syntax.html">format specifiers or escape sequences <b></b>
are recognized</a>, by default this is the format used by ECMA-262, <p><b>Returns:</b> <i>out</i>.</p>
ECMAScript Language Specification, Chapter 15 part 5.4.11 <pre><A name=m13></A>
String.prototype.replace.</p>
<b></b>
<p><b>Returns:</b> <i>out</i>.</p>
<pre>
string_type format(const string_type&amp; fmt, string_type format(const string_type&amp; fmt,
<a href="match_flag_type.html">match_flag_type</a> flags = format_default); <a href="match_flag_type.html">match_flag_type</a> flags = format_default);
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns a copy of the string <i>fmt</i>. For each format
<p><b>Effects:</b> Returns a copy of the string <i>fmt</i>. For specifier or escape sequence in <i>fmt</i>, replace that sequence with either
each format specifier or escape sequence in <i>fmt</i>, replace the character(s) it represents, or the sequence of characters within *this to
that sequence with either the character(s) it represents, or the which it refers. The bitmasks specified in <i><a href="match_flag_type.html">flags</a></i>
sequence of characters within *this to which it refers. The determines what <a href="format_syntax.html">format specifiers or escape sequences
bitmasks specified in <i><a href="match_flag_type.html"> are recognized</a>, by default this is the format used by ECMA-262,
flags</a></i> determines what <a href="format_syntax.html">format ECMAScript Language Specification, Chapter 15 part 5.4.11
specifiers or escape sequences are recognized</a>, by default this String.prototype.replace.</p>
is the format used by ECMA-262, ECMAScript Language Specification, <pre><A name=m14></A>
Chapter 15 part 5.4.11 String.prototype.replace.</p>
<pre>
allocator_type get_allocator()const; allocator_type get_allocator()const;
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Returns a copy of the Allocator that was passed to the object's
<p><b>Effects:</b> Returns a copy of the Allocator that was passed constructor.</p>
to the object's constructor.</p> <pre><A name=m15></A>
<pre>
void swap(match_results&amp; that); void swap(match_results&amp; that);
</pre> </pre>
<b></b>
<b></b> <p><b>Effects:</b> Swaps the contents of the two sequences.</p>
<p><b>Effects:</b> Swaps the contents of the two sequences.</p> <b></b>
<p><b>Postcondition:</b> <code>*this</code> contains the sequence of matched
<b></b> sub-expressions that were in <code>that</code>, <code>that</code> contains the
<p><b>Postcondition:</b> <code>*this</code> contains the sequence sequence of matched sub-expressions that were in <code>*this</code>.</p>
of matched sub-expressions that were in <code>that</code>, <code> <b></b>
that</code> contains the sequence of matched sub-expressions that <p><b>Complexity:</b> constant time.</p>
were in <code>*this</code>.</p> <h4>match_results non-members</h4>
<PRE><A name=n1></A>template &lt;class BidirectionalIterator, class Allocator&gt;
<b></b> bool operator == (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
<p><b>Complexity:</b> constant time.</p> const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);</PRE>
<P><B>Effects:</B> Compares the two sequences for equality.</P>
<p></p> <PRE><A name=n2></A>template &lt;class BidirectionalIterator, class Allocator&gt;
bool operator != (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
<hr> const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);</PRE>
<p>Revised <P><B>Effects:</B> Compares the two sequences for inequality.</P>
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> <PRE><A name=n3></A>template &lt;class charT, class traits, class BidirectionalIterator, class Allocator&gt;
17 May 2003 basic_ostream&lt;charT, traits&gt;&amp;
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p> operator &lt;&lt; (basic_ostream&lt;charT, traits&gt;&amp; os,
const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m);</PRE>
<p><i>&copy; Copyright <a href="mailto:jm@regex.fsnet.co.uk">John <P><B>Effects:</B> Writes the contents of <EM>m</EM> to the stream <EM>os</EM> as
Maddock</a>&nbsp;1998- if by calling <code>os &lt;&lt; m.str();</code> Returns <EM>os</EM>..</P>
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> <PRE><A name=n4></A>template &lt;class BidirectionalIterator, class Allocator&gt;
2003 void swap(match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p> match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);</PRE>
<P><B>Effects:</B> Swaps the contents of the two sequences.</P>
<p align="left"><i>Permission to use, copy, modify, distribute and <p></p>
sell this software and its documentation for any purpose is hereby <hr>
granted without fee, provided that the above copyright notice <p>Revised
appear in all copies and that both that copyright notice and this <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
permission notice appear in supporting documentation. Dr John 17 May 2003
Maddock makes no representations about the suitability of this <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
software for any purpose. It is provided "as is" without express or <p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a>&nbsp;1998-
implied warranty.</i></p> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
</body> 2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
<p align="left"><i>Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee, provided
that the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting documentation.
Dr John Maddock makes no representations about the suitability of this software
for any purpose. It is provided "as is" without express or implied warranty.</i></p>
</body>
</html> </html>

View File

@ -25,14 +25,15 @@
<HR> <HR>
<p></p> <p></p>
<P>If you are using Microsoft or Borland C++ and link to a dll version of the run <P>If you are using Microsoft or Borland C++ and link to a dll version of the run
time library, then you will also link to one of the dll versions of time library, then you can choose to also link to a dll version of boost.regex
boost.regex. While these dll's are redistributable, there are no "standard" by defining the symbol BOOST_REGEX_DYN_LINK when you compile your code. While
versions, so when installing on the users PC, you should place these in a these dll's are redistributable, there are no "standard" versions, so when
directory private to your application, and not in the PC's directory path. Note installing on the users PC, you should place these in a directory private to
that if you link to a static version of your run time library, then you will your application, and not in the PC's directory path. Note that if you link to
also link to a static version of boost.regex and no dll's will need to be a static version of your run time library, then you will also link to a static
distributed. The possible boost.regex dll and library names are computed version of boost.regex and no dll's will need to be distributed. The possible
according to the following formula:<BR> boost.regex dll and library names are computed according to the following
formula:<BR>
</P> </P>
<P></P> <P></P>
<P>BOOST_LIB_PREFIX<BR> <P>BOOST_LIB_PREFIX<BR>

View File

@ -42,40 +42,39 @@ template &lt;class BidirectionalIterator,
class regex_iterator class regex_iterator
{ {
public: public:
typedef basic_regex&lt;charT, traits, Allocator&gt; regex_type; typedef <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator&gt; regex_type;
typedef match_results&lt;BidirectionalIterator&gt; value_type; typedef <A href="match_results.html">match_results</A>&lt;BidirectionalIterator&gt; value_type;
typedef typename iterator_traits&lt;BidirectionalIterator&gt;::difference_type difference_type; typedef typename iterator_traits&lt;BidirectionalIterator&gt;::difference_type difference_type;
typedef const value_type* pointer; typedef const value_type* pointer;
typedef const value_type&amp; reference; typedef const value_type&amp; reference;
typedef std::forward_iterator_tag iterator_category; typedef std::forward_iterator_tag iterator_category;
regex_iterator(); <A href="#c1">regex_iterator</A>();
regex_iterator(BidirectionalIterator a, BidirectionalIterator b, <A href="#c2">regex_iterator</A>(BidirectionalIterator a, BidirectionalIterator b,
const regex_type&amp; re, const regex_type&amp; re,
match_flag_type m = match_default); <A href="match_flag_type.html">match_flag_type</A> m = match_default);
regex_iterator(const regex_iterator&amp;); <A href="#c3">regex_iterator</A>(const regex_iterator&amp;);
regex_iterator&amp; operator=(const regex_iterator&amp;); regex_iterator&amp; <A href="#o1">operator</A>=(const regex_iterator&amp;);
bool operator==(const regex_iterator&amp;); bool <A href="#o2">operator</A>==(const regex_iterator&amp;)const;
bool operator!=(const regex_iterator&amp;); bool <A href="#o3">operator</A>!=(const regex_iterator&amp;)const;
const value_type&amp; operator*(); const value_type&amp; <A href="#o4">operator</A>*()const;
const value_type* operator-&gt;(); const value_type* <A href="#o5">operator</A>-&gt;()const;
regex_iterator&amp; operator++(); regex_iterator&amp; <A href="#o6">operator</A>++();
regex_iterator operator++(int); regex_iterator <A href="#o7">operator</A>++(int);
}; };
</pre> </pre>
<h3><a name="description"></a>Description</h3> <h3><a name="description"></a>Description</h3>
<p>A regex_iterator is constructed from a pair of iterators, and enumerates all <p>A regex_iterator is constructed from a pair of iterators, and enumerates all
occurrences of a regular expression within that iterator range.</p> occurrences of a regular expression within that iterator range.</p>
<pre> <pre><A name=c1></A>
regex_iterator(); regex_iterator();
</pre> </pre>
<b></b> <b></b>
<p><b>Effects:</b> constructs an end of sequence regex_iterator.</p> <p><b>Effects:</b> constructs an end of sequence regex_iterator.</p>
<pre> <pre><A name=c2></A>regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
const regex_type&amp; re, const regex_type&amp; re,
match_flag_type m = match_default); <A href="match_flag_type.html">match_flag_type</A> m = match_default);
</pre> </pre>
<b></b> <b></b>
<p><b>Effects:</b> constructs a regex_iterator that will enumerate all occurrences <p><b>Effects:</b> constructs a regex_iterator that will enumerate all occurrences
@ -88,32 +87,32 @@ regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
Boost.regex is <A href="configuration.html">configured</A> in recursive mode), Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html"> or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
<pre> <pre><A name=c3></A>
regex_iterator(const regex_iterator&amp; that); regex_iterator(const regex_iterator&amp; that);
</pre> </pre>
<b></b> <b></b>
<p><b>Effects:</b> constructs a copy of <code>that</code>.</p> <p><b>Effects:</b> constructs a copy of <code>that</code>.</p>
<b></b> <b></b>
<p><b>Postconditions:</b> <code>*this == that</code>.</p> <p><b>Postconditions:</b> <code>*this == that</code>.</p>
<pre> <pre><A name=o1></A>
regex_iterator&amp; operator=(const regex_iterator&amp;); regex_iterator&amp; operator=(const regex_iterator&amp;);
</pre> </pre>
<b></b> <b></b>
<p><b>Effects:</b> sets&nbsp;<code>*this</code> equal to those in <code>that</code>.</p> <p><b>Effects:</b> sets&nbsp;<code>*this</code> equal to those in <code>that</code>.</p>
<b></b> <b></b>
<p><b>Postconditions:</b> <code>*this == that</code>.</p> <p><b>Postconditions:</b> <code>*this == that</code>.</p>
<pre> <pre><A name=o2></A>
bool operator==(const regex_iterator&amp; that); bool operator==(const regex_iterator&amp; that)const;
</pre> </pre>
<b></b> <b></b>
<p><b>Effects:</b> returns true if *this is equal to that.</p> <p><b>Effects:</b> returns true if *this is equal to that.</p>
<pre> <pre><A name=o3></A>
bool operator!=(const regex_iterator&amp;); bool operator!=(const regex_iterator&amp;)const;
</pre> </pre>
<b></b> <b></b>
<p><b>Effects:</b> returns <code>!(*this == that)</code>.</p> <p><b>Effects:</b> returns <code>!(*this == that)</code>.</p>
<pre> <pre><A name=o4></A>
const value_type&amp; operator*(); const value_type&amp; operator*()const;
</pre> </pre>
<p><b>Effects:</b> dereferencing a regex_iterator object <em>it</em> yields a <p><b>Effects:</b> dereferencing a regex_iterator object <em>it</em> yields a
const reference to a <a href="match_results.html">match_results</a> object, const reference to a <a href="match_results.html">match_results</a> object,
@ -159,7 +158,8 @@ const value_type&amp; operator*();
<p>(*it).prefix().last</p> <p>(*it).prefix().last</p>
</td> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>(*it)[0].first</p> <p>The same as the start of the match found:<BR>
(*it)[0].first</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -167,7 +167,8 @@ const value_type&amp; operator*();
<p>(*it).prefix().matched</p> <p>(*it).prefix().matched</p>
</td> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>(*it).prefix().first != (*it).prefix().second</p> <p>True if the prefix did not match an empty string:<BR>
(*it).prefix().first != (*it).prefix().second</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -175,7 +176,8 @@ const value_type&amp; operator*();
<p>(*it).suffix().first</p> <p>(*it).suffix().first</p>
</td> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>(*it)[0].second</p> <p>The same as the end of the match found:<BR>
(*it)[0].second</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -191,7 +193,8 @@ const value_type&amp; operator*();
<p>(*it).suffix().matched</p> <p>(*it).suffix().matched</p>
</td> </td>
<td valign="top" width="50%"> <td valign="top" width="50%">
<p>(*it).suffix().first != (*it).suffix().second</p> <p>True if the suffix did not match an empty string:<BR>
(*it).suffix().first != (*it).suffix().second</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -259,12 +262,12 @@ const value_type&amp; operator*();
</table> </table>
<br> <br>
<br> <br>
<pre> <pre><A name=o5></A>
const value_type* operator-&gt;(); const value_type* operator-&gt;()const;
</pre> </pre>
<b></b> <b></b>
<p><b>Effects:</b> returns <code>&amp;(*this)</code>.</p> <p><b>Effects:</b> returns <code>&amp;(*this)</code>.</p>
<pre> <pre><A name=o6></A>
regex_iterator&amp; operator++(); regex_iterator&amp; operator++();
</pre> </pre>
<p><strong>Effects:</strong> moves the iterator to the next match in the <p><strong>Effects:</strong> moves the iterator to the next match in the
@ -282,7 +285,7 @@ regex_iterator&amp; operator++();
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
<b></b> <b></b>
<p><b>Returns:</b> <code>*this</code>.</p> <p><b>Returns:</b> <code>*this</code>.</p>
<pre> <pre><A name=o7></A>
regex_iterator operator++(int); regex_iterator operator++(int);
</pre> </pre>
<b></b> <b></b>

View File

@ -31,47 +31,53 @@
</dl> </dl>
<H3><A name="synopsis"></A>Synopsis</H3> <H3><A name="synopsis"></A>Synopsis</H3>
<PRE><A name=query_match></A>#include &lt;<A href="../../../boost/regex.hpp">boost/regex.hpp</A>&gt; </PRE> <PRE><A name=query_match></A>#include &lt;<A href="../../../boost/regex.hpp">boost/regex.hpp</A>&gt; </PRE>
<P>The algorithm regex _match determines whether a given regular expression <P>
matches a given sequence denoted by a pair of bidirectional-iterators, the The algorithm regex _match determines whether a given regular expression
algorithm is defined as follows, <STRONG>note that the result is true only if the matches all of a given character sequence denoted by a pair of
expression matches the whole of the input sequence</STRONG>, the main use of bidirectional-iterators, the algorithm is defined as follows, the main use of
this function is data input validation. this function is data input validation.
<P><STRONG>Note that the result is true only if the expression matches the whole of
the input sequence.&nbsp;</STRONG> If you want to search for an expression
somewhere within the sequence then use <A href="regex_search.html">regex_search</A>.&nbsp;
If you want to match a prefix of the character string then use <A href="regex_search.html">
regex_search</A> with the flag <A href="match_flag_type.html">match_continuous</A>
set.
<PRE>template &lt;class BidirectionalIterator, class Allocator, class charT, <PRE>template &lt;class BidirectionalIterator, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_match(BidirectionalIterator first, BidirectionalIterator last, bool <A href="#f1">regex_match</A>(BidirectionalIterator first, BidirectionalIterator last,
<A href="match_results.html">match_results</A>&lt;BidirectionalIterator, Allocator&gt;&amp; m, <A href="match_results.html">match_results</A>&lt;BidirectionalIterator, Allocator&gt;&amp; m,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default); <A href="match_flag_type.html">match_flag_type</A> flags = match_default);
template &lt;class BidirectionalIterator, class charT, class traits, class Allocator2&gt; template &lt;class BidirectionalIterator, class charT, class traits, class Allocator2&gt;
bool regex_match(BidirectionalIterator first, BidirectionalIterator last, bool <A href="#f2">regex_match</A>(BidirectionalIterator first, BidirectionalIterator last,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default); <A href="match_flag_type.html">match_flag_type</A> flags = match_default);
template &lt;class charT, class Allocator, class traits, class Allocator2&gt; template &lt;class charT, class Allocator, class traits, class Allocator2&gt;
bool regex_match(const charT* str, <A href="match_results.html">match_results</A>&lt;const charT*, Allocator&gt;&amp; m, bool <A href="#f3">regex_match</A>(const charT* str, <A href="match_results.html">match_results</A>&lt;const charT*, Allocator&gt;&amp; m,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default); <A href="match_flag_type.html">match_flag_type</A> flags = match_default);
template &lt;class ST, class SA, class Allocator, class charT, template &lt;class ST, class SA, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool <A href="#f4">regex_match</A>(const basic_string&lt;charT, ST, SA&gt;&amp; s,
<A href="match_results.html">match_results</A>&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator, Allocator&gt;&amp; m, <A href="match_results.html">match_results</A>&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator, Allocator&gt;&amp; m,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default); <A href="match_flag_type.html">match_flag_type</A> flags = match_default);
template &lt;class charT, class traits, class Allocator2&gt; template &lt;class charT, class traits, class Allocator2&gt;
bool regex_match(const charT* str, bool <A href="#f5">regex_match</A>(const charT* str,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default); <A href="match_flag_type.html">match_flag_type</A> flags = match_default);
template &lt;class ST, class SA, class charT, class traits, class Allocator2&gt; template &lt;class ST, class SA, class charT, class traits, class Allocator2&gt;
bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool <A href="#f6">regex_match</A>(const basic_string&lt;charT, ST, SA&gt;&amp; s,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default); <A href="match_flag_type.html">match_flag_type</A> flags = match_default);
</PRE> </PRE>
<H3><A name="description"></A>Description</H3> <H3><A name="description"></A>Description</H3>
<PRE>template &lt;class BidirectionalIterator, class Allocator, class charT, <PRE><A name=f1></A>template &lt;class BidirectionalIterator, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_match(BidirectionalIterator first, BidirectionalIterator last, bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
<A href="match_results.html">match_results</A>&lt;BidirectionalIterator, Allocator&gt;&amp; m, <A href="match_results.html">match_results</A>&lt;BidirectionalIterator, Allocator&gt;&amp; m,
@ -84,9 +90,9 @@ bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
flags</I> is used to <A href="match_flag_type.html">control how the expression flags</I> is used to <A href="match_flag_type.html">control how the expression
is matched</A> against the character sequence. Returns true if such a match is matched</A> against the character sequence. Returns true if such a match
exists, false otherwise.</P> exists, false otherwise.</P>
<P><STRONG>Throws:</STRONG> <code>std::runtime_error</code> if the complexity of matching the <P><STRONG>Throws:</STRONG> <code>std::runtime_error</code> if the complexity of
expression against an N character string begins to exceed O(N<SUP>2</SUP>), or matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
if the program runs out of stack space while matching the expression (if or if the program runs out of stack space while matching the expression (if
Boost.regex is <A href="configuration.html">configured</A> in recursive mode), Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html"> or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
@ -231,20 +237,20 @@ bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
<P></P> <P></P>
<DIV></DIV> <DIV></DIV>
<PRE>&nbsp;</PRE> <PRE>&nbsp;</PRE>
<PRE>template &lt;class BidirectionalIterator, class charT, class traits, class Allocator2&gt; <PRE><A name=f2></A>template &lt;class BidirectionalIterator, class charT, class traits, class Allocator2&gt;
bool regex_match(BidirectionalIterator first, BidirectionalIterator last, bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE> <A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
<P><B> Effects:</B> Behaves "as if" by constructing an instance of <CODE><A href="match_results.html"> <P><B> Effects:</B> Behaves "as if" by constructing an instance of <CODE><A href="match_results.html">
match_results</A>&lt;</CODE>BidirectionalIterator<CODE>&gt; what</CODE>, match_results</A>&lt;</CODE>BidirectionalIterator<CODE>&gt; what</CODE>,
and then returning the result of <CODE>regex_match(first, last, what, e, flags)</CODE>.</P> and then returning the result of <CODE>regex_match(first, last, what, e, flags)</CODE>.</P>
<PRE>template &lt;class charT, class Allocator, class traits, class Allocator2&gt; <PRE><A name=f3></A>template &lt;class charT, class Allocator, class traits, class Allocator2&gt;
bool regex_match(const charT* str, <A href="match_results.html">match_results</A>&lt;const charT*, Allocator&gt;&amp; m, bool regex_match(const charT* str, <A href="match_results.html">match_results</A>&lt;const charT*, Allocator&gt;&amp; m,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE> <A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
<P><B> Effects:</B> Returns the result of <CODE>regex_match(str, str + <P><B> Effects:</B> Returns the result of <CODE>regex_match(str, str +
char_traits&lt;charT&gt;::length(str), m, e, flags)</CODE>.</P> char_traits&lt;charT&gt;::length(str), m, e, flags)</CODE>.</P>
<PRE>template &lt;class ST, class SA, class Allocator, class charT, <PRE><A name=f4></A>template &lt;class ST, class SA, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s,
<A href="match_results.html">match_results</A>&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator, Allocator&gt;&amp; m, <A href="match_results.html">match_results</A>&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator, Allocator&gt;&amp; m,
@ -252,13 +258,13 @@ bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE> <A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
<P><B> Effects:</B> Returns the result of <CODE>regex_match(s.begin(), s.end(), m, e, <P><B> Effects:</B> Returns the result of <CODE>regex_match(s.begin(), s.end(), m, e,
flags)</CODE>.</P> flags)</CODE>.</P>
<PRE>template &lt;class charT, class traits, class Allocator2&gt; <PRE><A name=f5></A>template &lt;class charT, class traits, class Allocator2&gt;
bool regex_match(const charT* str, bool regex_match(const charT* str,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE> <A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
<P><B> Effects:</B> Returns the result of <CODE>regex_match(str, str + <P><B> Effects:</B> Returns the result of <CODE>regex_match(str, str +
char_traits&lt;charT&gt;::length(str), e, flags)</CODE>.</P> char_traits&lt;charT&gt;::length(str), e, flags)</CODE>.</P>
<PRE>template &lt;class ST, class SA, class charT, class traits, class Allocator2&gt; <PRE><A name=f6></A>template &lt;class ST, class SA, class charT, class traits, class Allocator2&gt;
bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s,
const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator2&gt;&amp; e,
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE> <A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>

View File

@ -29,7 +29,7 @@
<H3><A name="synopsis"></A>Synopsis</H3> <H3><A name="synopsis"></A>Synopsis</H3>
<PRE>#include &lt;<A href="../../../boost/regex.hpp">boost/regex.hpp</A>&gt; </PRE> <PRE>#include &lt;<A href="../../../boost/regex.hpp">boost/regex.hpp</A>&gt; </PRE>
<P>The algorithm regex_replace&nbsp;searches&nbsp;through&nbsp;a string finding <P>The algorithm regex_replace&nbsp;searches&nbsp;through&nbsp;a string finding
all the matches to the regular expression: for each match it then calls <A href="match_results.html"> all the matches to the regular expression: for each match it then calls <A href="match_results.html#format">
match_results::format</A> to format the string and sends the result to the match_results::format</A> to format the string and sends the result to the
output iterator. Sections of text that do not match are copied to the output output iterator. Sections of text that do not match are copied to the output
unchanged only if the <EM>flags</EM> parameter does not have the flag <A href="match_flag_type.html"> unchanged only if the <EM>flags</EM> parameter does not have the flag <A href="match_flag_type.html">
@ -37,39 +37,87 @@
is set then only the first occurrence is replaced rather than all is set then only the first occurrence is replaced rather than all
occurrences.&nbsp;<PRE>template &lt;class OutputIterator, class BidirectionalIterator, class traits, occurrences.&nbsp;<PRE>template &lt;class OutputIterator, class BidirectionalIterator, class traits,
class Allocator, class charT&gt; class Allocator, class charT&gt;
OutputIterator regex_replace(OutputIterator out, OutputIterator <A href="#f1">regex_replace</A>(OutputIterator out,
BidirectionalIterator first, BidirectionalIterator first,
BidirectionalIterator last, BidirectionalIterator last,
const basic_regex&lt;charT, traits, Allocator&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator&gt;&amp; e,
const basic_string&lt;charT&gt;&amp; fmt, const basic_string&lt;charT&gt;&amp; fmt,
match_flag_type flags = match_default); <A href="match_flag_type.html">match_flag_type flags = match_default</A>);
template &lt;class traits, class Allocator, class charT&gt; template &lt;class traits, class Allocator, class charT&gt;
basic_string&lt;charT&gt; regex_replace(const basic_string&lt;charT&gt;&amp; s, basic_string&lt;charT&gt; <A href="#f2">regex_replace</A>(const basic_string&lt;charT&gt;&amp; s,
const basic_regex&lt;charT, traits, Allocator&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator&gt;&amp; e,
const basic_string&lt;charT&gt;&amp; fmt, const basic_string&lt;charT&gt;&amp; fmt,
match_flag_type flags = match_default); <A href="match_flag_type.html">match_flag_type flags = match_default</A>);
</PRE> </PRE>
<H3><A name="description"></A>Description</H3> <H3><A name="description"></A>Description</H3>
<PRE>template &lt;class OutputIterator, class BidirectionalIterator, class traits, <PRE><A name=f1></A>template &lt;class OutputIterator, class BidirectionalIterator, class traits,
class Allocator, class charT&gt; class Allocator, class charT&gt;
OutputIterator regex_replace(OutputIterator out, OutputIterator regex_replace(OutputIterator out,
BidirectionalIterator first, BidirectionalIterator first,
BidirectionalIterator last, BidirectionalIterator last,
const basic_regex&lt;charT, traits, Allocator&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator&gt;&amp; e,
const basic_string&lt;charT&gt;&amp; fmt, const basic_string&lt;charT&gt;&amp; fmt,
match_flag_type flags = match_default);</PRE> <A href="match_flag_type.html">match_flag_type flags = match_default</A>);</PRE>
<P><B> Effects:</B> Finds all the non-overlapping matches <I>m</I> of type <CODE>match_results&lt;BidirectionalIterator&gt; <P>Enumerates all the occurences of expression <EM>e</EM> in the sequence [first,
</CODE>that occur within the sequence [first, last). If no such matches are last), replacing each occurence with the string that results by merging the
found and <CODE>!(flags &amp; format_no_copy)</CODE> then calls <CODE>std::copy(first, match found with the format string <EM>fmt</EM>, and copies the resulting
last, out)</CODE>. Otherwise, for each match found, if <CODE>!(flags &amp; string to <EM>out</EM>.&nbsp;</P>
format_no_copy)</CODE> calls <CODE>std::copy(m.prefix().first, m.prefix().last, <P>If the flag format_no_copy is set in <EM>flags</EM> then unmatched sections of
out)</CODE>, and then calls <CODE>m.format(out, fmt, flags)</CODE>. Finally text are not copied to output.&nbsp;
if <CODE>!(flags &amp; format_no_copy)</CODE> calls <CODE>std::copy(last_m.suffix().first, </P>
last_m,suffix().last, out) </CODE>where <CODE>last_m</CODE> is a copy of the <P>If the flag format_first_only is set in <EM>flags</EM> then only the first
last match found. If <CODE>flags &amp; format_first_only</CODE> is non-zero occurence of <EM>e</EM> is replaced.&nbsp;
then only the first match found is replaced.</P> </P>
<P>The manner in which the format string <EM>fmt</EM> is interpretted, along with
the rules used&nbsp;for finding matches,&nbsp;are determined by the <A href="match_flag_type.html">
flags</A> set in <EM>flags</EM></P>
<P><B>Effects:</B> Constructs an
<SPAN class="spelle">regex_iterator</SPAN>
object:
</P>
<PRE><SPAN style="FONT-SIZE: 10pt">regex_iterator&lt;</SPAN><SPAN class=spelle><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">BidirectionalIterator</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt">, </SPAN><SPAN class=spelle><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">charT</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt">, traits, Allocator&gt; <BR> </SPAN><SPAN class=grame><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">i(</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt">first, last, e, flags)</SPAN>, </PRE>
<P>and uses
<SPAN class="spelle">
<I>i</I></SPAN>
to enumerate through all of the matches <I>m</I> of type
<SPAN class="spelle">
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">match_results</SPAN>
</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&lt;<SPAN class="spelle">BidirectionalIterator</SPAN>&gt; </SPAN>that
occur within the sequence [first, last).
</P>
<P>If no such matches are found
<SPAN class="grame">and </SPAN></P>
<PRE><SPAN class=grame></SPAN><SPAN class=grame><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">!</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(flags &amp; <SPAN class=spelle>format_no_copy</SPAN>)</SPAN> </PRE>
<P>then calls
</P>
<PRE><SPAN class=spelle><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">std::copy</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(first, last, out)</SPAN>. </PRE>
<P>Otherwise, for each match found,
<SPAN class="grame">if </SPAN></P>
<PRE><SPAN class=grame></SPAN><SPAN class=grame><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">!</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(flags &amp; <SPAN class=spelle>format_no_copy</SPAN>)</SPAN> </PRE>
<P>calls
</P>
<PRE><SPAN class=spelle><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">std::copy</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(<SPAN class=spelle>m.prefix</SPAN>().first, <SPAN class=spelle>m.prefix</SPAN>().last, out)</SPAN>, </PRE>
<P>and then calls
</P>
<PRE><SPAN class=spelle><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">m.format</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(out, <SPAN class=spelle>fmt</SPAN>, flags)</SPAN>. </PRE>
<P>Finally
<SPAN class="grame">if </SPAN></P>
<PRE><SPAN class=grame></SPAN><SPAN class=grame><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">!</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(flags &amp; <SPAN class=spelle>format_no_copy</SPAN>)</SPAN> </PRE>
<P>calls
</P>
<PRE><SPAN class=spelle><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">std::copy</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(<SPAN class=spelle>last_m.suffix</SPAN>().first, <SPAN class=spelle>last_m,suffix</SPAN>().last, out) </SPAN></PRE>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"></SPAN>where
<SPAN class="spelle">
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">last_m</SPAN>
</SPAN>
is a copy of the last match found.
</P>
<P>If
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">flags &amp;
<SPAN class="spelle">format_first_only</SPAN></SPAN>
is non-zero then only the first match found is replaced.</P>
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of <P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>), matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
or if the program runs out of stack space while matching the expression (if or if the program runs out of stack space while matching the expression (if
@ -78,11 +126,11 @@ OutputIterator regex_replace(OutputIterator out,
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
<P><B> Returns:</B> <CODE>out</CODE>. <P><B> Returns:</B> <CODE>out</CODE>.
</P> </P>
<PRE>template &lt;class traits, class Allocator, class charT&gt; <PRE><A name=f2></A>template &lt;class traits, class Allocator, class charT&gt;
basic_string&lt;charT&gt; regex_replace(const basic_string&lt;charT&gt;&amp; s, basic_string&lt;charT&gt; regex_replace(const basic_string&lt;charT&gt;&amp; s,
const basic_regex&lt;charT, traits, Allocator&gt;&amp; e, const <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator&gt;&amp; e,
const basic_string&lt;charT&gt;&amp; fmt, const basic_string&lt;charT&gt;&amp; fmt,
match_flag_type flags = match_default);</PRE> <A href="match_flag_type.html">match_flag_type flags = match_default</A>);</PRE>
<P><B> Effects:</B> Constructs an object <CODE>basic_string&lt;charT&gt; result</CODE>, <P><B> Effects:</B> Constructs an object <CODE>basic_string&lt;charT&gt; result</CODE>,
calls <CODE>regex_replace(back_inserter(result), s.begin(), s.end(), e, fmt, calls <CODE>regex_replace(back_inserter(result), s.begin(), s.end(), e, fmt,
flags)</CODE>, and then returns <CODE>result</CODE>. flags)</CODE>, and then returns <CODE>result</CODE>.

View File

@ -37,7 +37,7 @@
<PRE>template &lt;class BidirectionalIterator, <PRE>template &lt;class BidirectionalIterator,
class Allocator, class charT, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_search(BidirectionalIterator first, BidirectionalIterator last, bool <A href="#f1">regex_search</A>(BidirectionalIterator first, BidirectionalIterator last,
<a href="match_results.html">match_results</a>&lt;BidirectionalIterator, Allocator&gt;&amp; m, <a href="match_results.html">match_results</a>&lt;BidirectionalIterator, Allocator&gt;&amp; m,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator2&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator2&gt;&amp; e,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default); <a href="match_flag_type.html">match_flag_type</a> flags = match_default);
@ -45,7 +45,7 @@ bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
template &lt;class ST, class SA, template &lt;class ST, class SA,
class Allocator, class charT, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool <A href="#f2">regex_search</A>(const basic_string&lt;charT, ST, SA&gt;&amp; s,
<a href="match_results.html">match_results</a>&lt; <a href="match_results.html">match_results</a>&lt;
typename basic_string&lt;charT, ST,SA&gt;::const_iterator, typename basic_string&lt;charT, ST,SA&gt;::const_iterator,
Allocator&gt;&amp; m, Allocator&gt;&amp; m,
@ -54,32 +54,32 @@ bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
template&lt;class charT, class Allocator, class traits, template&lt;class charT, class Allocator, class traits,
class Allocator2&gt; class Allocator2&gt;
bool regex_search(const charT* str, bool <A href="#f3">regex_search</A>(const charT* str,
<a href="match_results.html">match_results</a>&lt;const charT*, Allocator&gt;&amp; m, <a href="match_results.html">match_results</a>&lt;const charT*, Allocator&gt;&amp; m,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator2&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator2&gt;&amp; e,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default); <a href="match_flag_type.html">match_flag_type</a> flags = match_default);
template &lt;class BidirectionalIterator, class Allocator, template &lt;class BidirectionalIterator, class Allocator,
class charT, class traits&gt; class charT, class traits&gt;
bool regex_search(BidirectionalIterator first, BidirectionalIterator last, bool <A href="#f4">regex_search</A>(BidirectionalIterator first, BidirectionalIterator last,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default); <a href="match_flag_type.html">match_flag_type</a> flags = match_default);
template &lt;class charT, class Allocator, template &lt;class charT, class Allocator,
class traits&gt; class traits&gt;
bool regex_search(const charT* str, bool <A href="#f5">regex_search</A>(const charT* str,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default); <a href="match_flag_type.html">match_flag_type</a> flags = match_default);
template&lt;class ST, class SA, template&lt;class ST, class SA,
class Allocator, class charT, class Allocator, class charT,
class traits&gt; class traits&gt;
bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool <A href="#f6">regex_search</A>(const basic_string&lt;charT, ST, SA&gt;&amp; s,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default); <a href="match_flag_type.html">match_flag_type</a> flags = match_default);
</PRE> </PRE>
<H3><A name="description"></A>Description</H3> <H3><A name="description"></A>Description</H3>
<PRE>template &lt;class BidirectionalIterator, class Allocator, class charT, <PRE><A name=f1></A>template &lt;class BidirectionalIterator, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_search(BidirectionalIterator first, BidirectionalIterator last, bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
<a href="match_results.html">match_results</a>&lt;BidirectionalIterator, Allocator&gt;&amp; m, <a href="match_results.html">match_results</a>&lt;BidirectionalIterator, Allocator&gt;&amp; m,
@ -234,13 +234,13 @@ bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
</TD></TR></TABLE> </TD></TR></TABLE>
</CENTER> </CENTER>
</DIV> </DIV>
<PRE>template &lt;class charT, class Allocator, class traits, class Allocator2&gt; <PRE><A name=f2></A>template &lt;class charT, class Allocator, class traits, class Allocator2&gt;
bool regex_search(const charT* str, <a href="match_results.html">match_results</a>&lt;const charT*, Allocator&gt;&amp; m, bool regex_search(const charT* str, <a href="match_results.html">match_results</a>&lt;const charT*, Allocator&gt;&amp; m,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator2&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator2&gt;&amp; e,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE> <a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
<P><B> Effects:</B> Returns the result of <CODE>regex_search(str, str + <P><B> Effects:</B> Returns the result of <CODE>regex_search(str, str +
char_traits&lt;charT&gt;::length(str), m, e, flags)</CODE>.</P> char_traits&lt;charT&gt;::length(str), m, e, flags)</CODE>.</P>
<PRE>template &lt;class ST, class SA, class Allocator, class charT, <PRE><A name=f3></A>template &lt;class ST, class SA, class Allocator, class charT,
class traits, class Allocator2&gt; class traits, class Allocator2&gt;
bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
<a href="match_results.html">match_results</a>&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator, Allocator&gt;&amp; m, <a href="match_results.html">match_results</a>&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator, Allocator&gt;&amp; m,
@ -248,7 +248,7 @@ bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE> <a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
<P><B> Effects:</B> Returns the result of <CODE>regex_search(s.begin(), s.end(), m, <P><B> Effects:</B> Returns the result of <CODE>regex_search(s.begin(), s.end(), m,
e, flags)</CODE>.</P> e, flags)</CODE>.</P>
<PRE>template &lt;class iterator, class Allocator, class charT, <PRE><A name=f4></A>template &lt;class iterator, class Allocator, class charT,
class traits&gt; class traits&gt;
bool regex_search(iterator first, iterator last, bool regex_search(iterator first, iterator last,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e,
@ -256,13 +256,13 @@ bool regex_search(iterator first, iterator last,
<P><B> Effects:</B> Behaves "as if" by constructing an instance of <CODE><a href="match_results.html"> <P><B> Effects:</B> Behaves "as if" by constructing an instance of <CODE><a href="match_results.html">
match_results</a>&lt;</CODE>BidirectionalIterator<CODE>&gt; what</CODE>, match_results</a>&lt;</CODE>BidirectionalIterator<CODE>&gt; what</CODE>,
and then returning the result of <CODE>regex_search(first, last, what, e, flags)</CODE>.</P> and then returning the result of <CODE>regex_search(first, last, what, e, flags)</CODE>.</P>
<PRE>template &lt;class charT, class Allocator, class traits&gt; <PRE><A name=f5></A>template &lt;class charT, class Allocator, class traits&gt;
bool regex_search(const charT* str bool regex_search(const charT* str
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e,
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE> <a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
<P><B> Effects:</B> Returns the result of <CODE>regex_search(str, str + <P><B> Effects:</B> Returns the result of <CODE>regex_search(str, str +
char_traits&lt;charT&gt;::length(str), e, flags)</CODE>.</P> char_traits&lt;charT&gt;::length(str), e, flags)</CODE>.</P>
<PRE>template &lt;class ST, class SA, class Allocator, class charT, <PRE><A name=f6></A>template &lt;class ST, class SA, class Allocator, class charT,
class traits&gt; class traits&gt;
bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s, bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e, const <a href="basic_regex.html">basic_regex</a>&lt;charT, traits, Allocator&gt;&amp; e,

View File

@ -45,35 +45,35 @@ template &lt;class BidirectionalIterator,
class regex_token_iterator class regex_token_iterator
{ {
public: public:
typedef basic_regex&lt;charT, traits, Allocator&gt; regex_type; typedef <A href="basic_regex.html">basic_regex</A>&lt;charT, traits, Allocator&gt; regex_type;
typedef basic_string&lt;charT&gt; value_type; typedef basic_string&lt;charT&gt; value_type;
typedef typename iterator_traits&lt;BidirectionalIterator&gt;::difference_type difference_type; typedef typename iterator_traits&lt;BidirectionalIterator&gt;::difference_type difference_type;
typedef const value_type* pointer; typedef const value_type* pointer;
typedef const value_type&amp; reference; typedef const value_type&amp; reference;
typedef std::forward_iterator_tag iterator_category; typedef std::forward_iterator_tag iterator_category;
regex_token_iterator(); <A href="#c1">regex_token_iterator</A>();
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re, <A href="#c2">regex_token_iterator</A>(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re,
int submatch = 0, match_flag_type m = match_default); int submatch = 0, <A href="match_flag_type.html">match_flag_type</A> m = match_default);
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re, <A href="#c3">regex_token_iterator</A>(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re,
const std::vector&lt;int&gt;&amp; submatches, match_flag_type m = match_default); const std::vector&lt;int&gt;&amp; submatches, match_flag_type m = match_default);
template &lt;std::size_t N&gt; template &lt;std::size_t N&gt;
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re, <A href="#c4">regex_token_iterator</A>(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re,
const int (&amp;submatches)[N], match_flag_type m = match_default); const int (&amp;submatches)[N], match_flag_type m = match_default);
regex_token_iterator(const regex_token_iterator&amp;); <A href="#c5">regex_token_iterator</A>(const regex_token_iterator&amp;);
regex_token_iterator&amp; operator=(const regex_token_iterator&amp;); regex_token_iterator&amp; <A href="#o1">operator</A>=(const regex_token_iterator&amp;);
bool operator==(const regex_token_iterator&amp;); bool <A href="#o2">operator</A>==(const regex_token_iterator&amp;)const;
bool operator!=(const regex_token_iterator&amp;); bool <A href="#o3">operator</A>!=(const regex_token_iterator&amp;)const;
const value_type&amp; operator*(); const value_type&amp; <A href="#o4">operator</A>*()const;
const value_type* operator-&gt;(); const value_type* <A href="#o5">operator</A>-&gt;()const;
regex_token_iterator&amp; operator++(); regex_token_iterator&amp; <A href="#o6">operator</A>++();
regex_token_iterator operator++(int); regex_token_iterator <A href="#o7">operator</A>++(int);
}; };
</PRE> </PRE>
<H3><A name="description"></A>Description</H3> <H3><A name="description"></A>Description</H3>
<PRE>regex_token_iterator();</PRE> <PRE><A name=c1></A>regex_token_iterator();</PRE>
<P><B> Effects:</B> constructs an end of sequence iterator.</P> <P><B> Effects:</B> constructs an end of sequence iterator.</P>
<PRE>regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re, <PRE><A name=c2></A>regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re,
int submatch = 0, match_flag_type m = match_default);</PRE> int submatch = 0, match_flag_type m = match_default);</PRE>
<P><B> Preconditions: </B><CODE>!re.empty()</CODE>.</P> <P><B> Preconditions: </B><CODE>!re.empty()</CODE>.</P>
<P><B> Effects:</B> constructs a regex_token_iterator that will enumerate one <P><B> Effects:</B> constructs a regex_token_iterator that will enumerate one
@ -88,7 +88,7 @@ public:
Boost.regex is <A href="configuration.html">configured</A> in recursive mode), Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html"> or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
<PRE>regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re, <PRE><A name=c3></A>regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re,
const std::vector&lt;int&gt;&amp; submatches, match_flag_type m = match_default);</PRE> const std::vector&lt;int&gt;&amp; submatches, match_flag_type m = match_default);</PRE>
<P><B> Preconditions:</B> <CODE>submatches.size() &amp;&amp; !re.empty()</CODE>.</P> <P><B> Preconditions:</B> <CODE>submatches.size() &amp;&amp; !re.empty()</CODE>.</P>
<P><B> Effects:</B> constructs a regex_token_iterator that will enumerate <EM>submatches.size()</EM> <P><B> Effects:</B> constructs a regex_token_iterator that will enumerate <EM>submatches.size()</EM>
@ -106,7 +106,7 @@ public:
Boost.regex is <A href="configuration.html">configured</A> in recursive mode), Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html"> or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
<PRE>template &lt;std::size_t N&gt; <PRE><A name=c4></A>template &lt;std::size_t N&gt;
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re, regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&amp; re,
const int (&amp;submatches)[R], match_flag_type m = match_default);</PRE> const int (&amp;submatches)[R], match_flag_type m = match_default);</PRE>
<P><B> Preconditions: </B><CODE>!re.empty()</CODE>.</P> <P><B> Preconditions: </B><CODE>!re.empty()</CODE>.</P>
@ -126,25 +126,25 @@ regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const reg
Boost.regex is <A href="configuration.html">configured</A> in recursive mode), Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html"> or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
<PRE>regex_token_iterator(const regex_token_iterator&amp; that);</PRE> <PRE><A name=c5></A>regex_token_iterator(const regex_token_iterator&amp; that);</PRE>
<P><B> Effects: </B>constructs a copy of <CODE>that</CODE>.</P> <P><B> Effects: </B>constructs a copy of <CODE>that</CODE>.</P>
<P><B> Postconditions:</B> <CODE>*this == that</CODE>.</P> <P><B> Postconditions:</B> <CODE>*this == that</CODE>.</P>
<PRE>regex_token_iterator&amp; operator=(const regex_token_iterator&amp; that);</PRE> <PRE><A name=o1></A>regex_token_iterator&amp; operator=(const regex_token_iterator&amp; that);</PRE>
<P><B> Effects: </B>sets <CODE>*this</CODE> to be equal to&nbsp;<CODE>that</CODE>.</P> <P><B> Effects: </B>sets <CODE>*this</CODE> to be equal to&nbsp;<CODE>that</CODE>.</P>
<P><B> Postconditions:</B> <CODE>*this == that</CODE>.</P> <P><B> Postconditions:</B> <CODE>*this == that</CODE>.</P>
<PRE>bool operator==(const regex_token_iterator&amp;);</PRE> <PRE><A name=o2></A>bool operator==(const regex_token_iterator&amp;)const;</PRE>
<P> <P>
<B>Effects: </B>returns true if *this is the same position as that.</P> <B>Effects: </B>returns true if *this is the same position as that.</P>
<PRE>bool operator!=(const regex_token_iterator&amp;);</PRE> <PRE><A name=o3></A>bool operator!=(const regex_token_iterator&amp;)const;</PRE>
<P> <P>
<B>Effects: </B>returns <CODE>!(*this == that)</CODE>.</P> <B>Effects: </B>returns <CODE>!(*this == that)</CODE>.</P>
<PRE>const value_type&amp; operator*();</PRE> <PRE><A name=o4></A>const value_type&amp; operator*()const;</PRE>
<P> <P>
<B>Effects: </B>returns the current string being enumerated.</P> <B>Effects: </B>returns the current string being enumerated.</P>
<PRE>const value_type* operator-&gt;();</PRE> <PRE><A name=o5></A>const value_type* operator-&gt;()const;</PRE>
<P> <P>
<B>Effects: </B>returns <CODE>&amp;(*this)</CODE>.</P> <B>Effects: </B>returns <CODE>&amp;(*this)</CODE>.</P>
<PRE>regex_token_iterator&amp; operator++();</PRE> <PRE><A name=o6></A>regex_token_iterator&amp; operator++();</PRE>
<P> <P>
<B>Effects: </B>Moves on to the next string to be enumerated.</P> <B>Effects: </B>Moves on to the next string to be enumerated.</P>
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of <P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
@ -155,7 +155,7 @@ regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const reg
configured</A> in non-recursive mode).</P> configured</A> in non-recursive mode).</P>
<B> <B>
<P> <P>
Returns:</B><CODE> *this</CODE>.</P><PRE>regex_token_iterator&amp; operator++(int);</PRE> Returns:</B><CODE> *this</CODE>.</P><PRE><A name=o7></A>regex_token_iterator&amp; operator++(int);</PRE>
<P><B> Effects:</B> constructs a copy <CODE>result</CODE> of <CODE>*this</CODE>, <P><B> Effects:</B> constructs a copy <CODE>result</CODE> of <CODE>*this</CODE>,
then calls <CODE>++(*this)</CODE>.</P> then calls <CODE>++(*this)</CODE>.</P>
<P><B> Returns:</B> <CODE>result</CODE>.<A name="examples"></A> <P><B> Returns:</B> <CODE>result</CODE>.<A name="examples"></A>

View File

@ -38,6 +38,9 @@
<P>Objects of type <EM>sub_match</EM> may only obtained by subscripting an object <P>Objects of type <EM>sub_match</EM> may only obtained by subscripting an object
of type <EM><A href="match_results.html">match_results</A></EM> of type <EM><A href="match_results.html">match_results</A></EM>
. .
<P>Objects of type <EM>sub_match</EM> may be compared to objects of type <EM>std::basic_string</EM>,
or <EM>const charT*</EM> or <EM>const charT</EM>
.
<P>When the marked sub-expression denoted by an object of type sub_match&lt;&gt; <P>When the marked sub-expression denoted by an object of type sub_match&lt;&gt;
participated in a regular expression match then member <CODE>matched</CODE> evaluates participated in a regular expression match then member <CODE>matched</CODE> evaluates
to true, and members <CODE>first</CODE> and <CODE>second</CODE> denote the to true, and members <CODE>first</CODE> and <CODE>second</CODE> denote the
@ -61,154 +64,197 @@ public:
typedef typename iterator_traits&lt;BidirectionalIterator&gt;::difference_type difference_type; typedef typename iterator_traits&lt;BidirectionalIterator&gt;::difference_type difference_type;
typedef BidirectionalIterator iterator; typedef BidirectionalIterator iterator;
bool matched; bool <A href="#m1">matched</A>;
difference_type length()const; difference_type <A href="#m2">length</A>()const;
operator basic_string&lt;value_type&gt;()const; operator <A href="#m3">basic_string</A>&lt;value_type&gt;()const;
basic_string&lt;value_type&gt; str()const; basic_string&lt;value_type&gt; <A href="#m4">str</A>()const;
int compare(const sub_match&amp; s)const; int <A href="#m5">compare</A>(const sub_match&amp; s)const;
int compare(const basic_string&lt;value_type&gt;&amp; s)const; int <A href="#m6">compare</A>(const basic_string&lt;value_type&gt;&amp; s)const;
int compare(const value_type* s)const; int <A href="#m7">compare</A>(const value_type* s)const;
}; };
//
// comparisons to another sub_match:
//
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o11">operator</A> == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o12">operator</A> != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o13">operator</A> &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o14">operator</A> &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o15">operator</A> &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o16">operator</A> &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
//
// comparisons to a basic_string:
//
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator == (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs, bool <A href="#o21">operator</A> == (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator != (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs, bool <A href="#o22">operator</A> != (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt; (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs, bool <A href="#o23">operator</A> &lt; (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt; (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs, bool <A href="#o24">operator</A> &gt; (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt;= (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs, bool <A href="#o25">operator</A> &gt;= (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt;= (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs, bool <A href="#o26">operator</A> &lt;= (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o31">operator</A> == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs); const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o32">operator</A> != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs); const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o33">operator</A> &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs); const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o34">operator</A> &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs); const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o35">operator</A> &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs); const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);
template &lt;class BidirectionalIterator, class traits, class Allocator&gt; template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o36">operator</A> &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs); const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);
//
// comparisons to a pointer to a character array:
//
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool <A href="#o41">operator</A> == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool <A href="#o42">operator</A> != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool <A href="#o43">operator</A> &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool <A href="#o44">operator</A> &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool <A href="#o45">operator</A> &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool <A href="#o46">operator</A> &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o51">operator</A> == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o52">operator</A> != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o53">operator</A> &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o54">operator</A> &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o55">operator</A> &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o56">operator</A> &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs);
//
// comparisons to a single character:
//
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool <A href="#o61">operator</A> == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool <A href="#o62">operator</A> != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool <A href="#o63">operator</A> &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool <A href="#o64">operator</A> &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool <A href="#o65">operator</A> &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool <A href="#o66">operator</A> &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o71">operator</A> == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o72">operator</A> != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o73">operator</A> &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o74">operator</A> &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o75">operator</A> &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs);
template &lt;class BidirectionalIterator&gt; template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool <A href="#o76">operator</A> &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs);
//
// addition operators:
//
template &lt;class RandomAccessIterator, class traits, class Allocator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;
<A href="#o81">operator</A> + (const std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;&amp; s,
const sub_match&lt;RandomAccessIterator&gt;&amp; m);
template &lt;class RandomAccessIterator, class traits, class Allocator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;
<A href="#o82">operator</A> + (const sub_match&lt;RandomAccessIterator&gt;&amp; m,
const std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;&amp; s);
template &lt;class RandomAccessIterator&gt; std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
<A href="#o83">operator</A> + (typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const* s,
const sub_match&lt;RandomAccessIterator&gt;&amp; m);
template &lt;class RandomAccessIterator&gt; std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
<A href="#o84">operator</A> + (const sub_match&lt;RandomAccessIterator&gt;&amp; m,
typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const * s);
template &lt;class RandomAccessIterator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
<A href="#o85">operator</A> + (typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const&amp; s,
const sub_match&lt;RandomAccessIterator&gt;&amp; m);
template &lt;class RandomAccessIterator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
<A href="#o86">operator</A> + (const sub_match&lt;RandomAccessIterator&gt;&amp; m,
typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const&amp; s);
template &lt;class RandomAccessIterator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
<A href="#o87">operator</A> + (const sub_match&lt;RandomAccessIterator&gt;&amp; m1,
const sub_match&lt;RandomAccessIterator&gt;&amp; m2);
//
// stream inserter:
//
template &lt;class charT, class traits, class BidirectionalIterator&gt; template &lt;class charT, class traits, class BidirectionalIterator&gt;
basic_ostream&lt;charT, traits&gt;&amp; basic_ostream&lt;charT, traits&gt;&amp;
operator &lt;&lt; (basic_ostream&lt;charT, traits&gt;&amp; os, <A href="#oi">operator</A> &lt;&lt; (basic_ostream&lt;charT, traits&gt;&amp; os,
const sub_match&lt;BidirectionalIterator&gt;&amp; m); const sub_match&lt;BidirectionalIterator&gt;&amp; m);
} // namespace boost</PRE> } // namespace boost</PRE>
@ -225,188 +271,278 @@ basic_ostream&lt;charT, traits&gt;&amp;
<P>An iterator denoting the position of the start of the match.</P> <P>An iterator denoting the position of the start of the match.</P>
<PRE>iterator second</PRE> <PRE>iterator second</PRE>
<P>An iterator denoting the position of the end of the match.</P> <P>An iterator denoting the position of the end of the match.</P>
<PRE>bool matched</PRE> <PRE><A name=m1></A>bool matched</PRE>
<P>A Boolean value denoting whether this sub-expression participated in the match.</P> <P>A Boolean value denoting whether this sub-expression participated in the match.</P>
<PRE>static difference_type length();</PRE> <PRE><A name=m2></A>static difference_type length();</PRE>
<P>
<P> <B> <B>Effects: </B>returns the length of this matched sub-expression, or 0 if this
Effects: </B>returns <CODE>(matched ? 0 : distance(first, second))</CODE>.</P><PRE>operator basic_string&lt;value_type&gt;()const;</PRE> sub-expression was not matched: <CODE>matched ? distance(first, second) : 0)</CODE>.</P>
<PRE><A name=m3></A>operator basic_string&lt;value_type&gt;()const;</PRE>
<P> <B> <P>
Effects: </B>returns <CODE>(matched ? basic_string&lt;value_type&gt;(first, <B>Effects: </B>converts *this into a string: returns <CODE>(matched ?
second) : basic_string&lt;value_type&gt;()).</P></CODE><PRE>basic_string&lt;value_type&gt; str()const;</PRE> basic_string&lt;value_type&gt;(first, second) :
basic_string&lt;value_type&gt;()).</P>
<P><B> </CODE><PRE><A name=m4></A>basic_string&lt;value_type&gt; str()const;</PRE>
Effects: </B>returns <CODE>(matched ? basic_string&lt;value_type&gt;(first, <P><B> Effects: </B>returns a string representation of *this:&nbsp; <CODE>(matched ?
second) : basic_string&lt;value_type&gt;())</CODE>.</P><PRE>int compare(const sub_match&amp; s)const;</PRE> basic_string&lt;value_type&gt;(first, second) :
basic_string&lt;value_type&gt;())</CODE>.</P>
<P> <B> <PRE><A name=m5></A>int compare(const sub_match&amp; s)const;</PRE>
Effects: </B>returns <CODE>str().compare(s.str())</CODE>.</P><PRE>int compare(const basic_string&lt;value_type&gt;&amp; s)const;</PRE> <P>
<B>Effects: </B>performs a lexical comparison to <EM>s</EM>: returns <CODE>str().compare(s.str())</CODE>.</P>
<P><B> <PRE><A name=m6></A>int compare(const basic_string&lt;value_type&gt;&amp; s)const;</PRE>
Effects: </B>returns <CODE>str().compare(s)</CODE>.</P><PRE>int compare(const value_type* s)const;</PRE> <P><B> Effects: </B>compares *this to the string s: returns <CODE>str().compare(s)</CODE>.</P>
<PRE><A name=m7></A>int compare(const value_type* s)const;</PRE>
<P> <B> <P>
Effects: </B>returns <CODE>str().compare(s)</CODE>.</P> <B>Effects:<B></B> </B>compares *this to the null-terminated string <EM>s</EM>:<B>&nbsp;</B>returns
<CODE>str().compare(s)</CODE>.</P>
<H4> <H4>
sub_match non-member operators</H4> sub_match non-member operators</H4>
<PRE>template &lt;class BidirectionalIterator&gt; <H5>Comparisons against self</H5>
<PRE><A name=o11></A>template &lt;class BidirectionalIterator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.compare(rhs) == 0</CODE>.</P>
Effects: </B>returns <CODE>lhs.compare(rhs) == 0</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o12></A>template &lt;class BidirectionalIterator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.compare(rhs) != 0</CODE>.</P>
Effects: </B>returns <CODE>lhs.compare(rhs) != 0</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o13></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.compare(rhs) &lt; 0</CODE>.</P>
Effects: </B>returns <CODE>lhs.compare(rhs) &lt; 0</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o14></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P><B> Effects: </B>returns <CODE>lhs.compare(rhs) &lt;= 0</CODE>.</P>
<P><B> <PRE><A name=o15></A>template &lt;class BidirectionalIterator&gt;
Effects: </B>returns <CODE>lhs.compare(rhs) &lt;= 0</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.compare(rhs) &gt;= 0</CODE>.</P>
Effects: </B>returns <CODE>lhs.compare(rhs) &gt;= 0</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o16></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.compare(rhs) &gt; 0</CODE>.</P>
Effects: </B>returns <CODE>lhs.compare(rhs) &gt; 0</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <H5>Comparisons with std::basic_string</H5>
<pre><A name=o21></A>
template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator == (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits,
Allocator&gt;&amp; lhs, const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);
</pre>
<P><B>Effects: </B>returns <CODE>lhs == rhs.str()</CODE>.</P>
<PRE><A name=o22></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator != (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs != rhs.str()</CODE>.</P>
<PRE><A name=o23></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt; (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs&nbsp;&lt; rhs.str()</CODE>.</P>
<PRE><A name=o24></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt; (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs&nbsp;&gt; rhs.str()</CODE>.</P>
<PRE><A name=o25></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt;= (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs &gt;= rhs.str()</CODE>.</P>
<PRE><A name=o26></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt;= (const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs &lt;= rhs.str()</CODE>.</P>
<PRE><A name=o31></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs.str() == rhs</CODE>.</P>
<PRE><A name=o32></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs.str() != rhs</CODE>.</P>
<PRE><A name=o33></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs.str()&nbsp;&lt; rhs</CODE>.</P>
<PRE><A name=o34></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs.str()&nbsp;&gt; rhs</CODE>.</P>
<PRE><A name=o35></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs.str() &gt;= rhs</CODE>.</P>
<PRE><A name=o36></A>template &lt;class BidirectionalIterator, class traits, class Allocator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
const std::basic_string&lt;iterator_traits&lt;BidirectionalIterator&gt;::value_type, traits, Allocator&gt;&amp; rhs);</PRE>
<P><B>Effects: </B>returns <CODE>lhs.str() &lt;= rhs</CODE>.</P>
<H5>Comparisons with null-terminated strings</H5>
<PRE><A name=o41></A>template &lt;class BidirectionalIterator&gt;
bool operator == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool operator == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs == rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs == rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o42></A>template &lt;class BidirectionalIterator&gt;
bool operator != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool operator != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs != rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs != rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE></A><A name=o43></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool operator &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &lt; rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &lt; rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o44></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool operator &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &gt; rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &gt; rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o45></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool operator &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &gt;= rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &gt;= rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o46></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs, bool operator &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &lt;= rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &lt;= rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o51></A>template &lt;class BidirectionalIterator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() == rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() == rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o52></A>template &lt;class BidirectionalIterator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() != rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() != rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o53></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &lt; rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &lt; rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o54></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &gt; rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &gt; rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o55></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &gt;= rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &gt;= rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o56></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const* rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &lt;= rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &lt;= rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <H5>Comparisons with a single character</H5>
<PRE><A name=o61></A>template &lt;class BidirectionalIterator&gt;
bool operator == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool operator == (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs == rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs == rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o62></A>template &lt;class BidirectionalIterator&gt;
bool operator != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool operator != (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs != rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs != rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o63></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool operator &lt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &lt; rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &lt; rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o64></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool operator &gt; (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &gt; rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &gt; rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o65></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool operator &gt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &gt;= rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &gt;= rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o66></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs, bool operator &lt;= (typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; lhs,
const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs &lt;= rhs.str()</CODE>.</P>
Effects: </B>returns <CODE>lhs &lt;= rhs.str()</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o71></A>template &lt;class BidirectionalIterator&gt;
bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator == (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() == rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() == rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o72></A>template &lt;class BidirectionalIterator&gt;
bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator != (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() != rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() != rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o73></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &lt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &lt; rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &lt; rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o74></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &gt; (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &gt; rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &gt; rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o75></A>template &lt;class BidirectionalIterator&gt;
bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &gt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &gt;= rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &gt;= rhs</CODE>.</P><PRE>template &lt;class BidirectionalIterator&gt; <PRE><A name=o76></A>template &lt;class BidirectionalIterator&gt;
bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs, bool operator &lt;= (const sub_match&lt;BidirectionalIterator&gt;&amp; lhs,
typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE> typename iterator_traits&lt;BidirectionalIterator&gt;::value_type const&amp; rhs); </PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>lhs.str() &lt;= rhs</CODE>.</P>
Effects: </B>returns <CODE>lhs.str() &lt;= rhs</CODE>.</P><PRE>template &lt;class charT, class traits, class BidirectionalIterator&gt; <h5>Addition operators</h5>
<P>The addition operators for sub_match allow you to add a sub_match to any type
to which you can add a std::string and obtain a new string as the result.</P>
<PRE><A name=o81></A>template &lt;class RandomAccessIterator, class traits, class Allocator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;
operator + (const std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;&amp; s,
const sub_match&lt;RandomAccessIterator&gt;&amp; m); </PRE>
<P><B>Effects: </B>returns <CODE>s + m.str()</CODE>.</P>
<PRE><A name=o82></A>template &lt;class RandomAccessIterator, class traits, class Allocator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;
operator + (const sub_match&lt;RandomAccessIterator&gt;&amp; m,
const std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type, traits, Allocator&gt;&amp; s); </PRE>
<P><B>Effects: </B>returns <CODE>m.str() + s</CODE>.</P>
<PRE><A name=o83></A>template &lt;class RandomAccessIterator&gt; std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
operator + (typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const* s,
const sub_match&lt;RandomAccessIterator&gt;&amp; m); </PRE>
<P><B>Effects: </B>returns <CODE>s + m.str()</CODE>.</P>
<PRE><A name=o84></A>template &lt;class RandomAccessIterator&gt; std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
operator + (const sub_match&lt;RandomAccessIterator&gt;&amp; m,
typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const * s);</PRE>
<P><B>Effects: </B>returns <CODE>m.str() + s</CODE>.</P>
<PRE><A name=o85></A>template &lt;class RandomAccessIterator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
operator + (typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const&amp; s,
const sub_match&lt;RandomAccessIterator&gt;&amp; m); </PRE>
<P><B>Effects: </B>returns <CODE>s + m.str()</CODE>.</P>
<PRE><A name=o86></A>template &lt;class RandomAccessIterator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
operator + (const sub_match&lt;RandomAccessIterator&gt;&amp; m,
typename iterator_traits&lt;RandomAccessIterator&gt;::value_type const&amp; s); </PRE>
<P><B>Effects: </B>returns <CODE>m.str() + s</CODE>.</P>
<PRE><A name=o87></A>template &lt;class RandomAccessIterator&gt;
std::basic_string&lt;typename iterator_traits&lt;RandomAccessIterator&gt;::value_type&gt;
operator + (const sub_match&lt;RandomAccessIterator&gt;&amp; m1,
const sub_match&lt;RandomAccessIterator&gt;&amp; m2);</PRE>
<P><B>Effects: </B>returns&nbsp;<CODE>m1.str() + m2.str()</CODE>.</P>
<h5>Stream inserter</h5>
<PRE><A name=oi></A>template &lt;class charT, class traits, class BidirectionalIterator&gt;
basic_ostream&lt;charT, traits&gt;&amp; basic_ostream&lt;charT, traits&gt;&amp;
operator &lt;&lt; (basic_ostream&lt;charT, traits&gt;&amp; os operator &lt;&lt; (basic_ostream&lt;charT, traits&gt;&amp; os
const sub_match&lt;BidirectionalIterator&gt;&amp; m);</PRE> const sub_match&lt;BidirectionalIterator&gt;&amp; m);</PRE>
<P>
<P> <B> <B>Effects: </B>returns <CODE>(os &lt;&lt; m.str())</CODE>.
Effects: </B>returns <CODE>(os &lt;&lt; m.str())</CODE>.
<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 -->
@ -422,5 +558,3 @@ basic_ostream&lt;charT, traits&gt;&amp;
for any purpose. It is provided "as is" without express or implied warranty.</I></P> for any purpose. It is provided "as is" without express or implied warranty.</I></P>
</body> </body>
</html> </html>

View File

@ -23,6 +23,11 @@
</TABLE> </TABLE>
</P> </P>
<HR> <HR>
<P>The regex library is thread safe when Boost is: you can verify that Boost is in
thread safe mode by checking to see if BOOST_HAS_THREADS is defined: this macro
is set automatically by the config system when threading support is turned on
in your compiler.
</P>
<P>Class <A href="basic_regex.html">basic_regex</A>&lt;&gt; and its typedefs regex <P>Class <A href="basic_regex.html">basic_regex</A>&lt;&gt; and its typedefs regex
and wregex are thread safe, in that compiled regular expressions can safely be and wregex are thread safe, in that compiled regular expressions can safely be
shared between threads. The matching algorithms <A href="regex_match.html">regex_match</A>, shared between threads. The matching algorithms <A href="regex_match.html">regex_match</A>,
@ -65,4 +70,3 @@
for any purpose. It is provided "as is" without express or implied warranty.</I></P> for any purpose. It is provided "as is" without express or implied warranty.</I></P>
</body> </body>
</html> </html>