mirror of
https://github.com/boostorg/regex.git
synced 2025-06-25 20:01:37 +02:00
Compare commits
4 Commits
svn-branch
...
boost-1.33
Author | SHA1 | Date | |
---|---|---|---|
f47ebdae3f | |||
fc31643254 | |||
3ee662fa1a | |||
c58c45e55b |
@ -672,24 +672,25 @@ template <class ST, class SA>
|
||||
basic_regex& operator=(const basic_string<charT, ST, SA>& p);
|
||||
</pre>
|
||||
<p><b>Effects:</b> Returns the result of <code>assign(p)</code>.</p>
|
||||
|
||||
<h4>basic_regex iterators</h4>
|
||||
<pre>
|
||||
<pre><A name=m1>
|
||||
const_iterator begin() const;
|
||||
</pre>
|
||||
<p><b>Effects:</b> Returns a starting iterator to a sequence of characters
|
||||
representing the regular expression.</p>
|
||||
<pre>
|
||||
<pre><A name=m2>
|
||||
const_iterator end() const;
|
||||
</pre>
|
||||
<p><b>Effects:</b> Returns termination iterator to a sequence of characters
|
||||
representing the regular expression.</p>
|
||||
<h4>basic_regex capacity</h4>
|
||||
<pre>
|
||||
<pre><A name=m3>
|
||||
size_type size() const;
|
||||
</pre>
|
||||
<p><b>Effects:</b> Returns the length of the sequence of characters representing
|
||||
the regular expression.</p>
|
||||
<pre>
|
||||
<pre><A name=m4>
|
||||
size_type max_size() const;
|
||||
</pre>
|
||||
<p><b>Effects:</b> Returns the maximum length of the sequence of characters
|
||||
@ -818,7 +819,7 @@ locale_type getloc() const;
|
||||
traits_inst</code> is a (default initialized) instance of the template
|
||||
parameter <code>traits</code> stored within the object.</p>
|
||||
<h4>basic_regex swap</h4>
|
||||
<pre>
|
||||
<pre><A name=m13>
|
||||
void swap(basic_regex& e) throw();
|
||||
</pre>
|
||||
<p><b>Effects:</b> Swaps the contents of the two regular expressions.</p>
|
||||
|
@ -53,7 +53,7 @@
|
||||
spot any bugs, please get in touch.</P>
|
||||
<P>Useful further information can be found at:</P>
|
||||
<P>Short tutorials on regular expressions can be <A href="http://etext.lib.virginia.edu/helpsheets/regex.html">
|
||||
found here</A> and <A href="http://www.devshed.com/Server_Side/Administration/RegExp/page1.html">here</A>.</P>
|
||||
found here</A> and <A href="http://www.linuxpcug.org/lessons/regexp.html">here</A>.</P>
|
||||
<P>The main book on regular expressions is <A href="http://www.oreilly.com/catalog/regex/">
|
||||
Mastering Regular Expressions, published by O'Reilly</A>.</P>
|
||||
<P>Information on the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
|
||||
|
@ -377,7 +377,7 @@ string_type format(const string_type& fmt,
|
||||
ECMAScript Language Specification, Chapter 15 part 5.4.11
|
||||
String.prototype.replace.</p>
|
||||
<H4>Allocator access</H4>
|
||||
<pre>allocator_type get_allocator()const;
|
||||
<pre><A name=m14>allocator_type get_allocator()const;
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a copy of the Allocator that was passed to the object's
|
||||
|
@ -94,14 +94,14 @@
|
||||
<td> </td>
|
||||
<td valign="top" width="50%">flags</td>
|
||||
<td valign="top" width="50%">The flags that determine how matching is carried out,
|
||||
one of the <a href="#match_type">match_flags</a> enumerators.</td>
|
||||
one of the <a href="match_flag_type.html">match_flags</a> enumerators.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<p>The algorithm finds all of the non-overlapping matches of the expression e, for
|
||||
each match it fills a <a href="#reg_match">match_results</a><iterator>
|
||||
each match it fills a <a href="match_results.html">match_results</a><iterator>
|
||||
structure, which contains information on what matched, and calls the predicate
|
||||
foo, passing the match_results<iterator> as a single argument. If the
|
||||
predicate returns true, then the grep operation continues, otherwise it
|
||||
|
@ -324,7 +324,7 @@ ST, SA>::const_iterator, charT, traits>
|
||||
</PRE>
|
||||
<P><STRONG>Effects:</STRONG> returns an iterator that enumerates all occurences of
|
||||
expression <EM>e</EM> in text <EM>p</EM> using match_flags <EM>m</EM>.</P>
|
||||
<h3>Examples</h3>
|
||||
<h3><a name=examples></a>Examples</h3>
|
||||
<p>The following <a href="../example/snippets/regex_iterator_example.cpp">example</a>
|
||||
takes a C++ source file and builds up an index of class names, and the location
|
||||
of that class in the file.</p>
|
||||
|
@ -160,7 +160,7 @@ aaaa</PRE>
|
||||
<P>When there is more that one way to match a regular expression, the "best"
|
||||
possible match is obtained using the <A href="syntax_leftmost_longest.html">leftmost-longest
|
||||
rule</A>.</P>
|
||||
<H3>Variations</H3>
|
||||
<H3><A name="variations"></A>Variations</H3>
|
||||
<H4><A name="grep"></A>Grep</H4>
|
||||
<P>When an expression is compiled with the flag <EM>grep</EM> set, then the
|
||||
expression is treated as a newline separated list of <A href="#Basic">POSIX-Basic</A>
|
||||
@ -213,7 +213,7 @@ aaaa</PRE>
|
||||
all alter the syntax, while the <A href="syntax_option_type.html#basic">collate
|
||||
and icase</A> options modify how the case and locale sensitivity are to be
|
||||
applied.</P>
|
||||
<H3>References</H3>
|
||||
<H3><A name="refs"></A>References</H3>
|
||||
<P><A href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap09.html">IEEE
|
||||
Std 1003.1-2001, Portable Operating System Interface (POSIX ), Base Definitions
|
||||
and Headers, Section 9, Regular Expressions (FWD.1).</A></P>
|
||||
|
@ -593,7 +593,7 @@ aaaa</PRE>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<H3>Variations</H3>
|
||||
<H3><A name="variations"></A>Variations</H3>
|
||||
<P>The options <A href="syntax_option_type.html#perl"><EM>normal, ECMAScript, JavaScript</EM>
|
||||
and <EM>JScript</EM></A> are all synonyms for <EM>Perl</EM>.</P>
|
||||
<H3><A name="options"></A>Options</H3>
|
||||
@ -609,7 +609,7 @@ aaaa</PRE>
|
||||
no_mod_m, mod_x, mod_s, and no_mod_s</A></EM>.
|
||||
</P>
|
||||
<H3><A name="refs">References</H3>
|
||||
<P><A href="http://www.perldoc.com/perl5.6/pod/perlre.html"> Perl 5.6.</A></P>
|
||||
<P><A href="http://perldoc.perl.org/perlre.html"> Perl 5.8.</A></P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
|
@ -672,24 +672,25 @@ template <class ST, class SA>
|
||||
basic_regex& operator=(const basic_string<charT, ST, SA>& p);
|
||||
</pre>
|
||||
<p><b>Effects:</b> Returns the result of <code>assign(p)</code>.</p>
|
||||
|
||||
<h4>basic_regex iterators</h4>
|
||||
<pre>
|
||||
<pre><A name=m1>
|
||||
const_iterator begin() const;
|
||||
</pre>
|
||||
<p><b>Effects:</b> Returns a starting iterator to a sequence of characters
|
||||
representing the regular expression.</p>
|
||||
<pre>
|
||||
<pre><A name=m2>
|
||||
const_iterator end() const;
|
||||
</pre>
|
||||
<p><b>Effects:</b> Returns termination iterator to a sequence of characters
|
||||
representing the regular expression.</p>
|
||||
<h4>basic_regex capacity</h4>
|
||||
<pre>
|
||||
<pre><A name=m3>
|
||||
size_type size() const;
|
||||
</pre>
|
||||
<p><b>Effects:</b> Returns the length of the sequence of characters representing
|
||||
the regular expression.</p>
|
||||
<pre>
|
||||
<pre><A name=m4>
|
||||
size_type max_size() const;
|
||||
</pre>
|
||||
<p><b>Effects:</b> Returns the maximum length of the sequence of characters
|
||||
@ -818,7 +819,7 @@ locale_type getloc() const;
|
||||
traits_inst</code> is a (default initialized) instance of the template
|
||||
parameter <code>traits</code> stored within the object.</p>
|
||||
<h4>basic_regex swap</h4>
|
||||
<pre>
|
||||
<pre><A name=m13>
|
||||
void swap(basic_regex& e) throw();
|
||||
</pre>
|
||||
<p><b>Effects:</b> Swaps the contents of the two regular expressions.</p>
|
||||
|
@ -53,7 +53,7 @@
|
||||
spot any bugs, please get in touch.</P>
|
||||
<P>Useful further information can be found at:</P>
|
||||
<P>Short tutorials on regular expressions can be <A href="http://etext.lib.virginia.edu/helpsheets/regex.html">
|
||||
found here</A> and <A href="http://www.devshed.com/Server_Side/Administration/RegExp/page1.html">here</A>.</P>
|
||||
found here</A> and <A href="http://www.linuxpcug.org/lessons/regexp.html">here</A>.</P>
|
||||
<P>The main book on regular expressions is <A href="http://www.oreilly.com/catalog/regex/">
|
||||
Mastering Regular Expressions, published by O'Reilly</A>.</P>
|
||||
<P>Information on the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
|
||||
|
@ -54,7 +54,7 @@
|
||||
<h3>Comparison 1: Long Search</h3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within a long English language text was measured
|
||||
(<a href="ftp://ibiblio.org/pub/docs/books/gutenberg/etext02/mtent12.zip">mtent12.txt</a>
|
||||
(<a href="http://www.gutenberg.org/files/3200/old/mtent12.zip">mtent12.txt</a>
|
||||
from <a href="http://promo.net/pg/">Project Gutenberg</a>, 19Mb). </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
|
@ -377,7 +377,7 @@ string_type format(const string_type& fmt,
|
||||
ECMAScript Language Specification, Chapter 15 part 5.4.11
|
||||
String.prototype.replace.</p>
|
||||
<H4>Allocator access</H4>
|
||||
<pre>allocator_type get_allocator()const;
|
||||
<pre><A name=m14>allocator_type get_allocator()const;
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a copy of the Allocator that was passed to the object's
|
||||
|
@ -94,14 +94,14 @@
|
||||
<td> </td>
|
||||
<td valign="top" width="50%">flags</td>
|
||||
<td valign="top" width="50%">The flags that determine how matching is carried out,
|
||||
one of the <a href="#match_type">match_flags</a> enumerators.</td>
|
||||
one of the <a href="match_flag_type.html">match_flags</a> enumerators.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<p>The algorithm finds all of the non-overlapping matches of the expression e, for
|
||||
each match it fills a <a href="#reg_match">match_results</a><iterator>
|
||||
each match it fills a <a href="match_results.html">match_results</a><iterator>
|
||||
structure, which contains information on what matched, and calls the predicate
|
||||
foo, passing the match_results<iterator> as a single argument. If the
|
||||
predicate returns true, then the grep operation continues, otherwise it
|
||||
|
@ -324,7 +324,7 @@ ST, SA>::const_iterator, charT, traits>
|
||||
</PRE>
|
||||
<P><STRONG>Effects:</STRONG> returns an iterator that enumerates all occurences of
|
||||
expression <EM>e</EM> in text <EM>p</EM> using match_flags <EM>m</EM>.</P>
|
||||
<h3>Examples</h3>
|
||||
<h3><a name=examples></a>Examples</h3>
|
||||
<p>The following <a href="../example/snippets/regex_iterator_example.cpp">example</a>
|
||||
takes a C++ source file and builds up an index of class names, and the location
|
||||
of that class in the file.</p>
|
||||
|
@ -160,7 +160,7 @@ aaaa</PRE>
|
||||
<P>When there is more that one way to match a regular expression, the "best"
|
||||
possible match is obtained using the <A href="syntax_leftmost_longest.html">leftmost-longest
|
||||
rule</A>.</P>
|
||||
<H3>Variations</H3>
|
||||
<H3><A name="variations"></A>Variations</H3>
|
||||
<H4><A name="grep"></A>Grep</H4>
|
||||
<P>When an expression is compiled with the flag <EM>grep</EM> set, then the
|
||||
expression is treated as a newline separated list of <A href="#Basic">POSIX-Basic</A>
|
||||
@ -213,7 +213,7 @@ aaaa</PRE>
|
||||
all alter the syntax, while the <A href="syntax_option_type.html#basic">collate
|
||||
and icase</A> options modify how the case and locale sensitivity are to be
|
||||
applied.</P>
|
||||
<H3>References</H3>
|
||||
<H3><A name="refs"></A>References</H3>
|
||||
<P><A href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap09.html">IEEE
|
||||
Std 1003.1-2001, Portable Operating System Interface (POSIX ), Base Definitions
|
||||
and Headers, Section 9, Regular Expressions (FWD.1).</A></P>
|
||||
|
@ -593,7 +593,7 @@ aaaa</PRE>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<H3>Variations</H3>
|
||||
<H3><A name="variations"></A>Variations</H3>
|
||||
<P>The options <A href="syntax_option_type.html#perl"><EM>normal, ECMAScript, JavaScript</EM>
|
||||
and <EM>JScript</EM></A> are all synonyms for <EM>Perl</EM>.</P>
|
||||
<H3><A name="options"></A>Options</H3>
|
||||
@ -609,7 +609,7 @@ aaaa</PRE>
|
||||
no_mod_m, mod_x, mod_s, and no_mod_s</A></EM>.
|
||||
</P>
|
||||
<H3><A name="refs">References</H3>
|
||||
<P><A href="http://www.perldoc.com/perl5.6/pod/perlre.html"> Perl 5.6.</A></P>
|
||||
<P><A href="http://perldoc.perl.org/perlre.html"> Perl 5.8.</A></P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
|
@ -58,7 +58,7 @@
|
||||
<h3>Comparison 1: Long Search</h3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within a long English language text was measured
|
||||
(<a href="ftp://ibiblio.org/pub/docs/books/gutenberg/etext02/mtent12.zip">mtent12.txt</a>
|
||||
(<a href="http://www.gutenberg.org/files/3200/old/mtent12.zip">mtent12.txt</a>
|
||||
from <a href="http://promo.net/pg/">Project Gutenberg</a>, 19Mb). </p>
|
||||
<P><table border="1" cellspacing="1">
|
||||
<tr>
|
||||
|
@ -39,7 +39,7 @@
|
||||
<h3>Comparison 1: Long Search</h3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within a long English language text was measured
|
||||
(<a href="ftp://ibiblio.org/pub/docs/books/gutenberg/etext02/mtent12.zip">mtent12.txt</a>
|
||||
(<a href="http://www.gutenberg.org/files/3200/old/mtent12.zip">mtent12.txt</a>
|
||||
from <a href="http://promo.net/pg/">Project Gutenberg</a>, 19Mb). </p>
|
||||
<P>%long_twain_search%</P>
|
||||
<h3>Comparison 2: Medium Sized Search</h3>
|
||||
|
Reference in New Issue
Block a user