mirror of
https://github.com/boostorg/regex.git
synced 2025-07-29 03:57:27 +02:00
merged changes in regex5 branch
[SVN r26692]
This commit is contained in:
@ -41,14 +41,12 @@
|
||||
<PRE>
|
||||
template <class BidirectionalIterator,
|
||||
class charT = iterator_traits<BidirectionalIterator>::value_type,
|
||||
class traits = regex_traits<charT>,
|
||||
class Allocator = allocator<charT> >
|
||||
class traits = regex_traits<charT> >
|
||||
class regex_token_iterator
|
||||
{
|
||||
public:
|
||||
typedef <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator> regex_type;
|
||||
typedef <A href="sub_match.html">sub_match</A>
|
||||
<BidirectionalIterator> value_type;
|
||||
typedef <A href="basic_regex.html">basic_regex</A><charT, traits> regex_type;
|
||||
typedef <A href="sub_match.html">sub_match</A><BidirectionalIterator> value_type;
|
||||
typedef typename iterator_traits<BidirectionalIterator>::difference_type difference_type;
|
||||
typedef const value_type* pointer;
|
||||
typedef const value_type& reference;
|
||||
@ -78,6 +76,48 @@ typedef regex_token_iterator<std::string::const_iterator> sregex_token_i
|
||||
typedef regex_token_iterator<const wchar_t*> wcregex_token_iterator;
|
||||
typedef regex_token_iterator<<std::wstring::const_iterator> wsregex_token_iterator;
|
||||
#endif
|
||||
|
||||
template <class charT, class traits>
|
||||
regex_token_iterator<const charT*, charT, traits>
|
||||
<A href="#make_regex_token_iterator">make_regex_token_iterator</A>(const charT* p,
|
||||
const basic_regex<charT, traits>& e,
|
||||
int submatch = 0,
|
||||
regex_constants::match_flag_type m = regex_constants::match_default);
|
||||
|
||||
template <class charT, class traits, class ST, class SA>
|
||||
regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>
|
||||
<A href="#make_regex_token_iterator">make_regex_token_iterator</A>(const std::basic_string<charT, ST, SA>& p,
|
||||
const basic_regex<charT, traits>& e,
|
||||
int submatch = 0,
|
||||
regex_constants::match_flag_type m = regex_constants::match_default);
|
||||
|
||||
template <class charT, class traits, std::size_t N>
|
||||
regex_token_iterator<const charT*, charT, traits>
|
||||
<A href="#make_regex_token_iterator">make_regex_token_iterator</A>(const charT* p,
|
||||
const basic_regex<charT, traits>& e,
|
||||
const int (&submatch)[N],
|
||||
regex_constants::match_flag_type m = regex_constants::match_default);
|
||||
|
||||
template <class charT, class traits, class ST, class SA, std::size_t N>
|
||||
regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>
|
||||
<A href="#make_regex_token_iterator">make_regex_token_iterator</A>(const std::basic_string<charT, ST, SA>& p,
|
||||
const basic_regex<charT, traits>& e,
|
||||
const int (&submatch)[N],
|
||||
regex_constants::match_flag_type m = regex_constants::match_default);
|
||||
|
||||
template <class charT, class traits>
|
||||
regex_token_iterator<const charT*, charT, traits>
|
||||
<A href="#make_regex_token_iterator">make_regex_token_iterator</A>(const charT* p,
|
||||
const basic_regex<charT, traits>& e,
|
||||
const std::vector<int>& submatch,
|
||||
regex_constants::match_flag_type m = regex_constants::match_default);
|
||||
|
||||
template <class charT, class traits, class ST, class SA>
|
||||
regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>
|
||||
<A href="#make_regex_token_iterator">make_regex_token_iterator</A>(const std::basic_string<charT, ST, SA>& p,
|
||||
const basic_regex<charT, traits>& e,
|
||||
const std::vector<int>& submatch,
|
||||
regex_constants::match_flag_type m = regex_constants::match_default);
|
||||
</PRE>
|
||||
<H3><A name="description"></A>Description</H3>
|
||||
<PRE><A name=c1></A>regex_token_iterator();</PRE>
|
||||
@ -171,7 +211,54 @@ regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const reg
|
||||
<P><B> Effects:</B> constructs a copy <CODE>result</CODE> of <CODE>*this</CODE>,
|
||||
then calls <CODE>++(*this)</CODE>.</P>
|
||||
<P><B> Returns:</B> <CODE>result</CODE>.<A name="examples"></A>
|
||||
<H3>Examples</H3>
|
||||
<PRE><A name=make_regex_token_iterator></A>template <class charT, class traits>
|
||||
regex_token_iterator<const charT*, charT, traits>
|
||||
make_regex_token_iterator(const charT* p,
|
||||
const basic_regex<charT, traits>& e,
|
||||
int submatch = 0,
|
||||
regex_constants::match_flag_type m = regex_constants::match_default);
|
||||
|
||||
template <class charT, class traits, class ST, class SA>
|
||||
regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>
|
||||
make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p,
|
||||
const basic_regex<charT, traits>& e,
|
||||
int submatch = 0,
|
||||
regex_constants::match_flag_type m = regex_constants::match_default);
|
||||
|
||||
template <class charT, class traits, std::size_t N>
|
||||
regex_token_iterator<const charT*, charT, traits>
|
||||
make_regex_token_iterator(const charT* p,
|
||||
const basic_regex<charT, traits>& e,
|
||||
const int (&submatch)[N],
|
||||
regex_constants::match_flag_type m = regex_constants::match_default);
|
||||
|
||||
template <class charT, class traits, class ST, class SA, std::size_t N>
|
||||
regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>
|
||||
make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p,
|
||||
const basic_regex<charT, traits>& e,
|
||||
const int (&submatch)[N],
|
||||
regex_constants::match_flag_type m = regex_constants::match_default);
|
||||
|
||||
template <class charT, class traits>
|
||||
regex_token_iterator<const charT*, charT, traits>
|
||||
make_regex_token_iterator(const charT* p,
|
||||
const basic_regex<charT, traits>& e,
|
||||
const std::vector<int>& submatch,
|
||||
regex_constants::match_flag_type m = regex_constants::match_default);
|
||||
|
||||
template <class charT, class traits, class ST, class SA>
|
||||
regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>
|
||||
make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p,
|
||||
const basic_regex<charT, traits>& e,
|
||||
const std::vector<int>& submatch,
|
||||
regex_constants::match_flag_type m = regex_constants::match_default);
|
||||
</PRE>
|
||||
<P>Effects: returns a <A href="#synopsis">regex_token_iterator</A> that enumerates
|
||||
one <A href="sub_match.html">sub_match</A> for each value in <EM>submatch</EM> for
|
||||
each occurrence of regular expression <EM>e</EM> in string <EM>p</EM>, matched
|
||||
using <A href="match_flag_type.html">match_flags</A> <EM>m</EM>.</P>
|
||||
<P></P>
|
||||
<H3>Examples</H3>
|
||||
<P>The following <A href="../example/snippets/regex_token_iterator_eg_1.cpp">example</A>
|
||||
takes a string and splits it into a series of tokens:</P>
|
||||
<pre>
|
||||
@ -280,14 +367,15 @@ boost::regex e(<FONT color=#0000ff>"<\\s*A\\s+[^>]*href\\s*=\\s*\"([^\"]*)
|
||||
}
|
||||
</pre>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
24 Oct 2003
|
||||
26 June 2004
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
<p><i><EFBFBD> Copyright John Maddock 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2004<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
<P><I>Use, modification and distribution are subject to the Boost Software License,
|
||||
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
|
||||
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
Reference in New Issue
Block a user