From c711849c8af285ff807206ecb438e278550963b5 Mon Sep 17 00:00:00 2001
From: John Maddock
@@ -150,9 +150,9 @@
Files: captures_test.cpp.
@@ -176,9 +176,9 @@
Files: regex_timer.cpp.
diff --git a/doc/html/boost_regex/background_information/history.html b/doc/html/boost_regex/background_information/history.html
index 1c41b022..886728b5 100644
--- a/doc/html/boost_regex/background_information/history.html
+++ b/doc/html/boost_regex/background_information/history.html
@@ -35,9 +35,9 @@
All issues including closed ones can be viewed here.
Fixed issues: #698,
@@ -45,10 +45,9 @@
#5958,
#5736.
Fixed issues: #5223,
@@ -58,10 +57,9 @@
#5472,
#5504.
Fixed issues: #4309,
@@ -77,10 +75,9 @@
#3902,
#3890
There are three separate localization mechanisms supported by Boost.Regex:
@@ -89,9 +89,9 @@
library degrades gracefully - characters 0 to 255 are supported, the remainder
are treated as "unknown" graphic characters.
@@ -113,9 +113,9 @@
will make this library behave equivalent to most traditional regular expression
libraries including version 1 of this library.
@@ -150,9 +150,9 @@
or
diff --git a/doc/html/boost_regex/background_information/standards.html b/doc/html/boost_regex/background_information/standards.html
index de1dd9bb..511f399d 100644
--- a/doc/html/boost_regex/background_information/standards.html
+++ b/doc/html/boost_regex/background_information/standards.html
@@ -27,17 +27,17 @@
Standards
Conformance
Boost.Regex is intended to conform to the Technical
Report on C++ Library Extensions.
@@ -48,9 +48,9 @@
The escape sequence \u matches any upper case character (the same as [[:upper:]])
rather than a Unicode escape sequence; use \x{DDDD} for Unicode escape sequences.
Almost all Perl features are supported, except for:
@@ -72,9 +72,9 @@
^ $ \Z These recognise any line termination sequence, and not just \n: see
the Unicode requirements below.
All the POSIX basic and extended regular expression features are supported,
@@ -92,9 +92,9 @@
implementation doesn't work on your platform, then you will need to supply
a custom traits class.
Every time a Perl regular expression contains a parenthesis group
When a regular expression match is found there is no need for all of the marked
@@ -230,9 +232,10 @@
can match either $1 or $2, but never both at the same time. In Boost.Regex
you can determine which sub-expressions matched by accessing the
When a marked sub-expression is repeated, then the sub-expression gets "captured"
@@ -296,7 +299,7 @@
print_captures("(([[:lower:]]+)|([[:upper:]]+))+", "aBBcccDDDDDeeeeeeee");
print_captures("(.*)bar|(.*)bah", "abcbar");
print_captures("(.*)bar|(.*)bah", "abcbah");
- print_captures("^(?:(\\w+)|(?>\\W+))*$",
+ print_captures("^(?:(\\w+)|(?>\\W+))*$",
"now is the time for all good men to come to the aid of the party");
return 0;
}
@@ -347,7 +350,7 @@ Text: "now is the time for all good men to come to the aid of the party"
$1 = "party"
Captures:
$0 = { "now is the time for all good men to come to the aid of the party" }
- $1 = { "now", "is", "the", "time", "for", "all", "good", "men", "to",
+ $1 = { "now", "is", "the", "time", "for", "all", "good", "men", "to",
"come", "to", "the", "aid", "of", "the", "party" }
diff --git a/doc/html/boost_regex/format/boost_format_syntax.html b/doc/html/boost_regex/format/boost_format_syntax.html
index 3c639ecf..8384f0c0 100644
--- a/doc/html/boost_regex/format/boost_format_syntax.html
+++ b/doc/html/boost_regex/format/boost_format_syntax.html
@@ -31,17 +31,17 @@
Boost-Extended format strings treat all characters as literals except for
'$', '\', '(', ')', '?', and ':'.
The characters '(' and ')' perform lexical grouping, so use \( and \) if
you want a to output literal parenthesis.
The character '?' begins a conditional expression, the general form is:
@@ -78,9 +78,9 @@
?{NAME}true-expression:false-expression
@@ -318,9 +318,9 @@
Any $-placeholder sequence not listed above, results in '$' being treated
as a literal.
diff --git a/doc/html/boost_regex/install.html b/doc/html/boost_regex/install.html
index ffc68c9f..cf952713 100644
--- a/doc/html/boost_regex/install.html
+++ b/doc/html/boost_regex/install.html
@@ -48,18 +48,19 @@
it is necessary to build the library's support code into a library or archive
file before you can use it, instructions for specific platforms are as follows:
This is now the preferred method for building and installing this library,
please refer to the getting
started guide for more information.
@@ -156,13 +157,15 @@
the ICU binaries use the standard names, all you have to add is the appropriate
header-include and linker-search paths).
@@ -313,9 +316,10 @@
to modify the makefile to add /Zc:wchar_t before building the library.
You can build with gcc using the normal boost Jamfile in
There is a makefile for the sun (6.1) compiler (C++ version 3.12). From the
@@ -407,9 +412,9 @@
will build v9 variants of the regex library named libboost_regex_v9.a etc.
diff --git a/doc/html/boost_regex/introduction_and_overview.html b/doc/html/boost_regex/introduction_and_overview.html
index b8e7f043..ebe808b5 100644
--- a/doc/html/boost_regex/introduction_and_overview.html
+++ b/doc/html/boost_regex/introduction_and_overview.html
@@ -49,7 +49,7 @@
-
- Test
+
+
+ Test
Programs
-
- Example
+
+
+ Example
programs
-
- Code
+
+
+ Code
snippets
-
- Boost-1.48
+
+
+ Boost-1.48
-
- Boost
- 1.47
+
+
+ Boost 1.47
-
- Boost
- 1.44
+
+
+ Boost 1.44
-
- Boost
- 1.42
+
+
+ Boost 1.42
-
- Boost
- 1.40
+
+
+ Boost 1.40
-
- Boost
- 1.38
+
+
+ Boost 1.38
-
- Boost
- 1.34
+
+
+ Boost 1.34
-
- Boost
- 1.33.1
+
+
+ Boost 1.33.1
-
- Boost
- 1.33.0
+
+
+ Boost 1.33.0
-
- Boost
- 1.32.1
+
+
+ Boost 1.32.1
-
- Boost
- 1.31.0
+
+
+ Boost 1.31.0
-
- Win32
+
+
+ Win32
localization model.
-
- C
+
+
+ C
localization model.
-
- C++
+
+
+ C++
localization model.
<boost/cregex.hpp>
in your code. The best way to ensure this is to add the #define to <boost/regex/user.hpp>
.
-
- Providing
+
+
+ Providing
a message catalogue
-
- C++
+
+
+ C++
-
- ECMAScript
+
+
+ ECMAScript
/ JavaScript
-
- Perl
+
+
+ Perl
-
- POSIX
+
+
+ POSIX
-
- Unicode
+
-
+
+ Unicode
-
- Marked sub-expressions
+
+
+ Marked
+ sub-expressions
()
, it spits out an extra field, known as a
@@ -217,9 +218,10 @@
they can be compared to a string, added to a string, or streamed out to an
output stream.
-
- Unmatched Sub-Expressions
+
+
+ Unmatched
+ Sub-Expressions
sub_match::matched
data member.
-
- Repeated Captures
+
+
+ Repeated
+ Captures
-
- Grouping
+
+
+ Grouping
-
- Conditionals
+
+
+ Conditionals
-
- Placeholder
+
+
+ Placeholder
Sequences
-
- Escape
+
+
+ Escape
Sequences
-
- Building with bjam
+
+
+ Building
+ with bjam
-
- Building
+
+
+ Building
With Unicode and ICU Support
-
- Building via makefiles
+
+
+ Building
+ via makefiles
-
-
- Borland C++ Builder:
+
+
+ Borland
+ C++ Builder:
-
- Microsoft
+
+
+ Microsoft
Visual C++ 6, 7, 7.1 and 8
-
- GCC(2.95 and later)
+
+
+ GCC(2.95
+ and later)
<boost>/libs/regex/build
, alternatively
@@ -362,9 +366,10 @@
For the more adventurous there is a configure script in <boost>/libs/config
;
see the config library documentation.
-
- Sun Workshop 6.1
+
+
+ Sun
+ Workshop 6.1
-
- Makefiles
+
+
+ Makefiles
for Other compilers
namespace boost{
-template <class charT,
+template <class charT,
class traits = regex_traits<charT> >
class basic_regex;
@@ -72,7 +72,7 @@
leaves us with the following regular expression to validate credit card number
formats:
(\d{4}){3}\d{4}+
(\d{4}[- ]){3}\d{4}
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 of @@ -146,7 +146,7 @@ typedef match_results<const char*> cmatch; typedef match_results<const wchar_t*> wcmatch; typedef match_results<std::string::const_iterator> smatch; -typedef match_results<std::wstring::const_iterator> wsmatch; +typedef match_results<std::wstring::const_iterator> wsmatch; } diff --git a/doc/html/boost_regex/partial_matches.html b/doc/html/boost_regex/partial_matches.html index 7c636510..99a1fc4b 100644 --- a/doc/html/boost_regex/partial_matches.html +++ b/doc/html/boost_regex/partial_matches.html @@ -262,10 +262,10 @@ next_pos = buf + sizeof(buf); // and then iterate: boost::cregex_iterator a( - buf, - buf + read + leftover, - e, - boost::match_default | boost::match_partial); + buf, + buf + read + leftover, + e, + boost::match_default | boost::match_partial); boost::cregex_iterator b; while(a != b) @@ -281,7 +281,7 @@ // full match: ++tags; } - + // move to next match: ++a; } diff --git a/doc/html/boost_regex/ref/bad_expression.html b/doc/html/boost_regex/ref/bad_expression.html index dd78f982..381b423d 100644 --- a/doc/html/boost_regex/ref/bad_expression.html +++ b/doc/html/boost_regex/ref/bad_expression.html @@ -26,9 +26,9 @@
-#include <boost/pattern_except.hpp>@@ -53,9 +53,9 @@ } // namespace boost -
regex_error(const std::string& s, regex_constants::error_type err, std::ptrdiff_t pos); regex_error(boost::regex_constants::error_type err); @@ -69,7 +69,7 @@ Effects: returns the error code that represents parsing error that occurred. --std::ptrdiff_t position()const; +-std::ptrdiff_t position()const;Effects: returns the location in the expression diff --git a/doc/html/boost_regex/ref/basic_regex.html b/doc/html/boost_regex/ref/basic_regex.html index d2f97d4e..217c5106 100644 --- a/doc/html/boost_regex/ref/basic_regex.html +++ b/doc/html/boost_regex/ref/basic_regex.html @@ -26,9 +26,9 @@
-- - Synopsis +
+ + Synopsis
#include <boost/regex.hpp>@@ -76,112 +76,112 @@ template <class charT, class traits = regex_traits<charT> > class basic_regex { - public: + public: // types: typedef charT value_type; typedef implementation-specific const_iterator; - typedef const_iterator iterator; - typedef charT& reference; - typedef const charT& const_reference; - typedef std::ptrdiff_t difference_type; + typedef const_iterator iterator; + typedef charT& reference; + typedef const charT& const_reference; + typedef std::ptrdiff_t difference_type; typedef std::size_t size_type; typedef regex_constants::syntax_option_type
flag_type; typedef typename traits::locale_type locale_type; // constants: // main option selection: - static const regex_constants::syntax_option_type
normal + static const regex_constants::syntax_option_type
normal = regex_constants::normal; - static const regex_constants::syntax_option_type
ECMAScript + static const regex_constants::syntax_option_type
ECMAScript = normal; - static const regex_constants::syntax_option_type
JavaScript + static const regex_constants::syntax_option_type
JavaScript = normal; - static const regex_constants::syntax_option_type
JScript + static const regex_constants::syntax_option_type
JScript = normal; - static const regex_constants::syntax_option_type
basic + static const regex_constants::syntax_option_type
basic = regex_constants::basic; - static const regex_constants::syntax_option_type
extended + static const regex_constants::syntax_option_type
extended = regex_constants::extended; - static const regex_constants::syntax_option_type
awk + static const regex_constants::syntax_option_type
awk = regex_constants::awk; - static const regex_constants::syntax_option_type
grep + static const regex_constants::syntax_option_type
grep = regex_constants::grep; - static const regex_constants::syntax_option_type
egrep + static const regex_constants::syntax_option_type
egrep = regex_constants::egrep; - static const regex_constants::syntax_option_type
sed + static const regex_constants::syntax_option_type
sed = basic = regex_constants::sed; - static const regex_constants::syntax_option_type
perl + static const regex_constants::syntax_option_type
perl = regex_constants::perl; - static const regex_constants::syntax_option_type
literal + static const regex_constants::syntax_option_type
literal = regex_constants::literal; // modifiers specific to perl expressions: - static const regex_constants::syntax_option_type
no_mod_m + static const regex_constants::syntax_option_type
no_mod_m = regex_constants::no_mod_m; - static const regex_constants::syntax_option_type
no_mod_s + static const regex_constants::syntax_option_type
no_mod_s = regex_constants::no_mod_s; - static const regex_constants::syntax_option_type
mod_s + static const regex_constants::syntax_option_type
mod_s = regex_constants::mod_s; - static const regex_constants::syntax_option_type
mod_x + static const regex_constants::syntax_option_type
mod_x = regex_constants::mod_x; // modifiers specific to POSIX basic expressions: - static const regex_constants::syntax_option_type
bk_plus_qm + static const regex_constants::syntax_option_type
bk_plus_qm = regex_constants::bk_plus_qm; - static const regex_constants::syntax_option_type
bk_vbar + static const regex_constants::syntax_option_type
bk_vbar = regex_constants::bk_vbar - static const regex_constants::syntax_option_type
no_char_classes + static const regex_constants::syntax_option_type
no_char_classes = regex_constants::no_char_classes - static const regex_constants::syntax_option_type
no_intervals + static const regex_constants::syntax_option_type
no_intervals = regex_constants::no_intervals // common modifiers: - static const regex_constants::syntax_option_type
nosubs + static const regex_constants::syntax_option_type
nosubs = regex_constants::nosubs; - static const regex_constants::syntax_option_type
optimize + static const regex_constants::syntax_option_type
optimize = regex_constants::optimize; - static const regex_constants::syntax_option_type
collate + static const regex_constants::syntax_option_type
collate = regex_constants::collate; - static const regex_constants::syntax_option_type
newline_alt + static const regex_constants::syntax_option_type
newline_alt = regex_constants::newline_alt; - static const regex_constants::syntax_option_type
no_except + static const regex_constants::syntax_option_type
no_except = regex_constants::newline_alt; // construct/copy/destroy: explicit basic_regex (); explicit basic_regex(const charT* p, flag_type f = regex_constants::normal); - basic_regex(const charT* p1, const charT* p2, + basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal); basic_regex(const charT* p, size_type len, flag_type f); basic_regex(const basic_regex&); template <class ST, class SA> - explicit basic_regex(const basic_string<charT, ST, SA>& p, + explicit basic_regex(const basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal); template <class InputIterator> - basic_regex(InputIterator first, InputIterator last, + basic_regex(InputIterator first, InputIterator last, flag_type f = regex_constants::normal); ~basic_regex(); basic_regex& operator=(const basic_regex&); - basic_regex& operator= (const charT* ptr); + basic_regex& operator= (const charT* ptr); - template <class ST, class SA> + template <class ST, class SA> basic_regex& operator= (const basic_string<charT, ST, SA>& p); // iterators: - std::pair<const_iterator, const_iterator> subexpression(size_type n) const; - const_iterator begin() const; + std::pair<const_iterator, const_iterator> subexpression(size_type n) const; + const_iterator begin() const; const_iterator end() const; // capacity: - size_type size() const; - size_type max_size() const; - bool empty() const; - size_type mark_count()const; + size_type size() const; + size_type max_size() const; + bool empty() const; + size_type mark_count()const; // // modifiers: - basic_regex& assign(const basic_regex& that); - basic_regex& assign(const charT* ptr, + basic_regex& assign(const basic_regex& that); + basic_regex& assign(const charT* ptr, flag_type f = regex_constants::normal); basic_regex& assign(const charT* ptr, unsigned int len, flag_type f); @@ -243,68 +243,68 @@ } // namespace boost- - Description +
+ + Description
Class
basic_regex
has the following public members:// main option selection: -static const regex_constants::syntax_option_type
normal +static const regex_constants::syntax_option_type
normal = regex_constants::normal; -static const regex_constants::syntax_option_type
ECMAScript +static const regex_constants::syntax_option_type
ECMAScript = normal; -static const regex_constants::syntax_option_type
JavaScript +static const regex_constants::syntax_option_type
JavaScript = normal; -static const regex_constants::syntax_option_type
JScript +static const regex_constants::syntax_option_type
JScript = normal; -static const regex_constants::syntax_option_type
basic +static const regex_constants::syntax_option_type
basic = regex_constants::basic; -static const regex_constants::syntax_option_type
extended +static const regex_constants::syntax_option_type
extended = regex_constants::extended; -static const regex_constants::syntax_option_type
awk +static const regex_constants::syntax_option_type
awk = regex_constants::awk; -static const regex_constants::syntax_option_type
grep +static const regex_constants::syntax_option_type
grep = regex_constants::grep; -static const regex_constants::syntax_option_type
egrep +static const regex_constants::syntax_option_type
egrep = regex_constants::egrep; -static const regex_constants::syntax_option_type
sed +static const regex_constants::syntax_option_type
sed = regex_constants::sed; -static const regex_constants::syntax_option_type
perl +static const regex_constants::syntax_option_type
perl = regex_constants::perl; -static const regex_constants::syntax_option_type
literal +static const regex_constants::syntax_option_type
literal = regex_constants::literal; // modifiers specific to perl expressions: -static const regex_constants::syntax_option_type
no_mod_m +static const regex_constants::syntax_option_type
no_mod_m = regex_constants::no_mod_m; -static const regex_constants::syntax_option_type
no_mod_s +static const regex_constants::syntax_option_type
no_mod_s = regex_constants::no_mod_s; -static const regex_constants::syntax_option_type
mod_s +static const regex_constants::syntax_option_type
mod_s = regex_constants::mod_s; -static const regex_constants::syntax_option_type
mod_x +static const regex_constants::syntax_option_type
mod_x = regex_constants::mod_x; // modifiers specific to POSIX basic expressions: -static const regex_constants::syntax_option_type
bk_plus_qm +static const regex_constants::syntax_option_type
bk_plus_qm = regex_constants::bk_plus_qm; -static const regex_constants::syntax_option_type
bk_vbar +static const regex_constants::syntax_option_type
bk_vbar = regex_constants::bk_vbar -static const regex_constants::syntax_option_type
no_char_classes +static const regex_constants::syntax_option_type
no_char_classes = regex_constants::no_char_classes -static const regex_constants::syntax_option_type
no_intervals +static const regex_constants::syntax_option_type
no_intervals = regex_constants::no_intervals // common modifiers: -static const regex_constants::syntax_option_type
nosubs +static const regex_constants::syntax_option_type
nosubs = regex_constants::nosubs; -static const regex_constants::syntax_option_type
optimize +static const regex_constants::syntax_option_type
optimize = regex_constants::optimize; -static const regex_constants::syntax_option_type
collate +static const regex_constants::syntax_option_type
collate = regex_constants::collate; -static const regex_constants::syntax_option_type
newline_alt +static const regex_constants::syntax_option_type
newline_alt = regex_constants::newline_alt;@@ -325,7 +325,7 @@
basic_regex
.--Table 1. basic_regex default construction postconditions
+Table 1. basic_regex default construction postconditions
-
@@ -403,7 +403,7 @@ flags specified in f. --Table 2. Postconditions for basic_regex construction
+Table 2. Postconditions for basic_regex construction
@@ -485,7 +485,7 @@ basic_regex(const charT* p1, const charT* p2, +basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal);@@ -506,7 +506,7 @@ specified in f.
-diff --git a/doc/html/boost_regex/ref/regex_replace.html b/doc/html/boost_regex/ref/regex_replace.html index 41c839e8..fb21188a 100644 --- a/doc/html/boost_regex/ref/regex_replace.html +++ b/doc/html/boost_regex/ref/regex_replace.html @@ -26,7 +26,7 @@ -Table 3. Postconditions for basic_regex construction
+Table 3. Postconditions for basic_regex construction
-
@@ -608,7 +608,7 @@ according the option flags specified in f. -Table 4. Postconditions for basic_regex construction
+Table 4. Postconditions for basic_regex construction
-
@@ -699,7 +699,7 @@ as a copy of the object e. template <class ST, class SA> -basic_regex(const basic_string<charT, ST, SA>& s, +basic_regex(const basic_string<charT, ST, SA>& s, flag_type f = regex_constants::normal);@@ -716,7 +716,7 @@ flags specified in f.
-Table 5. Postconditions for basic_regex construction
+Table 5. Postconditions for basic_regex construction
@@ -799,7 +799,7 @@ template <class ForwardIterator> -basic_regex(ForwardIterator first, ForwardIterator last, +basic_regex(ForwardIterator first, ForwardIterator last, flag_type f = regex_constants::normal);@@ -816,7 +816,7 @@ flags specified in f.
-diff --git a/doc/html/boost_regex/ref/deprecated_interfaces/regex_split.html b/doc/html/boost_regex/ref/deprecated_interfaces/regex_split.html index 10089c43..c9b1a8cf 100644 --- a/doc/html/boost_regex/ref/deprecated_interfaces/regex_split.html +++ b/doc/html/boost_regex/ref/deprecated_interfaces/regex_split.html @@ -37,27 +37,27 @@ Code which usesTable 6. Postconditions for basic_regex construction
+Table 6. Postconditions for basic_regex construction
template <class iterator, class Allocator, class Formatter> std::basic_string<charT> regex_format - (const match_results<iterator, Allocator>& m, + (const match_results<iterator, Allocator>& m, Formatter fmt, match_flag_type flags = 0);diff --git a/doc/html/boost_regex/ref/deprecated_interfaces/regex_grep.html b/doc/html/boost_regex/ref/deprecated_interfaces/regex_grep.html index eb297b54..c0411808 100644 --- a/doc/html/boost_regex/ref/deprecated_interfaces/regex_grep.html +++ b/doc/html/boost_regex/ref/deprecated_interfaces/regex_grep.html @@ -57,15 +57,15 @@ in place of a pair of iterators.template <class Predicate, class charT, class traits> -unsigned int regex_grep(Predicate foo, - const charT* str, - const basic_regex<charT, traits>& e, +unsigned int regex_grep(Predicate foo, + const charT* str, + const basic_regex<charT, traits>& e, boost::match_flag_type flags = match_default); template <class Predicate, class ST, class SA, class charT, class traits> -unsigned int regex_grep(Predicate foo, - const std::basic_string<charT, ST, SA>& s, - const basic_regex<charT, traits>& e, +unsigned int regex_grep(Predicate foo, + const std::basic_string<charT, ST, SA>& s, + const basic_regex<charT, traits>& e, boost::match_flag_type flags = match_default);@@ -131,23 +131,23 @@
Example: convert the example from
-regex_search
to useregex_grep
instead:#include <string> -#include <map> -#include <boost/regex.hpp> +#include <string> +#include <map> +#include <boost/regex.hpp> // IndexClasses: // takes the contents of a file in the form of a string // and searches for all the C++ class definitions, storing // their locations in a map of strings/int's -typedef std::map<std::string, int, std::less<std::string> > map_type; +typedef std::map<std::string, int, std::less<std::string> > map_type; -const char* re = +const char* re = // possibly leading whitespace: - "^[[:space:]]*" + "^[[:space:]]*" // possible template declaration: "(template[[:space:]]*<[^;:{]+>[[:space:]]*)?" // class or struct: - "(class|struct)[[:space:]]*" + "(class|struct)[[:space:]]*" // leading declspec macros etc: "(" "\\<\\w+\\>" @@ -155,97 +155,97 @@ "[[:blank:]]*\\([^)]*\\)" ")?" "[[:space:]]*" - ")*" + ")*" // the class name - "(\\<\\w*\\>)[[:space:]]*" - // template specialisation parameters - "(<[^;:{]+>)?[[:space:]]*" - // terminate in { or : - "(\\{|:[^;\\{()]*\\{)"; - -boost::regex expression(re); -class IndexClassesPred -{ - map_type& m; - std::string::const_iterator base; -public: - IndexClassesPred(map_type& a, std::string::const_iterator b) : m(a), base(b) {} - bool operator()(const smatch& what) - { - // what[0] contains the whole string - // what[5] contains the class name. - // what[6] contains the template specialisation if any. - // add class name and position to map: - m[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] = - what[5].first - base; - return true; - } -}; -void IndexClasses(map_type& m, const std::string& file) -{ - std::string::const_iterator start, end; - start = file.begin(); - end = file.end(); - regex_grep(IndexClassesPred(m, start), start, end, expression); -} --- Example: Use
-regex_grep
- to call a global callback function: -#include <string> -#include <map> -#include <boost/regex.hpp> - -// purpose: -// takes the contents of a file in the form of a string -// and searches for all the C++ class definitions, storing -// their locations in a map of strings/int's -typedef std::map<std::string, int, std::less<std::string> > map_type; - -const char* re = - // possibly leading whitespace: - "^[[:space:]]*" - // possible template declaration: - "(template[[:space:]]*<[^;:{]+>[[:space:]]*)?" - // class or struct: - "(class|struct)[[:space:]]*" - // leading declspec macros etc: - "(" - "\\<\\w+\\>" - "(" - "[[:blank:]]*\\([^)]*\\)" - ")?" - "[[:space:]]*" - ")*" - // the class name - "(\\<\\w*\\>)[[:space:]]*" + "(\\<\\w*\\>)[[:space:]]*" // template specialisation parameters "(<[^;:{]+>)?[[:space:]]*" // terminate in { or : "(\\{|:[^;\\{()]*\\{)"; boost::regex expression(re); -map_type class_index; -std::string::const_iterator base; +class IndexClassesPred +{ + map_type& m; + std::string::const_iterator base; +public: + IndexClassesPred(map_type& a, std::string::const_iterator b) : m(a), base(b) {} + bool operator()(const smatch& what) + { + // what[0] contains the whole string + // what[5] contains the class name. + // what[6] contains the template specialisation if any. + // add class name and position to map: + m[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] = + what[5].first - base; + return true; + } +}; +void IndexClasses(map_type& m, const std::string& file) +{ + std::string::const_iterator start, end; + start = file.begin(); + end = file.end(); + regex_grep(IndexClassesPred(m, start), start, end, expression); +} +++ Example: Use
+regex_grep
+ to call a global callback function: +#include <string> +#include <map> +#include <boost/regex.hpp> -bool grep_callback(const boost::smatch& what) -{ +// purpose: +// takes the contents of a file in the form of a string +// and searches for all the C++ class definitions, storing +// their locations in a map of strings/int's +typedef std::map<std::string, int, std::less<std::string> > map_type; + +const char* re = + // possibly leading whitespace: + "^[[:space:]]*" + // possible template declaration: + "(template[[:space:]]*<[^;:{]+>[[:space:]]*)?" + // class or struct: + "(class|struct)[[:space:]]*" + // leading declspec macros etc: + "(" + "\\<\\w+\\>" + "(" + "[[:blank:]]*\\([^)]*\\)" + ")?" + "[[:space:]]*" + ")*" + // the class name + "(\\<\\w*\\>)[[:space:]]*" + // template specialisation parameters + "(<[^;:{]+>)?[[:space:]]*" + // terminate in { or : + "(\\{|:[^;\\{()]*\\{)"; + +boost::regex expression(re); +map_type class_index; +std::string::const_iterator base; + +bool grep_callback(const boost::smatch& what) +{ // what[0] contains the whole string // what[5] contains the class name. // what[6] contains the template specialisation if any. // add class name and position to map: - class_index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] = - what[5].first - base; - return true; -} -void IndexClasses(const std::string& file) -{ - std::string::const_iterator start, end; - start = file.begin(); - end = file.end(); - base = start; - regex_grep(grep_callback, start, end, expression, match_default); + class_index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] = + what[5].first - base; + return true; +} +void IndexClasses(const std::string& file) +{ + std::string::const_iterator start, end; + start = file.begin(); + end = file.end(); + base = start; + regex_grep(grep_callback, start, end, expression, match_default); }@@ -253,110 +253,110 @@ to call a class member function, use the standard library adapters
-std::mem_fun
andstd::bind1st
to convert the member function into a predicate:#include <string> -#include <map> -#include <boost/regex.hpp> -#include <functional> +#include <string> +#include <map> +#include <boost/regex.hpp> +#include <functional> // purpose: // takes the contents of a file in the form of a string // and searches for all the C++ class definitions, storing // their locations in a map of strings/int's -typedef std::map<std::string, int, std::less<std::string> > map_type; -class class_index -{ - boost::regex expression; - map_type index; - std::string::const_iterator base; - bool grep_callback(boost::smatch what); -public: - void IndexClasses(const std::string& file); - class_index() - : index(), - expression("^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?" - "(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?" - "[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>[[:space:]]*)?" - "(\\{|:[^;\\{()]*\\{)" - ){} -}; -bool class_index::grep_callback(boost::smatch what) -{ +typedef std::map<std::string, int, std::less<std::string> > map_type; +class class_index +{ + boost::regex expression; + map_type index; + std::string::const_iterator base; + bool grep_callback(boost::smatch what); +public: + void IndexClasses(const std::string& file); + class_index() + : index(), + expression("^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?" + "(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?" + "[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>[[:space:]]*)?" + "(\\{|:[^;\\{()]*\\{)" + ){} +}; +bool class_index::grep_callback(boost::smatch what) +{ // what[0] contains the whole string // what[5] contains the class name. // what[6] contains the template specialisation if any. // add class name and position to map: - index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] = - what[5].first - base; - return true; -} + index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] = + what[5].first - base; + return true; +} -void class_index::IndexClasses(const std::string& file) -{ - std::string::const_iterator start, end; - start = file.begin(); - end = file.end(); - base = start; - regex_grep(std::bind1st(std::mem_fun(&class_index::grep_callback), this), - start, - end, - expression); -} +void class_index::IndexClasses(const std::string& file) +{ + std::string::const_iterator start, end; + start = file.begin(); + end = file.end(); + base = start; + regex_grep(std::bind1st(std::mem_fun(&class_index::grep_callback), this), + start, + end, + expression); +}Finally, C++ Builder users can use C++ Builder's closure type as a callback argument:
-#include <string> -#include <map> -#include <boost/regex.hpp> -#include <functional> +#include <string> +#include <map> +#include <boost/regex.hpp> +#include <functional> // purpose: // takes the contents of a file in the form of a string // and searches for all the C++ class definitions, storing // their locations in a map of strings/int's -typedef std::map<std::string, int, std::less<std::string> > map_type; -class class_index -{ - boost::regex expression; - map_type index; - std::string::const_iterator base; - typedef boost::smatch arg_type; - bool grep_callback(const arg_type& what); -public: - typedef bool (__closure* grep_callback_type)(const arg_type&); - void IndexClasses(const std::string& file); - class_index() - : index(), - expression("^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?" - "(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?" - "[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>[[:space:]]*)?" - "(\\{|:[^;\\{()]*\\{)" - ){} -}; +typedef std::map<std::string, int, std::less<std::string> > map_type; +class class_index +{ + boost::regex expression; + map_type index; + std::string::const_iterator base; + typedef boost::smatch arg_type; + bool grep_callback(const arg_type& what); +public: + typedef bool (__closure* grep_callback_type)(const arg_type&); + void IndexClasses(const std::string& file); + class_index() + : index(), + expression("^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?" + "(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?" + "[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>[[:space:]]*)?" + "(\\{|:[^;\\{()]*\\{)" + ){} +}; -bool class_index::grep_callback(const arg_type& what) -{ +bool class_index::grep_callback(const arg_type& what) +{ // what[0] contains the whole string // what[5] contains the class name. // what[6] contains the template specialisation if any. // add class name and position to map: -index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] = - what[5].first - base; - return true; -} +index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] = + what[5].first - base; + return true; +} -void class_index::IndexClasses(const std::string& file) -{ - std::string::const_iterator start, end; - start = file.begin(); - end = file.end(); - base = start; - class_index::grep_callback_type cl = &(this->grep_callback); - regex_grep(cl, - start, - end, - expression); +void class_index::IndexClasses(const std::string& file) +{ + std::string::const_iterator start, end; + start = file.begin(); + end = file.end(); + base = start; + class_index::grep_callback_type cl = &(this->grep_callback); + regex_grep(cl, + start, + end, + expression); }regex_split
will continue to compile, the following documentation is taken from a previous Boost.Regex version: -#include <boost/regex.hpp> +-#include <boost/regex.hpp>Algorithm
regex_split
performs a similar operation to the perl split operation, and comes in three overloaded forms:template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2> -std::size_t regex_split(OutputIterator out, - std::basic_string<charT, Traits1, Alloc1>& s, +std::size_t regex_split(OutputIterator out, + std::basic_string<charT, Traits1, Alloc1>& s, const basic_regex<charT, Traits2>& e, boost::match_flag_type flags, std::size_t max_split); template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2> -std::size_t regex_split(OutputIterator out, - std::basic_string<charT, Traits1, Alloc1>& s, +std::size_t regex_split(OutputIterator out, + std::basic_string<charT, Traits1, Alloc1>& s, const basic_regex<charT, Traits2>& e, boost::match_flag_type flags = match_default); template <class OutputIterator, class charT, class Traits1, class Alloc1> -std::size_t regex_split(OutputIterator out, +std::size_t regex_split(OutputIterator out, std::basic_string<charT, Traits1, Alloc1>& s);diff --git a/doc/html/boost_regex/ref/error_type.html b/doc/html/boost_regex/ref/error_type.html index ea5258f3..9e65d78e 100644 --- a/doc/html/boost_regex/ref/error_type.html +++ b/doc/html/boost_regex/ref/error_type.html @@ -26,9 +26,9 @@
-- - Synopsis +
+ + Synopsis
Type error type represents the different types of errors that can be raised @@ -56,9 +56,9 @@ } // namespace regex_constants } // namespace boost
- - Description +
+ + Description
The type
error_type
is an diff --git a/doc/html/boost_regex/ref/internal_details/uni_iter.html b/doc/html/boost_regex/ref/internal_details/uni_iter.html index 4f5a29a5..2bca459d 100644 --- a/doc/html/boost_regex/ref/internal_details/uni_iter.html +++ b/doc/html/boost_regex/ref/internal_details/uni_iter.html @@ -27,12 +27,11 @@ Unicode Iterators -- - Synopsis +
+ + Synopsis
-
#include <boost/regex/pending/unicode_iterator.hpp>@@ -55,9 +54,9 @@ template <class BaseIterator> class utf8_output_iterator; -
- - Description +
+ + Description
This header contains a selection of iterator adaptors that make a sequence diff --git a/doc/html/boost_regex/ref/match_flag_type.html b/doc/html/boost_regex/ref/match_flag_type.html index 4dfdac10..c35928f1 100644 --- a/doc/html/boost_regex/ref/match_flag_type.html +++ b/doc/html/boost_regex/ref/match_flag_type.html @@ -59,7 +59,7 @@ static const match_flag_type format_default = 0; static const match_flag_type format_sed; static const match_flag_type format_perl; -static const match_flag_type format_literal; +static const match_flag_type format_literal; static const match_flag_type format_no_copy; static const match_flag_type format_first_only; @@ -68,9 +68,9 @@ } // namespace regex_constants } // namespace boost -
- - Description +
+ + Description
The type
-match_flag_type
diff --git a/doc/html/boost_regex/ref/match_results.html b/doc/html/boost_regex/ref/match_results.html index 9ba0d402..72dd7626 100644 --- a/doc/html/boost_regex/ref/match_results.html +++ b/doc/html/boost_regex/ref/match_results.html @@ -26,9 +26,9 @@- - Synopsis +
+ + Synopsis
#include <boost/regex.hpp>@@ -73,8 +73,8 @@ template <class BidirectionalIterator, class Allocator = std::allocator<sub_match<BidirectionalIterator> > class match_results -{ -public: +{ +public: typedef sub_match<BidirectionalIterator> value_type; typedef const value_type& const_reference; typedef const_reference reference; @@ -89,7 +89,7 @@ // construct/copy/destroy: explicit match_results(const Allocator& a = Allocator()); match_results(const match_results& m); - match_results& operator=(const match_results& m); + match_results& operator=(const match_results& m); ~match_results(); // size: @@ -166,9 +166,9 @@ void swap(match_results<BidirectionalIterator, Allocator>& m1, match_results<BidirectionalIterator, Allocator>& m2); -- - Description +
+ + Description
In all
-match_results
constructors, @@ -738,7 +738,7 @@ whose value_type is asub_match<BidirectionalIterator>
. This type happens to bestd::vector<sub_match<BidirectionalIterator> >
, but you shouldn't actually rely on that.const capture_sequence_type& captures(std::size_t i)const; +-const capture_sequence_type& captures(std::size_t i)const;Requires: that the match_results object diff --git a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html index 9a25cd72..66cafb53 100644 --- a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html +++ b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html @@ -42,9 +42,9 @@ data look as though it's really a UTF-32 sequence, that can then be passed on to the "real" algorithm.
-- - u32regex_match +
+ + u32regex_match
For each
regex_match
@@ -88,9 +88,9 @@ } }- - u32regex_search +
+ + u32regex_search
For each
regex_search
@@ -127,9 +127,9 @@ } } -- - u32regex_replace +
+ + u32regex_replace
For each
regex_replace
algorithm defined diff --git a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html index cfbd066a..bd5bfdaf 100644 --- a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html +++ b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html @@ -27,9 +27,9 @@ Unicode Aware Regex Iterators -- - u32regex_iterator +
+ + u32regex_iterator
Type
-u32regex_iterator
@@ -54,30 +54,30 @@ from a string, there are a series of non-member helper functions called make_u32regex_iterator:u32regex_iterator<const char*> - make_u32regex_iterator(const char* s, - const u32regex& e, +u32regex_iterator<const char*> + make_u32regex_iterator(const char* s, + const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default); - -u32regex_iterator<const wchar_t*> - make_u32regex_iterator(const wchar_t* s, - const u32regex& e, + +u32regex_iterator<const wchar_t*> + make_u32regex_iterator(const wchar_t* s, + const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default); - -u32regex_iterator<const UChar*> - make_u32regex_iterator(const UChar* s, - const u32regex& e, + +u32regex_iterator<const UChar*> + make_u32regex_iterator(const UChar* s, + const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default); - + template <class charT, class Traits, class Alloc> -u32regex_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> - make_u32regex_iterator(const std::basic_string<charT, Traits, Alloc>& s, - const u32regex& e, +u32regex_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> + make_u32regex_iterator(const std::basic_string<charT, Traits, Alloc>& s, + const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default); - -u32regex_iterator<const UChar*> - make_u32regex_iterator(const UnicodeString& s, - const u32regex& e, + +u32regex_iterator<const UChar*> + make_u32regex_iterator(const UnicodeString& s, + const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default);@@ -93,7 +93,7 @@ { // enumerate and print all the currency symbols, along // with any associated numeric values: - const char* re = + const char* re = "([[:Sc:]][[:Cf:][:Cc:][:Z*:]]*)?" "([[:Nd:]]+(?:[[:Po:]][[:Nd:]]+)?)?" "(?(1)" @@ -103,7 +103,7 @@ "[[:Sc:]]" ")"; boost::u32regex r = boost::make_u32regex(re); - boost::u32regex_iterator<std::string::const_iterator> + boost::u32regex_iterator<std::string::const_iterator> i(boost::make_u32regex_iterator(text, r)), j; while(i != j) { @@ -125,9 +125,9 @@
Provided of course that the input is encoded as UTF-8.
-- - u32regex_token_iterator +
+ + u32regex_token_iterator
Type
-u32regex_token_iterator
@@ -152,40 +152,40 @@ from a string, there are a series of non-member helper functions calledmake_u32regex_token_iterator
:u32regex_token_iterator<const char*> +u32regex_token_iterator<const char*> make_u32regex_token_iterator( - const char* s, - const u32regex& e, - int sub, + const char* s, + const u32regex& e, + int sub, regex_constants::match_flag_type m = regex_constants::match_default); - -u32regex_token_iterator<const wchar_t*> + +u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator( - const wchar_t* s, - const u32regex& e, - int sub, + const wchar_t* s, + const u32regex& e, + int sub, regex_constants::match_flag_type m = regex_constants::match_default); - -u32regex_token_iterator<const UChar*> + +u32regex_token_iterator<const UChar*> make_u32regex_token_iterator( - const UChar* s, - const u32regex& e, - int sub, + const UChar* s, + const u32regex& e, + int sub, regex_constants::match_flag_type m = regex_constants::match_default); - + template <class charT, class Traits, class Alloc> -u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> +u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_token_iterator( - const std::basic_string<charT, Traits, Alloc>& s, - const u32regex& e, - int sub, + const std::basic_string<charT, Traits, Alloc>& s, + const u32regex& e, + int sub, regex_constants::match_flag_type m = regex_constants::match_default); - -u32regex_token_iterator<const UChar*> + +u32regex_token_iterator<const UChar*> make_u32regex_token_iterator( - const UnicodeString& s, - const u32regex& e, - int sub, + const UnicodeString& s, + const u32regex& e, + int sub, regex_constants::match_flag_type m = regex_constants::match_default);@@ -194,43 +194,43 @@ found in text s, using match_flags m.
template <std::size_t N> -u32regex_token_iterator<const char*> +u32regex_token_iterator<const char*> make_u32regex_token_iterator( - const char* p, - const u32regex& e, - const int (&submatch)[N], + const char* p, + const u32regex& e, + const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default); - + template <std::size_t N> -u32regex_token_iterator<const wchar_t*> +u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator( - const wchar_t* p, - const u32regex& e, - const int (&submatch)[N], + const wchar_t* p, + const u32regex& e, + const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default); - + template <std::size_t N> -u32regex_token_iterator<const UChar*> +u32regex_token_iterator<const UChar*> make_u32regex_token_iterator( - const UChar* p, - const u32regex& e, - const int (&submatch)[N], + const UChar* p, + const u32regex& e, + const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default); - + template <class charT, class Traits, class Alloc, std::size_t N> -u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> +u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_token_iterator( - const std::basic_string<charT, Traits, Alloc>& p, - const u32regex& e, - const int (&submatch)[N], + const std::basic_string<charT, Traits, Alloc>& p, + const u32regex& e, + const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default); - + template <std::size_t N> -u32regex_token_iterator<const UChar*> +u32regex_token_iterator<const UChar*> make_u32regex_token_iterator( - const UnicodeString& s, - const u32regex& e, - const int (&submatch)[N], + const UnicodeString& s, + const u32regex& e, + const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default);@@ -238,40 +238,40 @@ for each submatch in regular expression e, found in text s, using match_flags m.
-u32regex_token_iterator<const char*> +u32regex_token_iterator<const char*> make_u32regex_token_iterator( - const char* p, - const u32regex& e, - const std::vector<int>& submatch, + const char* p, + const u32regex& e, + const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default); - -u32regex_token_iterator<const wchar_t*> + +u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator( - const wchar_t* p, - const u32regex& e, - const std::vector<int>& submatch, + const wchar_t* p, + const u32regex& e, + const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default); - -u32regex_token_iterator<const UChar*> + +u32regex_token_iterator<const UChar*> make_u32regex_token_iterator( - const UChar* p, - const u32regex& e, - const std::vector<int>& submatch, + const UChar* p, + const u32regex& e, + const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default); - + template <class charT, class Traits, class Alloc> -u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> +u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_token_iterator( - const std::basic_string<charT, Traits, Alloc>& p, - const u32regex& e, - const std::vector<int>& submatch, + const std::basic_string<charT, Traits, Alloc>& p, + const u32regex& e, + const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default); - -u32regex_token_iterator<const UChar*> + +u32regex_token_iterator<const UChar*> make_u32regex_token_iterator( - const UnicodeString& s, - const u32regex& e, - const std::vector<int>& submatch, + const UnicodeString& s, + const u32regex& e, + const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default);@@ -287,7 +287,7 @@ { // enumerate and print all the currency symbols, along // with any associated numeric values: - const char* re = + const char* re = "([[:Sc:]][[:Cf:][:Cc:][:Z*:]]*)?" "([[:Nd:]]+(?:[[:Po:]][[:Nd:]]+)?)?" "(?(1)" @@ -297,7 +297,7 @@ "[[:Sc:]]" ")"; boost::u32regex r = boost::make_u32regex(re); - boost::u32regex_token_iterator<std::string::const_iterator> + boost::u32regex_token_iterator<std::string::const_iterator> i(boost::make_u32regex_token_iterator(text, r, 1)), j; while(i != j) { diff --git a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_types.html b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_types.html index eea24198..34ca7a55 100644 --- a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_types.html +++ b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_types.html @@ -51,9 +51,9 @@ which allow regular expressions to be created from UTF-8, UTF-16, or UTF-32 encoded strings:
-template <class InputIterator> -u32regex make_u32regex(InputIterator i, - InputIterator j, +template <class InputIterator> +u32regex make_u32regex(InputIterator i, + InputIterator j, boost::regex_constants::syntax_option_type opt);@@ -62,24 +62,24 @@ sequence is determined based upon sizeof(*i): 1 implies UTF-8, 2 implies UTF-16, and 4 implies UTF-32.
-u32regex make_u32regex(const char* p, - boost::regex_constants::syntax_option_type opt +u32regex make_u32regex(const char* p, + boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl);Effects: Creates a regular expression object from the Null-terminated UTF-8 characater sequence p.
-u32regex make_u32regex(const unsigned char* p, - boost::regex_constants::syntax_option_type opt +u32regex make_u32regex(const unsigned char* p, + boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl);Effects: Creates a regular expression object from the Null-terminated UTF-8 characater sequence p.
-u32regex make_u32regex(const wchar_t* p, - boost::regex_constants::syntax_option_type opt +u32regex make_u32regex(const wchar_t* p, + boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl);@@ -88,8 +88,8 @@ encoding of the sequence is determined based upon sizeof(wchar_t): 1 implies UTF-8, 2 implies UTF-16, and 4 implies UTF-32.
-u32regex make_u32regex(const UChar* p, - boost::regex_constants::syntax_option_type opt +-u32regex make_u32regex(const UChar* p, + boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl);@@ -97,8 +97,8 @@ object from the Null-terminated UTF-16 characater sequence p.
template<class C, class T, class A> -u32regex make_u32regex(const std::basic_string<C, T, A>& s, - boost::regex_constants::syntax_option_type opt +u32regex make_u32regex(const std::basic_string<C, T, A>& s, + boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl);@@ -107,8 +107,8 @@ based upon sizeof(C): 1 implies UTF-8, 2 implies UTF-16, and 4 implies UTF-32.
-u32regex make_u32regex(const UnicodeString& s, - boost::regex_constants::syntax_option_type opt +-u32regex make_u32regex(const UnicodeString& s, + boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl);diff --git a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html index b36f6b3a..87b645ff 100644 --- a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html +++ b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html @@ -33,9 +33,9 @@ all look a lot more complex than they actually are, but for completeness here they are anyway:
-- - regex_match +
+ + regex_match
There are two overloads, the first reports what matched in a match_results @@ -49,10 +49,10 @@
template <class charT, class T, class A> bool regex_match( - const ATL::CSimpleStringT<charT>& s, - match_results<const B*, A>& what, - const basic_regex<charT, T>& e, - boost::regex_constants::match_flag_type f = boost::regex_constants::match_default); + const ATL::CSimpleStringT<charT>& s, + match_results<const B*, A>& what, + const basic_regex<charT, T>& e, + boost::regex_constants::match_flag_type f = boost::regex_constants::match_default);Effects: returns
::boost::regex_match(s.GetString(), @@ -81,9 +81,9 @@ } }
- - regex_match +
+ + regex_match (second overload)
template <class charT, class T> @@ -107,11 +107,11 @@ bool is_valid_password(const CString& password, const CString& requirements) { return boost::regex_match(password, boost::make_regex(requirements)); -} +}-- - regex_search +
+ + regex_search
There are two additional overloads for
regex_search
, the first reports @@ -146,11 +146,11 @@ { throw std::runtime_error("No postcode found"); } -} +}- - regex_search +
+ + regex_search (second overload)
template <class charT, class T> @@ -163,9 +163,9 @@ s.GetString() + s.GetLength(), e, f); --- - regex_replace +
+ + regex_replace
There are two additional overloads for
-regex_replace
, the first sends diff --git a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html index 8e06a688..370af74f 100644 --- a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html +++ b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html @@ -31,16 +31,16 @@ The following helper functions are provided to ease the conversion from an MFC/ATL string to aregex_iterator
orregex_token_iterator
:- - regex_iterator +
+ + regex_iterator creation helper
template <class charT> -regex_iterator<charT const*> +regex_iterator<charT const*> make_regex_iterator( - const ATL::CSimpleStringT<charT>& s, - const basic_regex<charT>& e, + const ATL::CSimpleStringT<charT>& s, + const basic_regex<charT>& e, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default);@@ -67,17 +67,17 @@ } }
- - regex_token_iterator +
+ + regex_token_iterator creation helpers
-template <class charT> -regex_token_iterator<charT const*> +template <class charT> +regex_token_iterator<charT const*> make_regex_token_iterator( - const ATL::CSimpleStringT<charT>& s, - const basic_regex<charT>& e, - int sub = 0, + const ATL::CSimpleStringT<charT>& s, + const basic_regex<charT>& e, + int sub = 0, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default);@@ -86,12 +86,12 @@ sub, f);
-template <class charT> -regex_token_iterator<charT const*> +template <class charT> +regex_token_iterator<charT const*> make_regex_token_iterator( - const ATL::CSimpleStringT<charT>& s, - const basic_regex<charT>& e, - const std::vector<int>& subs, + const ATL::CSimpleStringT<charT>& s, + const basic_regex<charT>& e, + const std::vector<int>& subs, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default);@@ -100,12 +100,12 @@ subs, f);
-template <class charT, std::size_t N> -regex_token_iterator<charT const*> +template <class charT, std::size_t N> +regex_token_iterator<charT const*> make_regex_token_iterator( - const ATL::CSimpleStringT<charT>& s, - const basic_regex<charT>& e, - const int (& subs)[N], + const ATL::CSimpleStringT<charT>& s, + const basic_regex<charT>& e, + const int (& subs)[N], ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default);@@ -131,7 +131,7 @@ std::cout << *i << std::endl; ++i; } -} +}
-
diff --git a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_create.html b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_create.html index efc0eaab..76589fc3 100644 --- a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_create.html +++ b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_create.html @@ -32,8 +32,8 @@ of a regular expression from an MFC/ATL string type: template <class charT> -basic_regex<charT> - make_regex(const ATL::CSimpleStringT<charT>& s, +basic_regex<charT> + make_regex(const ATL::CSimpleStringT<charT>& s, ::boost::regex_constants::syntax_option_type f = boost::regex_constants::normal);diff --git a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_types.html b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_types.html index 0ec2280e..30fc6a34 100644 --- a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_types.html +++ b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_types.html @@ -31,10 +31,10 @@ The following typedefs are provided for the convenience of those working with TCHAR's:
-typedef basic_regex<TCHAR> tregex; -typedef match_results<TCHAR const*> tmatch; -typedef regex_iterator<TCHAR const*> tregex_iterator; -typedef regex_token_iterator<TCHAR const*> tregex_token_iterator; +typedef basic_regex<TCHAR> tregex; +typedef match_results<TCHAR const*> tmatch; +typedef regex_iterator<TCHAR const*> tregex_iterator; +typedef regex_token_iterator<TCHAR const*> tregex_token_iterator;If you are working with explicitly narrow or wide characters rather than diff --git a/doc/html/boost_regex/ref/posix.html b/doc/html/boost_regex/ref/posix.html index 8a33185e..b9fdf3e8 100644 --- a/doc/html/boost_regex/ref/posix.html +++ b/doc/html/boost_regex/ref/posix.html @@ -162,9 +162,9 @@ upon the macro
UNICODE
.- - regcomp +
+ + regcomp
regcomp
takes a pointer to @@ -374,9 +374,9 @@- - regerror +
+ + regerror
regerror takes the following parameters, it maps an error code to a human @@ -460,9 +460,9 @@ equal to buf_size then regerror will have to be called again with a larger buffer.
-- - regexec +
+ + regexec
regexec finds the first occurrence of expression e within string buf. If @@ -528,9 +528,9 @@
- - regfree +
+ + regfree
-
regfree
frees all the memory diff --git a/doc/html/boost_regex/ref/regex_iterator.html b/doc/html/boost_regex/ref/regex_iterator.html index 15615091..b8c1b751 100644 --- a/doc/html/boost_regex/ref/regex_iterator.html +++ b/doc/html/boost_regex/ref/regex_iterator.html @@ -32,10 +32,10 @@regex_iterator
yields a reference to amatch_results
object.template <class BidirectionalIterator, +template <class BidirectionalIterator, class charT = iterator_traits<BidirectionalIterator>::value_type, class traits = regex_traits<charT> > -class regex_iterator +class regex_iterator { public: typedef basic_regex<charT, traits> regex_type; @@ -44,10 +44,10 @@ typedef const value_type* pointer; typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; - + regex_iterator(); - regex_iterator(BidirectionalIterator a, BidirectionalIterator b, - const regex_type& re, + regex_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type& re, match_flag_type m = match_default); regex_iterator(const regex_iterator&); regex_iterator& operator=(const regex_iterator&); @@ -59,27 +59,27 @@ regex_iterator operator++(int); }; -typedef regex_iterator<const char*> cregex_iterator; -typedef regex_iterator<std::string::const_iterator> sregex_iterator; +typedef regex_iterator<const char*> cregex_iterator; +typedef regex_iterator<std::string::const_iterator> sregex_iterator; #ifndef BOOST_NO_WREGEX -typedef regex_iterator<const wchar_t*> wcregex_iterator; -typedef regex_iterator<std::wstring::const_iterator> wsregex_iterator; -#endif +typedef regex_iterator<const wchar_t*> wcregex_iterator; +typedef regex_iterator<std::wstring::const_iterator> wsregex_iterator; +#endif -template <class charT, class traits> regex_iterator<const charT*, charT, traits> - make_regex_iterator(const charT* p, const basic_regex<charT, traits>& e, - regex_constants::match_flag_type m = regex_constants::match_default); - -template <class charT, class traits, class ST, class SA> - regex_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> - make_regex_iterator(const std::basic_string<charT, ST, SA>& p, - const basic_regex<charT, traits>& e, +template <class charT, class traits> regex_iterator<const charT*, charT, traits> + make_regex_iterator(const charT* p, const basic_regex<charT, traits>& e, + regex_constants::match_flag_type m = regex_constants::match_default); + +template <class charT, class traits, class ST, class SA> + regex_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> + make_regex_iterator(const std::basic_string<charT, ST, SA>& p, + const basic_regex<charT, traits>& e, regex_constants::match_flag_type m = regex_constants::match_default);-- - Description +
+ + Description
A
-regex_iterator
@@ -92,8 +92,8 @@ Effects: constructs an end of sequenceregex_iterator
.regex_iterator(BidirectionalIterator a, BidirectionalIterator b, - const regex_type& re, +regex_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type& re, match_flag_type m = match_default);@@ -397,15 +397,15 @@
Returns: result.
-template <class charT, class traits> +template <class charT, class traits> regex_iterator<const charT*, charT, traits> - make_regex_iterator(const charT* p, const basic_regex<charT, traits>& e, - regex_constants::match_flag_type m = regex_constants::match_default); - -template <class charT, class traits, class ST, class SA> -regex_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> - make_regex_iterator(const std::basic_string<charT, ST, SA>& p, - const basic_regex<charT, traits>& e, + make_regex_iterator(const charT* p, const basic_regex<charT, traits>& e, + regex_constants::match_flag_type m = regex_constants::match_default); + +template <class charT, class traits, class ST, class SA> +regex_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> + make_regex_iterator(const std::basic_string<charT, ST, SA>& p, + const basic_regex<charT, traits>& e, regex_constants::match_flag_type m = regex_constants::match_default);@@ -414,9 +414,9 @@ using
-match_flag_type
m.- - Examples +
+ + Examples
The following example takes a C++ source file and builds up an index of class @@ -437,13 +437,13 @@ typedef std::map<std::string, std::string::difference_type, std::less<std::string> > map_type; -const char* re = +const char* re = // possibly leading whitespace: - "^[[:space:]]*" + "^[[:space:]]*" // possible template declaration: "(template[[:space:]]*<[^;:{]+>[[:space:]]*)?" // class or struct: - "(class|struct)[[:space:]]*" + "(class|struct)[[:space:]]*" // leading declspec macros etc: "(" "\\<\\w+\\>" @@ -451,9 +451,9 @@ "[[:blank:]]*\\([^)]*\\)" ")?" "[[:space:]]*" - ")*" + ")*" // the class name - "(\\<\\w*\\>)[[:space:]]*" + "(\\<\\w*\\>)[[:space:]]*" // template specialisation parameters "(<[^;:{]+>)?[[:space:]]*" // terminate in { or : diff --git a/doc/html/boost_regex/ref/regex_match.html b/doc/html/boost_regex/ref/regex_match.html index 62628f3b..0c1cb68a 100644 --- a/doc/html/boost_regex/ref/regex_match.html +++ b/doc/html/boost_regex/ref/regex_match.html @@ -26,7 +26,7 @@
-#include <boost/regex.hpp> +-#include <boost/regex.hpp>The algorithm
regex_match
@@ -51,37 +51,37 @@ bool regex_match(BidirectionalIterator first, BidirectionalIterator last, match_results<BidirectionalIterator, Allocator>& m, const basic_regex <charT, traits>& e, - match_flag_type flags = match_default); + match_flag_type flags = match_default); template <class BidirectionalIterator, class charT, class traits> bool regex_match(BidirectionalIterator first, BidirectionalIterator last, const basic_regex <charT, traits>& e, - match_flag_type flags = match_default); + match_flag_type flags = match_default); template <class charT, class Allocator, class traits> bool regex_match(const charT* str, match_results<const charT*, Allocator>& m, const basic_regex <charT, traits>& e, - match_flag_type flags = match_default); + match_flag_type flags = match_default); template <class ST, class SA, class Allocator, class charT, class traits> bool regex_match(const basic_string<charT, ST, SA>& s, - match_results<typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m, - const basic_regex <charT, traits>& e, - match_flag_type flags = match_default); + match_results<typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m, + const basic_regex <charT, traits>& e, + match_flag_type flags = match_default); template <class charT, class traits> bool regex_match(const charT* str, const basic_regex <charT, traits>& e, - match_flag_type flags = match_default); + match_flag_type flags = match_default); template <class ST, class SA, class charT, class traits> bool regex_match(const basic_string<charT, ST, SA>& s, const basic_regex <charT, traits>& e, match_flag_type flags = match_default);- - Description +
+ + Description
template <class BidirectionalIterator, class Allocator, class charT, class traits> bool regex_match(BidirectionalIterator first, BidirectionalIterator last, @@ -335,8 +335,8 @@template <class ST, class SA, class Allocator, class charT, class traits> bool regex_match(const basic_string<charT, ST, SA>& s, - match_results<typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m, - const basic_regex <charT, traits>& e, + match_results<typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m, + const basic_regex <charT, traits>& e, match_flag_type flags = match_default);@@ -360,42 +360,42 @@
Effects: Returns the result of
-regex_match(s.begin(), s.end(), e, flags)
.- - Examples +
+ + Examples
The following example processes an ftp response:
-#include <stdlib.h> -#include <boost/regex.hpp> -#include <string> -#include <iostream> +#include <stdlib.h> +#include <boost/regex.hpp> +#include <string> +#include <iostream> -using namespace boost; +using namespace boost; -regex expression("([0-9]+)(\\-| |$)(.*)"); +regex expression("([0-9]+)(\\-| |$)(.*)"); // process_ftp: // on success returns the ftp response code, and fills // msg with the ftp response message. -int process_ftp(const char* response, std::string* msg) -{ - cmatch what; - if(regex_match(response, what, expression)) - { +int process_ftp(const char* response, std::string* msg) +{ + cmatch what; + if(regex_match(response, what, expression)) + { // what[0] contains the whole string // what[1] contains the response code // what[2] contains the separator character // what[3] contains the text message. - if(msg) - msg->assign(what[3].first, what[3].second); - return std::atoi(what[1].first); - } + if(msg) + msg->assign(what[3].first, what[3].second); + return std::atoi(what[1].first); + } // failure did not match - if(msg) - msg->erase(); - return -1; + if(msg) + msg->erase(); + return -1; }#include <boost/regex.hpp> +-#include <boost/regex.hpp>The algorithm
regex_replace
searches through a @@ -52,9 +52,9 @@ Formatter fmt, match_flag_type flags = match_default);- - Description +
+ + Description
template <class OutputIterator, class BidirectionalIterator, class traits, class Formatter> OutputIterator regex_replace(OutputIterator out, @@ -109,8 +109,8 @@Effects: Constructs an
-regex_iterator
object:regex_iterator<BidirectionalIterator, charT, traits, Allocator> - i(first, last, e, flags), +regex_iterator<BidirectionalIterator, charT, traits, Allocator> + i(first, last, e, flags),and uses i to enumerate through all of the matches @@ -120,37 +120,37 @@
If no such matches are found and
-!(flags & format_no_copy) +!(flags & format_no_copy)then calls
-std::copy(first, last, out). +std::copy(first, last, out).Otherwise, for each match found, if
-!(flags & format_no_copy) +!(flags & format_no_copy)calls
-std::copy(m.prefix().first, m.prefix().last, out), +std::copy(m.prefix().first, m.prefix().last, out),and then calls
-m.format(out, fmt, flags). +m.format(out, fmt, flags).Finally if
-!(flags & format_no_copy) +!(flags & format_no_copy)calls
-std::copy(last_m.suffix().first, last_m,suffix().last, out) +std::copy(last_m.suffix().first, last_m,suffix().last, out)where last_m is a copy of the last match found. @@ -198,9 +198,9 @@ flags), and then returns
-result
.- - Examples +
+ + Examples
The following example takes C/C++ source code as input, and outputs syntax @@ -277,7 +277,7 @@ extern const char* pre_format = "(?1<)(?2>)(?3&)"; -const char* expression_text = +const char* expression_text = // preprocessor directives: index 1 "(^[[:blank:]]*#(?:[^\\\\\\n]|\\\\[^\\n[:punct:][:word:]]*[\\n[:punct:][:word:]])*)|" // comment: index 2 @@ -305,7 +305,7 @@ "(?4<font color=\"#0000FF\">$&</font>)" "(?5<B>$&</B>)"; -const char* header_text = +const char* header_text = "<HTML>\n<HEAD>\n" "<TITLE>Auto-generated html formated source</TITLE>\n" "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=windows-1252\">\n" diff --git a/doc/html/boost_regex/ref/regex_search.html b/doc/html/boost_regex/ref/regex_search.html index 21ff4f50..a4186b4c 100644 --- a/doc/html/boost_regex/ref/regex_search.html +++ b/doc/html/boost_regex/ref/regex_search.html @@ -26,7 +26,7 @@
-#include <boost/regex.hpp> +#include <boost/regex.hpp>The algorithm
-regex_search
will search a range @@ -35,46 +35,46 @@ for a match if a match could conceivably start at that position. The algorithm is defined as follows:template <class BidirectionalIterator, +template <class BidirectionalIterator, class Allocator, class charT, class traits> bool regex_search(BidirectionalIterator first, BidirectionalIterator last, match_results<BidirectionalIterator, Allocator>& m, const basic_regex<charT, traits>& e, match_flag_type flags = match_default); - -template <class ST, class SA, - class Allocator, class charT, class traits> -bool regex_search(const basic_string<charT, ST, SA>& s, + +template <class ST, class SA, + class Allocator, class charT, class traits> +bool regex_search(const basic_string<charT, ST, SA>& s, match_results< - typename basic_string<charT, ST,SA>::const_iterator, - Allocator>& m, - const basic_regex<charT, traits>& e, - match_flag_type flags = match_default); - -template<class charT, class Allocator, class traits> -bool regex_search(const charT* str, - match_results<const charT*, Allocator>& m, + typename basic_string<charT, ST,SA>::const_iterator, + Allocator>& m, const basic_regex<charT, traits>& e, match_flag_type flags = match_default); - -template <class BidirectionalIterator, class charT, class traits> -bool regex_search(BidirectionalIterator first, BidirectionalIterator last, - const basic_regex<charT, traits>& e, - match_flag_type flags = match_default); - -template <class charT, class traits> -bool regex_search(const charT* str, - const basic_regex<charT, traits>& e, - match_flag_type flags = match_default); - + +template<class charT, class Allocator, class traits> +bool regex_search(const charT* str, + match_results<const charT*, Allocator>& m, + const basic_regex<charT, traits>& e, + match_flag_type flags = match_default); + +template <class BidirectionalIterator, class charT, class traits> +bool regex_search(BidirectionalIterator first, BidirectionalIterator last, + const basic_regex<charT, traits>& e, + match_flag_type flags = match_default); + +template <class charT, class traits> +bool regex_search(const charT* str, + const basic_regex<charT, traits>& e, + match_flag_type flags = match_default); + template<class ST, class SA, class charT, class traits> bool regex_search(const basic_string<charT, ST, SA>& s, const basic_regex<charT, traits>& e, match_flag_type flags = match_default);-- - Description +
+ + Description
template <class BidirectionalIterator, class Allocator, class charT, class traits> bool regex_search(BidirectionalIterator first, BidirectionalIterator last, @@ -356,9 +356,9 @@Effects: Returns the result of
-regex_search(s.begin(), s.end(), e, flags)
.- - Examples +
+ + Examples
The following example, takes the contents of a file in the form of a string, @@ -367,45 +367,45 @@ is implemented, for example it could easily be modified to work with the SGI rope class, which uses a non-contiguous storage strategy.
-#include <string> -#include <map> -#include <boost/regex.hpp> +#include <string> +#include <map> +#include <boost/regex.hpp> // purpose: // takes the contents of a file in the form of a string // and searches for all the C++ class definitions, storing // their locations in a map of strings/int's -typedef std::map<std::string, int, std::less<std::string> > map_type; +typedef std::map<std::string, int, std::less<std::string> > map_type; boost::regex expression( "^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?" "(class|struct)[[:space:]]*" "(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?" "[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*" - "(<[^;:{]+>[[:space:]]*)?(\\{|:[^;\\{()]*\\{)"); + "(<[^;:{]+>[[:space:]]*)?(\\{|:[^;\\{()]*\\{)"); -void IndexClasses(map_type& m, const std::string& file) -{ - std::string::const_iterator start, end; - start = file.begin(); - end = file.end(); - boost::match_results<std::string::const_iterator> what; - boost::match_flag_type flags = boost::match_default; - while(regex_search(start, end, what, expression, flags)) - { +void IndexClasses(map_type& m, const std::string& file) +{ + std::string::const_iterator start, end; + start = file.begin(); + end = file.end(); + boost::match_results<std::string::const_iterator> what; + boost::match_flag_type flags = boost::match_default; + while(regex_search(start, end, what, expression, flags)) + { // what[0] contains the whole string // what[5] contains the class name. // what[6] contains the template specialisation if any. // add class name and position to map: - m[std::string(what[5].first, what[5].second) - + std::string(what[6].first, what[6].second)] - = what[5].first - file.begin(); + m[std::string(what[5].first, what[5].second) + + std::string(what[6].first, what[6].second)] + = what[5].first - file.begin(); // update search position: - start = what[0].second; + start = what[0].second; // update flags: - flags |= boost::match_prev_avail; - flags |= boost::match_not_bob; - } + flags |= boost::match_prev_avail; + flags |= boost::match_not_bob; + } }diff --git a/doc/html/boost_regex/ref/regex_token_iterator.html b/doc/html/boost_regex/ref/regex_token_iterator.html index 910cc0d7..fd2f5778 100644 --- a/doc/html/boost_regex/ref/regex_token_iterator.html +++ b/doc/html/boost_regex/ref/regex_token_iterator.html @@ -39,10 +39,10 @@ each section of the character container sequence that does not match the regular expression specified. -template <class BidirectionalIterator, +template <class BidirectionalIterator, class charT = iterator_traits<BidirectionalIterator>::value_type, class traits = regex_traits<charT> > -class regex_token_iterator +class regex_token_iterator { public: typedef basic_regex<charT, traits> regex_type; @@ -51,23 +51,23 @@ typedef const value_type* pointer; typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; - + regex_token_iterator(); - regex_token_iterator(BidirectionalIterator a, - BidirectionalIterator b, - const regex_type& re, - int submatch = 0, + regex_token_iterator(BidirectionalIterator a, + BidirectionalIterator b, + const regex_type& re, + int submatch = 0, match_flag_type m = match_default); - regex_token_iterator(BidirectionalIterator a, - BidirectionalIterator b, - const regex_type& re, - const std::vector<int>& submatches, + regex_token_iterator(BidirectionalIterator a, + BidirectionalIterator b, + const regex_type& re, + const std::vector<int>& submatches, match_flag_type m = match_default); template <std::size_t N> - regex_token_iterator(BidirectionalIterator a, - BidirectionalIterator b, - const regex_type& re, - const int (&submatches)[N], + regex_token_iterator(BidirectionalIterator a, + BidirectionalIterator b, + const regex_type& re, + const int (&submatches)[N], match_flag_type m = match_default); regex_token_iterator(const regex_token_iterator&); regex_token_iterator& operator=(const regex_token_iterator&); @@ -87,67 +87,67 @@ #endif template <class charT, class traits> -regex_token_iterator<const charT*, charT, traits> +regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator( - const charT* p, - const basic_regex<charT, traits>& e, - int submatch = 0, + 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> +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, + 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> +regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator( - const charT* p, - const basic_regex<charT, traits>& e, - const int (&submatch)[N], + 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> +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], + 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> +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, + 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> + 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, + 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);-- - Description +
+ + Description
regex_token_iterator();Effects: constructs an end of sequence iterator.
-regex_token_iterator(BidirectionalIterator a, - BidirectionalIterator b, - const regex_type& re, - int submatch = 0, +-regex_token_iterator(BidirectionalIterator a, + BidirectionalIterator b, + const regex_type& re, + int submatch = 0, match_flag_type m = match_default);@@ -172,10 +172,10 @@ matcher exhausts its permitted memory allocation (if Boost.Regex is configured in non-recursive mode).
-regex_token_iterator(BidirectionalIterator a, - BidirectionalIterator b, - const regex_type& re, - const std::vector<int>& submatches, +-regex_token_iterator(BidirectionalIterator a, + BidirectionalIterator b, + const regex_type& re, + const std::vector<int>& submatches, match_flag_type m = match_default);@@ -205,10 +205,10 @@ in non-recursive mode).
template <std::size_t N> -regex_token_iterator(BidirectionalIterator a, - BidirectionalIterator b, - const regex_type& re, - const int (&submatches)[R], +regex_token_iterator(BidirectionalIterator a, + BidirectionalIterator b, + const regex_type& re, + const int (&submatches)[R], match_flag_type m = match_default);@@ -299,53 +299,53 @@ Returns: result.
template <class charT, class traits> -regex_token_iterator<const charT*, charT, traits> +regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator( - const charT* p, - const basic_regex<charT, traits>& e, - int submatch = 0, + 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> +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, + 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> +regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator( - const charT* p, - const basic_regex<charT, traits>& e, - const int (&submatch)[N], + 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> + 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], + 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> +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, + 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> + 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, + 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);@@ -356,9 +356,9 @@ using
-match_flag_type
m.- - Examples +
+ + Examples
The following example takes a string and splits it into a series of tokens: diff --git a/doc/html/boost_regex/ref/regex_traits.html b/doc/html/boost_regex/ref/regex_traits.html index e3ce3b68..7b7843b3 100644 --- a/doc/html/boost_regex/ref/regex_traits.html +++ b/doc/html/boost_regex/ref/regex_traits.html @@ -45,9 +45,9 @@ } // namespace boost
- - Description +
+ + Description
The class
regex_traits
is diff --git a/doc/html/boost_regex/ref/sub_match.html b/doc/html/boost_regex/ref/sub_match.html index 4082ed41..d6685509 100644 --- a/doc/html/boost_regex/ref/sub_match.html +++ b/doc/html/boost_regex/ref/sub_match.html @@ -139,182 +139,182 @@ // // comparisons to a basic_string: // -template <class BidirectionalIterator, class traits, class Allocator> -bool operator == (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, +template <class BidirectionalIterator, class traits, class Allocator> +bool operator == (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& lhs, const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator, class traits, class Allocator> -bool operator != (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, +template <class BidirectionalIterator, class traits, class Allocator> +bool operator != (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& lhs, const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator, class traits, class Allocator> -bool operator < (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, +template <class BidirectionalIterator, class traits, class Allocator> +bool operator < (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& lhs, const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator, class traits, class Allocator> -bool operator > (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, +template <class BidirectionalIterator, class traits, class Allocator> +bool operator > (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& lhs, const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator, class traits, class Allocator> -bool operator >= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, +template <class BidirectionalIterator, class traits, class Allocator> +bool operator >= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& lhs, const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator, class traits, class Allocator> -bool operator <= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, +template <class BidirectionalIterator, class traits, class Allocator> +bool operator <= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& lhs, const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator, class traits, class Allocator> +template <class BidirectionalIterator, class traits, class Allocator> bool operator == (const sub_match<BidirectionalIterator>& lhs, - const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, + const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& rhs); -template <class BidirectionalIterator, class traits, class Allocator> +template <class BidirectionalIterator, class traits, class Allocator> bool operator != (const sub_match<BidirectionalIterator>& lhs, - const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, + const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& rhs); -template <class BidirectionalIterator, class traits, class Allocator> +template <class BidirectionalIterator, class traits, class Allocator> bool operator < (const sub_match<BidirectionalIterator>& lhs, - const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, + const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& rhs); -template <class BidirectionalIterator, class traits, class Allocator> +template <class BidirectionalIterator, class traits, class Allocator> bool operator > (const sub_match<BidirectionalIterator>& lhs, - const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, + const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& rhs); -template <class BidirectionalIterator, class traits, class Allocator> +template <class BidirectionalIterator, class traits, class Allocator> bool operator >= (const sub_match<BidirectionalIterator>& lhs, - const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, + const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& rhs); -template <class BidirectionalIterator, class traits, class Allocator> +template <class BidirectionalIterator, class traits, class Allocator> bool operator <= (const sub_match<BidirectionalIterator>& lhs, - const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, + const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& rhs); // // comparisons to a pointer to a character array: // -template <class BidirectionalIterator> -bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, - const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator> -bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, - const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator> -bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, - const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator> -bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, - const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator> -bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, - const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator> -bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, - const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, + const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, + const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, + const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, + const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, + const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, + const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator> -bool operator == (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const* rhs); -template <class BidirectionalIterator> -bool operator != (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const* rhs); -template <class BidirectionalIterator> -bool operator < (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const* rhs); -template <class BidirectionalIterator> -bool operator > (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const* rhs); -template <class BidirectionalIterator> -bool operator >= (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const* rhs); -template <class BidirectionalIterator> -bool operator <= (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const* rhs); +template <class BidirectionalIterator> +bool operator == (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const* rhs); +template <class BidirectionalIterator> +bool operator != (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const* rhs); +template <class BidirectionalIterator> +bool operator < (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const* rhs); +template <class BidirectionalIterator> +bool operator > (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const* rhs); +template <class BidirectionalIterator> +bool operator >= (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const* rhs); +template <class BidirectionalIterator> +bool operator <= (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const* rhs); // // comparisons to a single character: // -template <class BidirectionalIterator> -bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, - const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator> -bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, - const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator> -bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, - const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator> -bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, - const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator> -bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, - const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator> -bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, - const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, + const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, + const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, + const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, + const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, + const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, + const sub_match<BidirectionalIterator>& rhs); -template <class BidirectionalIterator> -bool operator == (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const& rhs); -template <class BidirectionalIterator> -bool operator != (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const& rhs); -template <class BidirectionalIterator> -bool operator < (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const& rhs); -template <class BidirectionalIterator> -bool operator > (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const& rhs); -template <class BidirectionalIterator> -bool operator >= (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const& rhs); -template <class BidirectionalIterator> -bool operator <= (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const& rhs); +template <class BidirectionalIterator> +bool operator == (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const& rhs); +template <class BidirectionalIterator> +bool operator != (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const& rhs); +template <class BidirectionalIterator> +bool operator < (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const& rhs); +template <class BidirectionalIterator> +bool operator > (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const& rhs); +template <class BidirectionalIterator> +bool operator >= (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const& rhs); +template <class BidirectionalIterator> +bool operator <= (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const& rhs); // // addition operators: // -template <class BidirectionalIterator, class traits, class Allocator> -std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, traits, Allocator> - operator + (const std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, - traits, - Allocator>& s, - const sub_match<BidirectionalIterator>& m); -template <class BidirectionalIterator, class traits, class Allocator> +template <class BidirectionalIterator, class traits, class Allocator> std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, traits, Allocator> - operator + (const sub_match<BidirectionalIterator>& m, - const std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, - traits, - Allocator>& s); -template <class BidirectionalIterator> -std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> - operator + (typename iterator_traits<BidirectionalIterator>::value_type const* s, - const sub_match<BidirectionalIterator>& m); -template <class BidirectionalIterator> -std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> - operator + (const sub_match<BidirectionalIterator>& m, + operator + (const std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, + traits, + Allocator>& s, + const sub_match<BidirectionalIterator>& m); +template <class BidirectionalIterator, class traits, class Allocator> +std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, traits, Allocator> + operator + (const sub_match<BidirectionalIterator>& m, + const std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, + traits, + Allocator>& s); +template <class BidirectionalIterator> +std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> + operator + (typename iterator_traits<BidirectionalIterator>::value_type const* s, + const sub_match<BidirectionalIterator>& m); +template <class BidirectionalIterator> +std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> + operator + (const sub_match<BidirectionalIterator>& m, typename iterator_traits<BidirectionalIterator>::value_type const * s); -template <class BidirectionalIterator> -std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> - operator + (typename iterator_traits<BidirectionalIterator>::value_type const& s, - const sub_match<BidirectionalIterator>& m); -template <class BidirectionalIterator> -std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> - operator + (const sub_match<BidirectionalIterator>& m, - typename iterator_traits<BidirectionalIterator>::value_type const& s); -template <class BidirectionalIterator> -std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> +template <class BidirectionalIterator> +std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> + operator + (typename iterator_traits<BidirectionalIterator>::value_type const& s, + const sub_match<BidirectionalIterator>& m); +template <class BidirectionalIterator> +std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> + operator + (const sub_match<BidirectionalIterator>& m, + typename iterator_traits<BidirectionalIterator>::value_type const& s); +template <class BidirectionalIterator> +std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> operator + (const sub_match<BidirectionalIterator>& m1, const sub_match<BidirectionalIterator>& m2); @@ -328,13 +328,13 @@ } // namespace boost- - Description +
+ + Description
-- - Members +
+ + Members
typedef typename std::iterator_traits<iterator>::value_type value_type;@@ -412,7 +412,7 @@ whose value_type is asub_match<BidirectionalIterator>
. This type happens to bestd::vector<sub_match<BidirectionalIterator> >
, but you shouldn't actually rely on that. -const capture_sequence_type& captures()const; +const capture_sequence_type& captures()const;Effects: returns a sequence containing all @@ -445,9 +445,9 @@ to take place. -
- - sub_match +
+ + sub_match non-member operators
template <class BidirectionalIterator> @@ -498,19 +498,19 @@ Effects: returnslhs.compare(rhs) > 0
. -template <class BidirectionalIterator, class traits, class Allocator> -bool operator == (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, +template <class BidirectionalIterator, class traits, class Allocator> +bool operator == (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, - Allocator>& lhs, + Allocator>& lhs, const sub_match<BidirectionalIterator>& rhs);Effects: returns
-lhs == rhs.str()
.template <class BidirectionalIterator, class traits, class Allocator> -bool operator != (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, +template <class BidirectionalIterator, class traits, class Allocator> +bool operator != (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& lhs, const sub_match<BidirectionalIterator>& rhs);@@ -518,9 +518,9 @@ Effects: returnslhs != rhs.str()
. -template <class BidirectionalIterator, class traits, class Allocator> -bool operator < (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, +template <class BidirectionalIterator, class traits, class Allocator> +bool operator < (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& lhs, const sub_match<BidirectionalIterator>& rhs);@@ -528,9 +528,9 @@ Effects: returnslhs < rhs.str()
. -template <class BidirectionalIterator, class traits, class Allocator> -bool operator > (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, +template <class BidirectionalIterator, class traits, class Allocator> +bool operator > (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& lhs, const sub_match<BidirectionalIterator>& rhs);@@ -538,9 +538,9 @@ Effects: returnslhs > rhs.str()
. -template <class BidirectionalIterator, class traits, class Allocator> -bool operator >= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, +template <class BidirectionalIterator, class traits, class Allocator> +bool operator >= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& lhs, const sub_match<BidirectionalIterator>& rhs);@@ -548,9 +548,9 @@ Effects: returnslhs >= rhs.str()
. -template <class BidirectionalIterator, class traits, class Allocator> -bool operator <= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, +template <class BidirectionalIterator, class traits, class Allocator> +bool operator <= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& lhs, const sub_match<BidirectionalIterator>& rhs);@@ -558,253 +558,253 @@ Effects: returnslhs <= rhs.str()
. -template <class BidirectionalIterator, class traits, class Allocator> +template <class BidirectionalIterator, class traits, class Allocator> bool operator == (const sub_match<BidirectionalIterator>& lhs, - const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, + const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& rhs);Effects: returns
-lhs.str() == rhs
.template <class BidirectionalIterator, class traits, class Allocator> +template <class BidirectionalIterator, class traits, class Allocator> bool operator != (const sub_match<BidirectionalIterator>& lhs, - const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, + const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& rhs);Effects: returns
-lhs.str() != rhs
.template <class BidirectionalIterator, class traits, class Allocator> +template <class BidirectionalIterator, class traits, class Allocator> bool operator < (const sub_match<BidirectionalIterator>& lhs, - const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, + const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& rhs);Effects: returns
-lhs.str() < rhs
.template <class BidirectionalIterator, class traits, class Allocator> +template <class BidirectionalIterator, class traits, class Allocator> bool operator > (const sub_match<BidirectionalIterator>& lhs, - const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, + const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& rhs);Effects: returns
-lhs.str() > rhs
.template <class BidirectionalIterator, class traits, class Allocator> +template <class BidirectionalIterator, class traits, class Allocator> bool operator >= (const sub_match<BidirectionalIterator>& lhs, - const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, + const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& rhs);Effects: returns
-lhs.str() >= rhs
.template <class BidirectionalIterator, class traits, class Allocator> +template <class BidirectionalIterator, class traits, class Allocator> bool operator <= (const sub_match<BidirectionalIterator>& lhs, - const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, - traits, + const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, + traits, Allocator>& rhs);Effects: returns
-lhs.str() <= rhs
.template <class BidirectionalIterator> -bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, - const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, + const sub_match<BidirectionalIterator>& rhs);Effects: returns
-lhs == rhs.str()
.template <class BidirectionalIterator> -bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, - const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, + const sub_match<BidirectionalIterator>& rhs);Effects: returns
-lhs != rhs.str()
.template <class BidirectionalIterator> -bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, - const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, + const sub_match<BidirectionalIterator>& rhs);Effects: returns
-lhs < rhs.str()
.template <class BidirectionalIterator> -bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, - const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, + const sub_match<BidirectionalIterator>& rhs);Effects: returns
-lhs > rhs.str()
.template <class BidirectionalIterator> -bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, - const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, + const sub_match<BidirectionalIterator>& rhs);Effects: returns
-lhs >= rhs.str()
.template <class BidirectionalIterator> -bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, - const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, + const sub_match<BidirectionalIterator>& rhs);Effects: returns
-lhs <= rhs.str()
.template <class BidirectionalIterator> -bool operator == (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const* rhs); +template <class BidirectionalIterator> +bool operator == (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const* rhs);Effects: returns
-lhs.str() == rhs
.template <class BidirectionalIterator> -bool operator != (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const* rhs); +template <class BidirectionalIterator> +bool operator != (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const* rhs);Effects: returns
-lhs.str() != rhs
.template <class BidirectionalIterator> -bool operator < (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const* rhs); +template <class BidirectionalIterator> +bool operator < (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const* rhs);Effects: returns
-lhs.str() < rhs
.template <class BidirectionalIterator> -bool operator > (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const* rhs); +template <class BidirectionalIterator> +bool operator > (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const* rhs);Effects: returns
-lhs.str() > rhs
.template <class BidirectionalIterator> -bool operator >= (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const* rhs); +template <class BidirectionalIterator> +bool operator >= (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const* rhs);Effects: returns
-lhs.str() >= rhs
.template <class BidirectionalIterator> -bool operator <= (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const* rhs); +template <class BidirectionalIterator> +bool operator <= (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const* rhs);Effects: returns
-lhs.str() <= rhs
.template <class BidirectionalIterator> -bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, - const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, + const sub_match<BidirectionalIterator>& rhs);Effects: returns
-lhs == rhs.str()
.template <class BidirectionalIterator> -bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, - const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, + const sub_match<BidirectionalIterator>& rhs);Effects: returns
-lhs != rhs.str()
.template <class BidirectionalIterator> -bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, - const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, + const sub_match<BidirectionalIterator>& rhs);Effects: returns
-lhs < rhs.str()
.template <class BidirectionalIterator> -bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, - const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, + const sub_match<BidirectionalIterator>& rhs);Effects: returns
-lhs > rhs.str()
.template <class BidirectionalIterator> -bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, - const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, + const sub_match<BidirectionalIterator>& rhs);Effects: returns
-lhs >= rhs.str()
.template <class BidirectionalIterator> -bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, - const sub_match<BidirectionalIterator>& rhs); +template <class BidirectionalIterator> +bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, + const sub_match<BidirectionalIterator>& rhs);Effects: returns
-lhs <= rhs.str()
.template <class BidirectionalIterator> -bool operator == (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const& rhs); +template <class BidirectionalIterator> +bool operator == (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const& rhs);Effects: returns
-lhs.str() == rhs
.template <class BidirectionalIterator> -bool operator != (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const& rhs); +template <class BidirectionalIterator> +bool operator != (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const& rhs);Effects: returns
-lhs.str() != rhs
.template <class BidirectionalIterator> -bool operator < (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const& rhs); +template <class BidirectionalIterator> +bool operator < (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const& rhs);Effects: returns
-lhs.str() < rhs
.template <class BidirectionalIterator> -bool operator > (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const& rhs); +template <class BidirectionalIterator> +bool operator > (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const& rhs);Effects: returns
-lhs.str() > rhs
.template <class BidirectionalIterator> -bool operator >= (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const& rhs); +template <class BidirectionalIterator> +bool operator >= (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const& rhs);Effects: returns
-lhs.str() >= rhs
.template <class BidirectionalIterator> -bool operator <= (const sub_match<BidirectionalIterator>& lhs, - typename iterator_traits<BidirectionalIterator>::value_type const& rhs); +template <class BidirectionalIterator> +bool operator <= (const sub_match<BidirectionalIterator>& lhs, + typename iterator_traits<BidirectionalIterator>::value_type const& rhs);Effects: returns
-lhs.str() @@ -815,66 +815,66 @@ to any type to which you can add a
std::string
and obtain a new string as the result.template <class BidirectionalIterator, class traits, class Allocator> -std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, traits, Allocator> - operator + (const std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, - traits, - Allocator>& s, - const sub_match<BidirectionalIterator>& m); +template <class BidirectionalIterator, class traits, class Allocator> +std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, traits, Allocator> + operator + (const std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, + traits, + Allocator>& s, + const sub_match<BidirectionalIterator>& m);Effects: returns
-s + m.str()
.template <class BidirectionalIterator, class traits, class Allocator> +template <class BidirectionalIterator, class traits, class Allocator> std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, traits, Allocator> - operator + (const sub_match<BidirectionalIterator>& m, - const std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, - traits, - Allocator>& s); + operator + (const sub_match<BidirectionalIterator>& m, + const std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, + traits, + Allocator>& s);Effects: returns
-m.str() + s
.template <class BidirectionalIterator> -std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> - operator + (typename iterator_traits<BidirectionalIterator>::value_type const* s, - const sub_match<BidirectionalIterator>& m); +template <class BidirectionalIterator> +std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> + operator + (typename iterator_traits<BidirectionalIterator>::value_type const* s, + const sub_match<BidirectionalIterator>& m);Effects: returns
-s + m.str()
.template <class BidirectionalIterator> -std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> - operator + (const sub_match<BidirectionalIterator>& m, +template <class BidirectionalIterator> +std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> + operator + (const sub_match<BidirectionalIterator>& m, typename iterator_traits<BidirectionalIterator>::value_type const * s);Effects: returns
-m.str() + s
.template <class BidirectionalIterator> -std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> - operator + (typename iterator_traits<BidirectionalIterator>::value_type const& s, - const sub_match<BidirectionalIterator>& m); +template <class BidirectionalIterator> +std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> + operator + (typename iterator_traits<BidirectionalIterator>::value_type const& s, + const sub_match<BidirectionalIterator>& m);Effects: returns
-s + m.str()
.template <class BidirectionalIterator> -std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> - operator + (const sub_match<BidirectionalIterator>& m, - typename iterator_traits<BidirectionalIterator>::value_type const& s); +template <class BidirectionalIterator> +std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> + operator + (const sub_match<BidirectionalIterator>& m, + typename iterator_traits<BidirectionalIterator>::value_type const& s);Effects: returns
-m.str() + s
.template <class BidirectionalIterator> -std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> +template <class BidirectionalIterator> +std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> operator + (const sub_match<BidirectionalIterator>& m1, const sub_match<BidirectionalIterator>& m2);@@ -882,9 +882,10 @@ Effects: returnsm1.str() + m2.str()
. -- - Stream inserter +
+ + Stream + inserter
template <class charT, class traits, class BidirectionalIterator> basic_ostream<charT, traits>& diff --git a/doc/html/boost_regex/syntax/basic_extended.html b/doc/html/boost_regex/syntax/basic_extended.html index 2f763d7c..a835f57d 100644 --- a/doc/html/boost_regex/syntax/basic_extended.html +++ b/doc/html/boost_regex/syntax/basic_extended.html @@ -27,9 +27,9 @@ POSIX Extended Regular Expression Syntax --- - Synopsis +
+ + Synopsis
The POSIX-Extended regular expression syntax is supported by the POSIX C @@ -43,19 +43,19 @@ // e2 a case insensitive POSIX-Extended expression: boost::regex e2(my_expression, boost::regex::extended|boost::regex::icase);
- - POSIX - Extended Syntax +
+ + POSIX Extended + Syntax
In POSIX-Extended regular expressions, all characters match themselves except for the following special characters:
.[{}()\*+?|^$-- - Wildcard: +
+ + Wildcard:
The single character '.' when used outside of a character set will match @@ -71,9 +71,9 @@ is passed to the matching algorithms. -
- - Anchors: +
+ + Anchors:
A '^' character shall match the start of a line when used as the first character @@ -83,9 +83,9 @@ A '$' character shall match the end of a line when used as the last character of an expression, or the last character of a sub-expression.
-- - Marked +
+ + Marked sub-expressions:
@@ -95,9 +95,9 @@ matching algorithms. Marked sub-expressions can also repeated, or referred to by a back-reference.
-- - Repeats: +
+ + Repeats:
Any atom (a single character, a marked sub-expression, or a character class) @@ -181,9 +181,10 @@ cab Will raise an error, as there is nothing for the
-*
operator to be applied to.- - Back references: +
+ + Back + references:
An escape character followed by a digit n, where n @@ -211,9 +212,9 @@ cab regular expressions, this is a compatible extension to that standard.
- - Alternation +
+ + Alternation
The
-|
operator will match either @@ -224,9 +225,9 @@ cab Parenthesis can be used to group alternations, for example:ab(d|ef)
will match either of "abd" or "abef".- - Character +
+ + Character sets:
@@ -237,18 +238,17 @@ cab
A bracket expression may contain any combination of the following:
-- - Single - characters: +
+ + Single characters:
For example
-[abc]
, will match any of the characters 'a', 'b', or 'c'.- - Character +
+ + Character ranges:
@@ -262,18 +262,18 @@ cab which case whether a character appears within a range is determined by comparing the code points of the characters only.
-- - Negation: +
+ + Negation:
If the bracket-expression begins with the ^ character, then it matches the complement of the characters it contains, for example
-[^a-c]
matches any character that is not in the rangea-c
.- - Character +
+ + Character classes:
@@ -281,9 +281,9 @@ cab matches the named character class "name", for example
-[[:lower:]]
matches any lower case character. See character class names.- - Collating +
+ + Collating Elements:
@@ -309,9 +309,9 @@ cab
matches a NUL character.
-- - Equivalence +
+ + Equivalence classes:
@@ -326,17 +326,17 @@ cab this feature can not be relied upon to work portably across all platforms, or even all locales on one platform.
-- - Combinations: +
+ + Combinations:
All of the above can be combined in one character set declaration, for example:
-[[:digit:]a-c[.NUL.]]
.- - Escapes +
+ + Escapes
The POSIX standard defines no escape sequences for POSIX-Extended regular @@ -360,9 +360,9 @@ cab However, that's rather restrictive, so the following standard-compatible extensions are also supported by Boost.Regex:
-- - Escapes +
+ + Escapes matching a specific character
@@ -549,9 +549,9 @@ cab
- - "Single +
+ + "Single character" character classes:
- - Character +
+ + Character Properties
@@ -810,9 +810,10 @@ cab For example
-\pd
matches any "digit" character, as does\p{digit}
.- - Word Boundaries +
+ + Word + Boundaries
The following escape sequences match the boundaries of words: @@ -885,9 +886,9 @@ cab -
- - Buffer +
+ + Buffer boundaries
- - Continuation +
+ + Continuation Escape
@@ -988,9 +989,9 @@ cab iterating over the matches contained within a text, and you want each subsequence match to start where the last one ended.
-- - Quoting +
+ + Quoting escape
@@ -1002,9 +1003,9 @@ cab
\*+a \*+aaa-- - Unicode +
+ + Unicode escapes
-@@ -1053,18 +1054,18 @@ cab
- - Any other - escape +
+ + Any + other escape
Any other escape sequence matches the character that is escaped, for example \@ matches a literal '@'.
-- - Operator +
+ + Operator precedence
@@ -1099,9 +1100,9 @@ cab Alternation
|
-- - What +
+ + What Gets Matched
@@ -1109,13 +1110,13 @@ cab possible match is obtained using the leftmost-longest rule.
-- - Variations +
+ + Variations
-- - Egrep +
+ + Egrep
When an expression is compiled with the flag @@ -1134,9 +1135,9 @@ cab
-egrep
, and with grep when used with the -E option.- - awk +
+ + awk
In addition to the POSIX-Extended @@ -1148,9 +1149,9 @@ cab specification are required to be supported - however Boost.Regex supports these by default anyway.
-- - Options +
+ + Options
There are a variety @@ -1161,9 +1162,9 @@ cab and
-icase
options modify how the case and locale sensitivity are to be applied.- - References +
+ + References
IEEE diff --git a/doc/html/boost_regex/syntax/basic_syntax.html b/doc/html/boost_regex/syntax/basic_syntax.html index 3f51592d..938f5b4d 100644 --- a/doc/html/boost_regex/syntax/basic_syntax.html +++ b/doc/html/boost_regex/syntax/basic_syntax.html @@ -27,9 +27,9 @@ POSIX Basic Regular Expression Syntax -
- - Synopsis +
+ + Synopsis
The POSIX-Basic regular expression syntax is used by the Unix utility
sed
, and variations are used bygrep
andemacs
. @@ -42,9 +42,9 @@ // e2 a case insensitive POSIX-Basic expression: boost::regex e2(my_expression, boost::regex::basic|boost::regex::icase);
@@ -52,9 +52,9 @@ for the following special characters:
.[\*^$-
The single character '.' when used outside of a character set will match @@ -70,9 +70,9 @@ is passed to the matching algorithms. -
A '^' character shall match the start of a line when used as the first character @@ -82,9 +82,9 @@ A '$' character shall match the end of a line when used as the last character of an expression, or the last character of a sub-expression.
-@@ -94,9 +94,9 @@ matching algorithms. Marked sub-expressions can also repeated, or referred-to by a back-reference.
-Any atom (a single character, a marked sub-expression, or a character class) @@ -152,9 +152,10 @@ aaaa Will raise an error, as there is nothing for the * operator to be applied to.
-An escape character followed by a digit n, where n @@ -170,9 +171,9 @@ aaaa But not the string:
aaabba-
@@ -183,18 +184,18 @@ aaaa
A bracket expression may contain any combination of the following:
-
For example [abc]
, will match any of the characters 'a', 'b',
or 'c'.
@@ -208,18 +209,18 @@ aaaa a character appears within a range is determined by comparing the code points of the characters only.
-
If the bracket-expression begins with the ^ character, then it matches the
complement of the characters it contains, for example [^a-c]
matches any character that is not in the
range a-c.
@@ -227,9 +228,9 @@ aaaa
matches the named character class "name", for example [[:lower:]]
matches any lower case character. See
character class names.
@@ -256,9 +257,9 @@ aaaa matches a 'NUL' character. See collating element names.
-@@ -273,17 +274,17 @@ aaaa this feature can not be relied upon to work portably across all platforms, or even all locales on one platform.
-
All of the above can be combined in one character set declaration, for example:
[[:digit:]a-c[.NUL.]].
With the exception of the escape sequences \{, \}, \(, and \), which are
@@ -296,23 +297,23 @@ aaaa
inside a character set, so [\^]
will match either a literal '\' or a '^'.
When there is more that one way to match a regular expression, the "best" possible match is obtained using the leftmost-longest rule.
-
When an expression is compiled with the flag grep
@@ -328,9 +329,9 @@ aaaa
As its name suggests, this behavior is consistent with the Unix utility grep.
-In addition to the POSIX-Basic features @@ -608,9 +609,9 @@ aaaa well with the POSIX-style leftmost-longest rule.
-
There are a variety
@@ -622,9 +623,9 @@ aaaa
all alter the syntax, while the collate
and icase
options modify how the case and locale sensitivity are to be applied.
IEEE diff --git a/doc/html/boost_regex/syntax/perl_syntax.html b/doc/html/boost_regex/syntax/perl_syntax.html index efa913c3..2ba0eaf0 100644 --- a/doc/html/boost_regex/syntax/perl_syntax.html +++ b/doc/html/boost_regex/syntax/perl_syntax.html @@ -27,9 +27,9 @@ Perl Regular Expression Syntax -
The Perl regular expression syntax is based on that used by the programming @@ -42,9 +42,9 @@ // e2 a case insensitive Perl regular expression: boost::regex e2(my_expression, boost::regex::perl|boost::regex::icase); -
@@ -52,9 +52,9 @@ following special characters:
.[{}()\*+?|^$-
The single character '.' when used outside of a character set will match @@ -72,9 +72,9 @@ algorithms. -
A '^' character shall match the start of a line. @@ -82,10 +82,9 @@
A '$' character shall match the end of a line.
-
A section beginning (
and ending )
@@ -93,9 +92,9 @@
out in a separate field by the matching algorithms. Marked sub-expressions
can also repeated, or referred to by a back-reference.
@@ -106,9 +105,9 @@
, for example (?:ab)+
will repeat ab
without splitting out any separate sub-expressions.
Any atom (a single character, a marked sub-expression, or a character class)
@@ -187,10 +186,10 @@
Will raise an error, as there is nothing for the *
operator
to be applied to.
The normal repeat operators are "greedy", that is to say they will
@@ -217,9 +216,9 @@
{n,m}?
Matches the previous atom between n and m times,
while consuming as little input as possible.
@@ -249,9 +248,10 @@
{n,m}+
Matches the previous atom between n and m times,
while giving nothing back.
An escape character followed by a digit n, where n
@@ -359,9 +359,9 @@
\k<two>
will match whatever matched the subexpression
named "two".
The |
operator will match either of its arguments, so
@@ -386,9 +386,10 @@
(?:abc)??
has exactly the same effect.
A character set is a bracket-expression starting with [
@@ -398,16 +399,17 @@
A bracket expression may contain any combination of the following:
-For example =[abc]=, will match any of the characters 'a', 'b', or 'c'.
-@@ -418,18 +420,18 @@ flag
when constructing the regular expression, then ranges are locale sensitive. -
If the bracket-expression begins with the ^ character, then it matches the
complement of the characters it contains, for example =a-c
=
matches any character that is not in the range a-c
.
@@ -438,9 +440,9 @@ matches any lower case character. See character class names.
-@@ -460,9 +462,9 @@
matches a \0
character.
@@ -477,9 +479,9 @@ this feature can not be relied upon to work portably across all platforms, or even all locales on one platform.
-@@ -489,17 +491,17 @@ would match any character that is either a "digit", or is not a "word" character.
-
All of the above can be combined in one character set declaration, for example:
[[:digit:]a-c[.NUL.]]
.
Any special character preceded by an escape shall match itself. @@ -689,9 +691,9 @@ -
@@ -999,9 +1001,10 @@
For example \pd
matches any "digit" character,
as does \p{digit}
.
The following escape sequences match the boundaries of words: @@ -1018,9 +1021,10 @@
\B
Matches only when not at a word boundary.
The following match only at buffer boundaries: a "buffer" in this
@@ -1045,9 +1049,9 @@
Note that this is subtly different from Perl which behaves as if matching
(?=\n?\z)
.
@@ -1057,9 +1061,10 @@ within a text, and you want each subsequence match to start where the last one ended.
-
The escape sequence \Q
begins a "quoted sequence":
@@ -1070,9 +1075,10 @@
\*+a \*+aaa-
\C
Matches a single code point: in Boost regex this has
@@ -1080,19 +1086,19 @@
Matches a combining character sequence: that is any non-combining character
followed by a sequence of zero or more combining characters.
The escape sequence \R
matches any line ending character
sequence, specifically it is identical to the expression (?>\x0D\x0A?|[\x0A-\x0C\x85\x{2028}\x{2029}])
.
\K
Resets the start location of $0 to the current text
@@ -1104,27 +1110,27 @@
would return the match "bar" for $0 and "foo" for $`.
This can be used to simulate variable width lookbehind assertions.
Any other escape sequence matches the character that is escaped, for example \@ matches a literal '@'.
-
Perl-specific extensions to the regular expression syntax all start with
(?
.
@@ -1144,16 +1150,16 @@
also be refered to by name in a Perl
format string for search and replace operations, or in the match_results
member functions.
(?# ... )
is treated as a comment, it's contents are ignored.
(?imsx-imsx ... )
alters which of the perl modifiers are
@@ -1165,18 +1171,19 @@
(?imsx-imsx:pattern)
applies the specified modifiers to
pattern only.
(?:pattern)
lexically groups pattern, without generating
an additional sub-expression.
(?|pattern)
resets the subexpression count at the start
@@ -1192,13 +1199,13 @@
In the following example the index of each sub-expression is shown below
the expression:
# before ---------------branch-reset----------- after +# before ---------------branch-reset----------- after / ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x # 1 2 2 3 2 3 4-- - Lookahead +
+ + Lookahead
(?=pattern)
consumes zero characters, only if pattern @@ -1219,9 +1226,9 @@could be used to validate the password.
-- - Lookbehind +
+ + Lookbehind
-
(?<=pattern)
consumes zero characters, only if pattern @@ -1233,9 +1240,9 @@ could not be matched against the characters preceding the current position (pattern must be of fixed length).- - Independent +
+ + Independent sub-expressions
@@ -1246,9 +1253,9 @@ be considered, if this doesn't allow the expression as a whole to match then no match is found at all.
-- - Recursive +
+ + Recursive Expressions
@@ -1273,9 +1280,9 @@
-
(?&NAME)
recurses to named sub-expression NAME.- - Conditional +
+ + Conditional Expressions
@@ -1323,9 +1330,9 @@ from elsewhere in the pattern. -
- - Operator +
-+ + Operator precedence
@@ -1358,10 +1365,10 @@ Alternation | -
- - What gets - matched +
+ + What + gets matched
If you view the regular expression as a directed (possibly cyclic) graph, @@ -1534,18 +1541,18 @@ -
- - Variations +
+ + Variations
The options
-normal
,ECMAScript
,JavaScript
andJScript
are all synonyms forperl
.- - Options +
+ + Options
- - Pattern +
+ + Pattern Modifiers
@@ -1567,9 +1574,9 @@ time flags
. -no_mod_m
,mod_x
,mod_s
, andno_mod_s
- - References +
+ + References
Perl 5.8. diff --git a/doc/html/boost_regex/unicode.html b/doc/html/boost_regex/unicode.html index 58076986..03c08b37 100644 --- a/doc/html/boost_regex/unicode.html +++ b/doc/html/boost_regex/unicode.html @@ -29,9 +29,10 @@
There are two ways to use Boost.Regex with Unicode strings:
-- - Rely on wchar_t +
+ + Rely + on wchar_t
If your platform's
wchar_t
type @@ -55,9 +56,9 @@ it is not possible to search UTF-8, or even UTF-16 on many platforms. -- - Use +
+ + Use a Unicode Aware Regular Expression Type.
diff --git a/doc/html/index.html b/doc/html/index.html index f342800f..816b8069 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -28,7 +28,7 @@
Copyright © 1998-2010 John Maddock
-Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -198,7 +198,7 @@
- + Last revised: October 16, 2011 at 12:24:31 GMT
Last revised: December 24, 2011 at 17:50:34 GMT
diff --git a/doc/introduction.qbk b/doc/introduction.qbk index b7a5184c..fb8c0bbf 100644 --- a/doc/introduction.qbk +++ b/doc/introduction.qbk @@ -40,14 +40,14 @@ of 16-digits, separated into groups of 4-digits, and separated by either a space or a hyphen. Before storing a credit card number in a database (not necessarily something your customers will appreciate!), we may want to verify that the number is in the correct format. To match any digit we could -use the regular expression [0-9], however ranges of characters like this are +use the regular expression \[0-9\], however ranges of characters like this are actually locale dependent. Instead we should use the POSIX standard form \[\[:digit:\]\], or the Boost.Regex and Perl shorthand for this \\d (note that many older libraries tended 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 number formats: -[pre (\d{4}[- ]){3}\d{4}] +[pre (\d{4}\[- \]){3}\d{4}] Here the parenthesis act to group (and mark for future reference) sub-expressions, and the {4} means "repeat exactly 4 times". This is an