diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 38357c9e..5dedf523 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -34,7 +34,7 @@ boostbook standalone # PDF Options: # TOC Generation: this is needed for FOP-0.9 and later: - #fop1.extensions=1 + fop1.extensions=0 # Or enable this if you're using XEP: xep.extensions=1 # TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9! @@ -55,3 +55,4 @@ boostbook standalone ; + diff --git a/doc/concepts.qbk b/doc/concepts.qbk index 58822659..d6758967 100644 --- a/doc/concepts.qbk +++ b/doc/concepts.qbk @@ -67,10 +67,9 @@ an object of type `X::locale_type`. [[v.lookup_classname(F1, F2)][X::char_class_type][Converts the character sequence designated by the iterator range \[F1,F2) into a bitmask type that can subsequently be passed to isctype. Values returned from lookup_classname can be safely bitwise or'ed together. Returns 0 if the character sequence is not the name of a character class recognized by X. The value returned shall be independent of the case of the characters in the sequence.]] [[v.lookup_collatename(F1, F2)][X::string_type][Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range \[F1, F2). Returns an empty string if the character sequence is not a valid collating element.]] [[v.isctype(c, v.lookup_classname (F1, F2))][bool][Returns true if character c is a member of the character class designated by the iterator range \[F1, F2), false otherwise.]] -[[v.value(c, i)][int][Returns the value represented by the digit c in base I if the character c is a valid digit in base I; otherwise returns -1. \[Note: the value of I will only be 8, 10, or 16. -end note\]]] +[[v.value(c, I)][int][Returns the value represented by the digit c in base I if the character c is a valid digit in base I; otherwise returns -1. \[Note: the value of I will only be 8, 10, or 16. -end note\]]] [[u.imbue(loc)][X::locale_type][Imbues u with the locale loc, returns the previous locale used by u if any. ]] [[v.getloc()][X::locale_type][Returns the current locale used by v if any. ]] -[[v.error_string(i)][std::string][Returns a human readable error string for the error condition i, where i is one of the values enumerated by type regex_constants::error_type. If the value i is not recognized then returns the string "Unknown error" or a localized equivalent.]] ] [h4 Additional Optional Requirements] @@ -89,14 +88,14 @@ configure itself appropriately. [[v.escape_syntax_type(c)][regex_constants::escape_syntax_type][Returns a symbolic value of type regex_constants::escape_syntax_type, that signifies the meaning of character c within the regular expression grammar, when c has been preceded by an escape character. Precondition: if b is the character preceding c in the expression being parsed then: `v.syntax_type(b) == syntax_escape`]] [[v.translate(c, b)][X::char_type][Returns a character d such that: for any character d that is to be considered equivalent to c then `v.translate(c,false)==v.translate(d,false)`. Likewise for all characters C that are to be considered equivalent to c when comparisons are to be performed without regard to case, then `v.translate(c,true)==v.translate(C,true)`.]] [[v.toi(I1, I2, i)][An integer type capable of holding either a charT or an int.][Behaves as follows: if `p == q` or if `*p` is not a digit character then returns -1. Otherwise performs formatted numeric input on the sequence \[p,q) and returns the result as an int. Postcondition: either p == q or *p is a non-digit character.]] -[[v.error_string(i)][std::string][Returns a human readable error string for the error condition i, where i is one of the values enumerated by type regex_constants::error_type. If the value i is not recognized then returns the string "Unknown error" or a localized equivalent.]] +[[v.error_string(I)][std::string][Returns a human readable error string for the error condition i, where i is one of the values enumerated by type regex_constants::error_type. If the value /I/ is not recognized then returns the string "Unknown error" or a localized equivalent.]] [[v.tolower(c)][X::char_type][Converts c to lower case, used for Perl-style \l and \L formating operations.]] [[v.toupper(c)][X::char_type][Converts c to upper case, used for Perl-style \u and \U formating operations.]] ] [endsect] -[section:iterator_concepts Iterator Rrequirements] +[section:iterator_concepts Iterator Requirements] The regular expression algorithms (and iterators) take all require a Bidirectional-Iterator. diff --git a/doc/html/boost_regex/background_information.html b/doc/html/boost_regex/background_information.html index 45d793e6..97e723cd 100644 --- a/doc/html/boost_regex/background_information.html +++ b/doc/html/boost_regex/background_information.html @@ -3,12 +3,11 @@ Background Information - + - - + + @@ -25,7 +24,8 @@
Headers
Localization
@@ -44,31 +44,14 @@ Acknowledgements
History
-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

- +

+

diff --git a/doc/html/boost_regex/background_information/acknowledgements.html b/doc/html/boost_regex/background_information/acknowledgements.html index 0e9a5827..6226d770 100644 --- a/doc/html/boost_regex/background_information/acknowledgements.html +++ b/doc/html/boost_regex/background_information/acknowledgements.html @@ -1,14 +1,13 @@ - - Acknowledgements +Acknowledgements - + - - + + @@ -25,9 +24,9 @@

The author can be contacted at john - at - johnmaddock.co.uk; the home page for this library is at www.boost.org. @@ -75,10 +74,11 @@

- +

+

diff --git a/doc/html/boost_regex/background_information/examples.html b/doc/html/boost_regex/background_information/examples.html index 7c929efe..42421ebe 100644 --- a/doc/html/boost_regex/background_information/examples.html +++ b/doc/html/boost_regex/background_information/examples.html @@ -1,16 +1,13 @@ - Test and - Example Programs +Test and Example Programs - + - - + + @@ -27,16 +24,16 @@ +
+ Test Programs -
+

- regress: + regress:

A regression test application that gives the matching/searching algorithms @@ -52,7 +49,7 @@ Files: See directory.

- bad_expression_test: + bad_expression_test:

Verifies that "bad" regular expressions don't cause the matcher @@ -65,7 +62,7 @@ Files: bad_expression_test.cpp.

- recursion_test: + recursion_test:

Verifies that the matcher can't overrun the stack (no matter what the expression). @@ -77,7 +74,7 @@ Files: recursion_test.cpp.

- concepts: + concepts:

Verifies that the library meets all documented concepts (a compile only test). @@ -89,7 +86,7 @@ Files: concept_check.cpp.

- captures_test: + captures_test:

Test code for captures. @@ -100,13 +97,13 @@

Files: captures_test.cpp.

-

- +

+ Example programs -
+

- grep + grep

A simple grep implementation, run with the -h command line option to find @@ -116,7 +113,7 @@ Files: grep.cpp

- timer.exe + timer.exe

A simple interactive expression matching application, the results of all @@ -126,11 +123,11 @@

Files: regex_timer.cpp.

-

- +

+ Code snippets -
+

The snippets examples contain the code examples used in the documentation:

@@ -211,10 +208,11 @@
- +

+

diff --git a/doc/html/boost_regex/background_information/faq.html b/doc/html/boost_regex/background_information/faq.html index e2b8b781..31ab358f 100644 --- a/doc/html/boost_regex/background_information/faq.html +++ b/doc/html/boost_regex/background_information/faq.html @@ -1,14 +1,13 @@ - FAQ +FAQ - + - - + + @@ -25,13 +24,14 @@
+ FAQ +

- Q. I can't get regex++ to work with escape + Q. I can't get regex++ to work with escape characters, what's going on?

- A. If you embed regular expressions in C++ + A. If you embed regular expressions in C++ code, then remember that escape characters are processed twice: once by the C++ compiler, and once by the Boost.Regex expression compiler, so to pass the regular expression \d+ to Boost.Regex, you need to embed "\d+" @@ -39,21 +39,21 @@ "\\" in your code.

- Q. No matter what I do regex_match always + Q. No matter what I do regex_match always returns false, what's going on?

- A. The algorithm regex_match only succeeds - if the expression matches all of the text, - if you want to find a sub-string within + A. The algorithm regex_match only succeeds + if the expression matches all of the text, + if you want to find a sub-string within the text that matches the expression then use regex_search instead.

- Q. Why does using parenthesis in a POSIX + Q. Why does using parenthesis in a POSIX regular expression change the result of a match?

- A. For POSIX (extended and basic) regular + A. For POSIX (extended and basic) regular expressions, but not for perl regexes, parentheses don't only mark; they determine what the best match is as well. When the expression is compiled as a POSIX basic or extended regex then Boost.Regex follows the POSIX standard @@ -85,11 +85,11 @@ as the expression.

- Q. Why don't character ranges work properly + Q. Why don't character ranges work properly (POSIX mode only)?

- A. The POSIX standard specifies that character + A. The POSIX standard specifies that character range expressions are locale sensitive - so for example the expression [A-Z] will match any collating element that collates between 'A' and 'Z'. That means that for most locales other than "C" or "POSIX", @@ -97,39 +97,39 @@ most people expect - or at least not what most people have come to expect from regular expression engines. For this reason, the default behaviour of Boost.Regex (perl mode) is to turn locale sensitive collation off by not - setting the regex_constants::collate + setting the regex_constants::collate compile time flag. However if you set a non-default compile time flag - for - example regex_constants::extended or regex_constants::basic, + example regex_constants::extended or regex_constants::basic, then locale dependent collation will be enabled, this also applies to the - POSIX API functions which use either regex_constants::extended - or regex_constants::basic internally. [Note - when regex_constants::nocollate in effect, the library behaves + POSIX API functions which use either regex_constants::extended + or regex_constants::basic internally. [Note - when regex_constants::nocollate in effect, the library behaves "as if" the LC_COLLATE locale category were always "C", regardless of what its actually set to - end note].

- Q. Why are there no throw specifications + Q. Why are there no throw specifications on any of the functions? What exceptions can the library throw?

- A. Not all compilers support (or honor) + A. Not all compilers support (or honor) throw specifications, others support them but with reduced efficiency. Throw specifications may be added at a later date as compilers begin to handle this better. The library should throw only three types of exception: [boost::regex_error] - can be thrown by basic_regex when compiling a regular - expression, std::runtime_error can be thrown when a call - to basic_regex::imbue tries to open a message catalogue - that doesn't exist, or when a call to regex_search or regex_match results in an "everlasting" - search, or when a call to RegEx::GrepFiles - or RegEx::FindFiles tries to open a file that cannot - be opened, finally std::bad_alloc can be thrown by just about any + can be thrown by basic_regex when compiling a regular + expression, std::runtime_error can be thrown when a call + to basic_regex::imbue tries to open a message catalogue + that doesn't exist, or when a call to regex_search or regex_match results in an "everlasting" + search, or when a call to RegEx::GrepFiles + or RegEx::FindFiles tries to open a file that cannot + be opened, finally std::bad_alloc can be thrown by just about any of the functions in this library.

- Q. Why can't I use the "convenience" + Q. Why can't I use the "convenience" versions of regex_match / regex_search / regex_grep / regex_format / regex_merge?

- A. These versions may or may not be available + A. These versions may or may not be available depending upon the capabilities of your compiler, the rules determining the format of these functions are quite complex - and only the versions visible to a standard compliant compiler are given in the help. To find out what @@ -141,10 +141,11 @@

- +

+

diff --git a/doc/html/boost_regex/background_information/futher.html b/doc/html/boost_regex/background_information/futher.html index 4463bda9..f238a3db 100644 --- a/doc/html/boost_regex/background_information/futher.html +++ b/doc/html/boost_regex/background_information/futher.html @@ -1,15 +1,13 @@ - References - and Further Information +References and Further Information - + - - + + @@ -26,9 +24,9 @@

Short tutorials on regular expressions can be found here and here. @@ -64,10 +62,11 @@

- +

+

diff --git a/doc/html/boost_regex/background_information/headers.html b/doc/html/boost_regex/background_information/headers.html index a351f381..cf275901 100644 --- a/doc/html/boost_regex/background_information/headers.html +++ b/doc/html/boost_regex/background_information/headers.html @@ -1,13 +1,13 @@ - Headers +Headers - + - + @@ -24,25 +24,27 @@

- There are two main headers used by this library: <boost/regex.hpp> - provides full access to the main template library, while <boost/cregex.hpp> + There are two main headers used by this library: <boost/regex.hpp> + provides full access to the main template library, while <boost/cregex.hpp> provides access to the (deprecated) high level class RegEx, and the POSIX API functions.

- There is also a header containing only forward declarations <boost/regex_fwd.hpp> - for use when an interface is dependent upon basic_regex, but otherwise does + There is also a header containing only forward declarations <boost/regex_fwd.hpp> + for use when an interface is dependent upon basic_regex, but otherwise does not need the full definitions.

- +

+

diff --git a/doc/html/boost_regex/background_information/history.html b/doc/html/boost_regex/background_information/history.html index db846835..82728a7b 100644 --- a/doc/html/boost_regex/background_information/history.html +++ b/doc/html/boost_regex/background_information/history.html @@ -1,13 +1,12 @@ - History +History - + - + @@ -24,12 +23,13 @@ +
+ Boost 1.34 -
+
  • Fix for non-greedy repeats and partial matches not working correctly in @@ -48,11 +48,11 @@ the same as |.
-

- +

+ Boost 1.33.1 -
+
  • Fixed broken makefiles. @@ -118,11 +118,11 @@ Fixed bug that allowed some invalid expressions to be accepted.
-

- +

+ Boost 1.33.0 -
+
  • Completely rewritten expression parsing code, and traits class support; @@ -173,19 +173,19 @@ in the expression the error occured.
-

- +

+ Boost 1.32.1 -
+
  • Fixed bug in partial matches of bounded repeats of '.'.
-

- +

+ Boost 1.31.0 -
+
  • Completely rewritten pattern matching code - it is now up to 10 times faster @@ -220,10 +220,11 @@
- +

+

diff --git a/doc/html/boost_regex/background_information/locale.html b/doc/html/boost_regex/background_information/locale.html index 78e77de2..4916676f 100644 --- a/doc/html/boost_regex/background_information/locale.html +++ b/doc/html/boost_regex/background_information/locale.html @@ -1,14 +1,13 @@ - Localization +Localization - + - - + + @@ -25,7 +24,8 @@

Boost.Regex provides extensive support for run-time localization, the localization model used can be split into two parts: front-end and back-end. @@ -57,52 +57,50 @@

There are three separate localization mechanisms supported by Boost.Regex:

-

- +

+ Win32 localization model. -
+

This is the default model when the library is compiled under Win32, and is - encapsulated by the traits class w32_regex_traits. - When this model is in effect each basic_regex object gets it's own + encapsulated by the traits class w32_regex_traits. + When this model is in effect each basic_regex object gets it's own LCID, by default this is the users default setting as returned by GetUserDefaultLCID, - but you can call imbue on the basic_regex + but you can call imbue on the basic_regex object to set it's locale to some other LCID if you wish. All the settings used by Boost.Regex are acquired directly from the operating system bypassing the C run time library. Front-end localization requires a resource dll, containing a string table with the user-defined strings. The traits class exports the function:

-
-static std::string set_message_catalogue(const std::string& s);
+
static std::string set_message_catalogue(const std::string& s);
 

which needs to be called with a string identifying the name of the resource dll, before your code compiles any regular expressions (but not necessarily - before you construct any basic_regex + before you construct any basic_regex instances):

-
-boost::w32_regex_traits<char>::set_message_catalogue("mydll.dll");
+
boost::w32_regex_traits<char>::set_message_catalogue("mydll.dll");
 

The library provides full Unicode support under NT, under Windows 9x the library degrades gracefully - characters 0 to 255 are supported, the remainder are treated as "unknown" graphic characters.

-

- +

+ C localization model. -
+

This model has been deprecated in favor of the C++ locale for all non-Windows compilers that support it. This locale is encapsulated by the traits class - c_regex_traits, Win32 users + c_regex_traits, Win32 users can force this model to take effect by defining the pre-processor symbol BOOST_REGEX_USE_C_LOCALE. When this model is in effect there is a single - global locale, as set by setlocale. + global locale, as set by setlocale. All settings are acquired from your run time library, consequently Unicode support is dependent upon your run time library implementation.

@@ -111,54 +109,52 @@

Note that calling setlocale invalidates all compiled regular expressions, - calling setlocale(LC_ALL, "C") + calling setlocale(LC_ALL, "C") will make this library behave equivalent to most traditional regular expression libraries including version 1 of this library.

-

- +

+ C++ localization model. -
+

This model is the default for non-Windows compilers.

- When this model is in effect each instance of basic_regex has its own instance - of std::locale, class basic_regex also has a member function - imbue which allows the locale + When this model is in effect each instance of basic_regex has its own instance + of std::locale, class basic_regex also has a member function + imbue which allows the locale for the expression to be set on a per-instance basis. Front end localization - requires a POSIX message catalogue, which will be loaded via the std::messages + requires a POSIX message catalogue, which will be loaded via the std::messages facet of the expression's locale, the traits class exports the symbol:

-
-static std::string set_message_catalogue(const std::string& s);
+
static std::string set_message_catalogue(const std::string& s);
 

which needs to be called with a string identifying the name of the message catalogue, before your code compiles any regular expressions (but not necessarily before you construct any basic_regex instances):

-
-boost::cpp_regex_traits<char>::set_message_catalogue("mycatalogue");
+
boost::cpp_regex_traits<char>::set_message_catalogue("mycatalogue");
 

- Note that calling basic_regex<>::imbue - will invalidate any expression currently compiled in that instance of basic_regex. + Note that calling basic_regex<>::imbue + will invalidate any expression currently compiled in that instance of basic_regex.

Finally note that if you build the library with a non-default localization model, then the appropriate pre-processor symbol (BOOST_REGEX_USE_C_LOCALE or BOOST_REGEX_USE_CPP_LOCALE) must be defined both when you build the support - library, and when you include <boost/regex.hpp> - or <boost/cregex.hpp> - in your code. The best way to ensure this is to add the #define to <boost/regex/user.hpp>. + library, and when you include <boost/regex.hpp> + or <boost/cregex.hpp> + in your code. The best way to ensure this is to add the #define to <boost/regex/user.hpp>.

-

- +

+ Providing a message catalogue -
+

In order to localize the front end of the library, you need to provide the library with the appropriate message strings contained either in a resource @@ -1272,7 +1268,7 @@

@@ -179,7 +177,7 @@ @@ -191,7 +189,7 @@ @@ -203,26 +201,26 @@

- "Unmatched [ or " + "Unmatched [ or "

@@ -1779,10 +1775,11 @@ - +

+

diff --git a/doc/html/boost_regex/background_information/performance.html b/doc/html/boost_regex/background_information/performance.html index be5ed7c2..c0513ebb 100644 --- a/doc/html/boost_regex/background_information/performance.html +++ b/doc/html/boost_regex/background_information/performance.html @@ -1,14 +1,13 @@ - Performance +Performance - + - - + + @@ -25,7 +24,8 @@

The performance of Boost.Regex in both recursive and non-recursive modes should be broadly comparable to other regular expression libraries: recursive @@ -46,10 +46,11 @@

- +

+

diff --git a/doc/html/boost_regex/background_information/redist.html b/doc/html/boost_regex/background_information/redist.html index fb7917f6..de272a08 100644 --- a/doc/html/boost_regex/background_information/redist.html +++ b/doc/html/boost_regex/background_information/redist.html @@ -1,15 +1,13 @@ - Redistributables +Redistributables - + - - + + @@ -26,7 +24,8 @@

If you are using Microsoft or Borland C++ and link to a dll version of the run time library, then you can choose to also link to a dll version of Boost.Regex @@ -48,10 +47,11 @@

- +

+

diff --git a/doc/html/boost_regex/background_information/standards.html b/doc/html/boost_regex/background_information/standards.html index 8efaff79..4ca1f3d9 100644 --- a/doc/html/boost_regex/background_information/standards.html +++ b/doc/html/boost_regex/background_information/standards.html @@ -1,14 +1,13 @@ - Standards - Conformance +Standards Conformance - + - - + + @@ -25,22 +24,22 @@ +
+ C++ -
+

Boost.Regex is intended to conform to the Technical Report on C++ Library Extensions.

-

- +

+ ECMAScript / JavaScript -
+

All of the ECMAScript regular expression syntax features are supported, except that: @@ -49,10 +48,10 @@ 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.

-

- +

+ Perl -
+

Almost all Perl features are supported, except for:

@@ -62,10 +61,10 @@

(??{code}) Not implementable in a compiled strongly typed language.

-

- +

+ POSIX -
+

All the POSIX basic and extended regular expression features are supported, except that: @@ -82,10 +81,10 @@ implementation doesn't work on your platform, then you will need to supply a custom traits class.

-

- +

+ Unicode -
+

The following comments refer to Unicode Technical Standard #18: Unicode Regular Expressions version 11. @@ -165,13 +164,13 @@ Indirectly support by forward-lookahead:

- (?=[[:X:]])[[:Y:]] + (?=[[:X:]])[[:Y:]]

Gives the intersection of character properties X and Y.

- (?![[:X:]])[[:Y:]] + (?![[:X:]])[[:Y:]]

Gives everything in Y that is not in X (subtraction). @@ -469,7 +468,7 @@

@@ -550,10 +549,11 @@

- Supported: pass the flag match_partial + Supported: pass the flag match_partial to the regex algorithms.

- +

+

diff --git a/doc/html/boost_regex/background_information/thread_safety.html b/doc/html/boost_regex/background_information/thread_safety.html index d76d568d..47a0f190 100644 --- a/doc/html/boost_regex/background_information/thread_safety.html +++ b/doc/html/boost_regex/background_information/thread_safety.html @@ -1,15 +1,13 @@ - Thread - Safety +Thread Safety - + - - + + @@ -26,44 +24,43 @@

The Boost.Regex library is thread safe when Boost is: you can verify that - Boost is in thread safe mode by checking to see if BOOST_HAS_THREADS + Boost is in thread safe mode by checking to see if BOOST_HAS_THREADS is defined: this macro is set automatically by the config system when threading support is turned on in your compiler.

- Class basic_regex + Class basic_regex and its typedefs regex and wregex are thread safe, in that compiled regular expressions can safely be shared between threads. The matching algorithms - regex_match, - regex_search, - and regex_replace - are all re-entrant and thread safe. Class match_results is now thread safe, + regex_match, + regex_search, + and regex_replace + are all re-entrant and thread safe. Class match_results is now thread safe, in that the results of a match can be safely copied from one thread to another - (for example one thread may find matches and push match_results instances onto a queue, + (for example one thread may find matches and push match_results instances onto a queue, while another thread pops them off the other end), otherwise use a separate - instance of match_results + instance of match_results per thread.

- The POSIX API functions are + The POSIX API functions are all re-entrant and thread safe, regular expressions compiled with regcomp can also be shared between threads.

- The class + The class RegEx is only thread safe if each thread gets its own RegEx instance (apartment threading) - this is a consequence of RegEx handling both compiling and matching regular expressions.

Finally note that changing the global locale invalidates all compiled regular - expressions, therefore calling set_locale + expressions, therefore calling set_locale from one thread while another uses regular expressions will produce unpredictable results.

@@ -74,10 +71,11 @@
- +

+

diff --git a/doc/html/boost_regex/captures.html b/doc/html/boost_regex/captures.html index 5d984fed..af1acd15 100644 --- a/doc/html/boost_regex/captures.html +++ b/doc/html/boost_regex/captures.html @@ -1,14 +1,13 @@ - Understanding Marked Sub-Expressions - and Captures +Understanding Marked Sub-Expressions and Captures - + - - + + @@ -25,9 +24,9 @@

Captures are the iterator ranges that are "captured" by marked sub-expressions as a regular expression gets matched. Each marked sub-expression can result @@ -35,12 +34,12 @@ how captures and marked sub-expressions in Boost.Regex are represented and accessed.

-

- +

+ Marked sub-expressions -
+

- Every time a Perl regular expression contains a parenthesis group (), it spits out an extra field, known as a + Every time a Perl regular expression contains a parenthesis group (), it spits out an extra field, known as a marked sub-expression, for example the expression:

(\w+)\W+(\w+)
@@ -48,7 +47,7 @@ Has two marked sub-expressions (known as $1 and $2 respectively), in addition the complete match is known as $&, everything before the first match as $`, and everything after the match as $'. So if the above expression is searched - for within "@abc def--", + for within "@abc def--", then we obtain:

@@ -132,11 +131,10 @@

- In Boost.Regex all these are accessible via the match_results class that gets filled - in when calling one of the regular expression matching algorithms ( regex_search, regex_match, or regex_iterator). So given: + In Boost.Regex all these are accessible via the match_results class that gets filled + in when calling one of the regular expression matching algorithms ( regex_search, regex_match, or regex_iterator). So given:

-
-boost::match_results<IteratorType> m;
+
boost::match_results<IteratorType> m;
 

The Perl and Boost.Regex equivalents are as follows: @@ -167,7 +165,7 @@

- m.prefix() + m.prefix()

- m[0] + m[0]

- m[n] + m[n]

- m.suffix() + m.suffix()

- In Boost.Regex each sub-expression match is represented by a sub_match object, this is basically + In Boost.Regex each sub-expression match is represented by a sub_match object, this is basically just a pair of iterators denoting the start and end position of the sub-expression match, but there are some additional operators provided so that objects of - type sub_match - behave a lot like a std::basic_string: for example they are implicitly - convertible to a basic_string, + type sub_match + behave a lot like a std::basic_string: for example they are implicitly + convertible to a basic_string, they can be compared to a string, added to a string, or streamed out to an output stream.

-

- +

+ Unmatched Sub-Expressions -
+

When a regular expression match is found there is no need for all of the marked sub-expressions to have participated in the match, for example the expression: @@ -230,12 +228,12 @@

(abc)|(def)

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 sub_match::matched data member. + you can determine which sub-expressions matched by accessing the sub_match::matched data member.

-

- +

+ Repeated Captures -
+

When a marked sub-expression is repeated, then the sub-expression gets "captured" multiple times, however normally only the final capture is available, for example @@ -252,13 +250,12 @@

However, Boost.Regex has an experimental feature that allows all the capture - information to be retained - this is accessed either via the match_results::captures member function or the sub_match::captures member function. These functions + information to be retained - this is accessed either via the match_results::captures member function or the sub_match::captures member function. These functions return a container that contains a sequence of all the captures obtained during the regular expression matching. The following example program shows how this information may be used:

-
-#include <boost/regex.hpp>
+
#include <boost/regex.hpp>
 #include <iostream>
 
 void print_captures(const std::string& regx, const std::string& text)
@@ -372,10 +369,11 @@ Text:        "now is the time for all good men to come to the aid of the party"
 
- +

+

diff --git a/doc/html/boost_regex/configuration.html b/doc/html/boost_regex/configuration.html index fb86953e..8d8b2a42 100644 --- a/doc/html/boost_regex/configuration.html +++ b/doc/html/boost_regex/configuration.html @@ -1,13 +1,13 @@ - Configuration +Configuration - + - + @@ -24,7 +24,8 @@
- +

+

diff --git a/doc/html/boost_regex/configuration/algorithm.html b/doc/html/boost_regex/configuration/algorithm.html index 1c8cce84..970cba82 100644 --- a/doc/html/boost_regex/configuration/algorithm.html +++ b/doc/html/boost_regex/configuration/algorithm.html @@ -1,13 +1,13 @@ - Algorithm Selection +Algorithm Selection - + - - - + + + @@ -24,7 +24,8 @@
@@ -78,10 +79,11 @@
- +

+

diff --git a/doc/html/boost_regex/configuration/compiler.html b/doc/html/boost_regex/configuration/compiler.html index 6549e66e..03814ff1 100644 --- a/doc/html/boost_regex/configuration/compiler.html +++ b/doc/html/boost_regex/configuration/compiler.html @@ -1,14 +1,13 @@ - Compiler Setup +Compiler Setup - + - - - + + + @@ -25,7 +24,8 @@

You shouldn't need to do anything special to configure Boost.Regex for use with your compiler - the Boost.Config @@ -36,10 +36,11 @@

- +

+

diff --git a/doc/html/boost_regex/configuration/linkage.html b/doc/html/boost_regex/configuration/linkage.html index 1711f2fc..e9012060 100644 --- a/doc/html/boost_regex/configuration/linkage.html +++ b/doc/html/boost_regex/configuration/linkage.html @@ -1,14 +1,13 @@ - Linkage Options +Linkage Options - + - - - + + + @@ -25,7 +24,8 @@
@@ -77,10 +77,11 @@
- +

+

diff --git a/doc/html/boost_regex/configuration/locale.html b/doc/html/boost_regex/configuration/locale.html index bfab7b14..da0e4e63 100644 --- a/doc/html/boost_regex/configuration/locale.html +++ b/doc/html/boost_regex/configuration/locale.html @@ -1,14 +1,13 @@ - Locale and traits - class selection +Locale and traits class selection - + - - - + + + @@ -25,9 +24,9 @@

The following macros (see user.hpp) control how Boost.Regex interacts with the user's locale: @@ -96,10 +95,11 @@

- +

+

diff --git a/doc/html/boost_regex/configuration/tuning.html b/doc/html/boost_regex/configuration/tuning.html index 05412d1d..deba73fb 100644 --- a/doc/html/boost_regex/configuration/tuning.html +++ b/doc/html/boost_regex/configuration/tuning.html @@ -1,13 +1,13 @@ - Algorithm Tuning +Algorithm Tuning - + - - - + + + @@ -24,7 +24,8 @@

The following option applies only if BOOST_REGEX_RECURSIVE is set.

@@ -139,10 +140,11 @@
- +

+

diff --git a/doc/html/boost_regex/format.html b/doc/html/boost_regex/format.html index 9efc4524..ac34fbbf 100644 --- a/doc/html/boost_regex/format.html +++ b/doc/html/boost_regex/format.html @@ -1,14 +1,13 @@ - Search and Replace Format String Syntax +Search and Replace Format String Syntax - + - - + + @@ -25,7 +24,8 @@
Sed Format String Syntax
Perl Format String Syntax
@@ -33,32 +33,26 @@ Format String Syntax

- Format strings are used by the algorithm regex_replace and by match_results<>::format, and are used to transform + Format strings are used by the algorithm regex_replace and by match_results<>::format, and are used to transform one string into another.

- There are three kind of format string: Sed, - Perl and Boost-Extended. + There are three kind of format string: Sed, + Perl and Boost-Extended.

- Alternatively, when the flag format_literal + Alternatively, when the flag format_literal is passed to one of these functions, then the format string is treated as a string literal, and is copied unchanged to the output.

-

-

-

-

-

-

- +

+

diff --git a/doc/html/boost_regex/format/boost_format_syntax.html b/doc/html/boost_regex/format/boost_format_syntax.html index 134712c2..4ea00314 100644 --- a/doc/html/boost_regex/format/boost_format_syntax.html +++ b/doc/html/boost_regex/format/boost_format_syntax.html @@ -1,14 +1,13 @@ - Boost-Extended - Format String Syntax +Boost-Extended Format String Syntax - + - - - + + + @@ -25,25 +24,25 @@

Boost-Extended format strings treat all characters as literals except for '$', '\', '(', ')', '?', and ':'.

-

- +

+ Grouping -
+

The characters '(' and ')' perform lexical grouping, so use \( and \) if you want a to output literal parenthesis.

-

- +

+ Conditionals -
+

The character '?' begins a conditional expression, the general form is:

@@ -66,11 +65,11 @@ match found with "foo" if the sub-expression $1 was matched, and with "bar" otherwise.

-

- +

+ Placeholder Sequences -
+

Placeholder sequences specify that some part of what matched the regular expression should be sent to output as follows: @@ -161,11 +160,11 @@ Any $-placeholder sequence not listed above, results in '$' being treated as a literal.

-

- +

+ Escape Sequences -
+

An escape character followed by any character x, outputs that character unless x is one of the escape sequences shown below. @@ -390,10 +389,11 @@

- +

+

diff --git a/doc/html/boost_regex/format/perl_format.html b/doc/html/boost_regex/format/perl_format.html index 94e2d7f0..0d248545 100644 --- a/doc/html/boost_regex/format/perl_format.html +++ b/doc/html/boost_regex/format/perl_format.html @@ -1,14 +1,13 @@ - Perl Format String Syntax +Perl Format String Syntax - + - - - + + + @@ -25,7 +24,8 @@

Perl-style format strings treat all characters as literals except '$' and '\' which start placeholder and escape sequences respectively. @@ -344,10 +344,11 @@

- +

+

diff --git a/doc/html/boost_regex/format/sed_format.html b/doc/html/boost_regex/format/sed_format.html index 7e79ca46..7cb783bb 100644 --- a/doc/html/boost_regex/format/sed_format.html +++ b/doc/html/boost_regex/format/sed_format.html @@ -1,13 +1,13 @@ - Sed Format String Syntax +Sed Format String Syntax - + - - - + + + @@ -24,7 +24,8 @@

Sed-style format strings treat all characters as literals except:

@@ -234,10 +235,11 @@
- +

+

diff --git a/doc/html/boost_regex/install.html b/doc/html/boost_regex/install.html index 37092833..769edc11 100644 --- a/doc/html/boost_regex/install.html +++ b/doc/html/boost_regex/install.html @@ -1,14 +1,13 @@ - Building and Installing the Library +Building and Installing the Library - + - - + + @@ -25,7 +24,8 @@

When you extract the library from its zip file, you must preserve its internal directory structure (for example by using the -d option when extracting). If @@ -48,20 +48,20 @@ 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:

-

- +

+ Building with bjam -
+

This is now the preferred method for building and installing this library, please refer to the getting started guide for more information.

-

- +

+ Building With Unicode and ICU Support -
+

A default build of this library does not enable Unciode support via ICU. There is no need to enable this support if you don't need it, but if you use ICU @@ -75,16 +75,16 @@

If you're building on a Unix-like platform, and ICU is already installed in - your compilers search path (with an install prefix of /usr or /usr/local - for example), then set the environment variable HAVE_ICU + your compilers search path (with an install prefix of /usr or /usr/local + for example), then set the environment variable HAVE_ICU to enable ICU support. For example you might build with the command line:

bjam -sHAVE_ICU=1 --toolset=toolset-name install

If ICU is not already in your compiler's path then you need to set the environment - variable ICU_PATH to point + variable ICU_PATH to point to the root directory of your ICU installation, for example if ICU was installed - to /usr/local/icu/3.3 + to /usr/local/icu/3.3 you might use:

bjam -sICU_PATH=/usr/local/icu/3.3 --toolset=toolset-name install
@@ -95,17 +95,17 @@ ensure that this is the case: it is up to you to ensure that the version of ICU you are using is binary compatible with the toolset you use to build Boost.

-

- +

+ Building via makefiles -
-
- - Borland C++ Builder:
+
+ + Borland C++ Builder: +
  • - Open up a console window and change to the <boost>\libs\regex\build + Open up a console window and change to the <boost>\libs\regex\build directory.
  • @@ -127,7 +127,7 @@

    make -fbcb5.mak install

    - library files will be copied to <BCROOT>/lib and the dll's to <BCROOT>/bin, where <BCROOT> + library files will be copied to <BCROOT>/lib and the dll's to <BCROOT>/bin, where <BCROOT> corresponds to the install path of your Borland C++ tools.

    @@ -136,7 +136,7 @@

    make -fbcb5.mak clean

    - Finally when you use Boost.Regex it is only necessary for you to add the <boost> root director to your list of include directories + Finally when you use Boost.Regex it is only necessary for you to add the <boost> root director to your list of include directories for that project. It is not necessary for you to manually add a .lib file to the project; the headers will automatically select the correct .lib file for your build mode and tell the linker to include it. There is one caveat however: @@ -159,17 +159,17 @@ build of the lib) then define BOOST_REGEX_NO_LIB.

    - If you are building with C++ Builder 6, you will find that <boost/regex.hpp> - can not be used in a pre-compiled header (the actual problem is in <locale> which gets included by <boost/regex.hpp>), + If you are building with C++ Builder 6, you will find that <boost/regex.hpp> + can not be used in a pre-compiled header (the actual problem is in <locale> which gets included by <boost/regex.hpp>), if this causes problems for you, then try defining BOOST_NO_STD_LOCALE when building, this will disable some features throughout boost, but may save you a lot in compile times!

    -

    - +

    + Microsoft Visual C++ 6, 7, 7.1 and 8 -
    +

    You need version 6 or later of MSVC to build this library. If you are using VC5 then you may want to look at one of the previous releases of this library. @@ -177,7 +177,7 @@

    Open up a command prompt, which has the necessary MSVC environment variables defined (for example by using the batch file Vcvars32.bat installed by the - Visual Studio installation), and change to the <boost>\libs\regex\build directory. + Visual Studio installation), and change to the <boost>\libs\regex\build directory.

    Select the correct makefile - vc6.mak for "vanilla" Visual C++ 6 @@ -193,7 +193,7 @@

    nmake -fvc6.mak install

    - The lib files will be copied to your <VC6>\lib directory and the dll files to <VC6>\bin, where <VC6> is + The lib files will be copied to your <VC6>\lib directory and the dll files to <VC6>\bin, where <VC6> is the root of your Visual C++ 6 installation.

    @@ -207,7 +207,7 @@

    nmake ICU_PATH=c:\open-source\icu -fvc71.mak install

    - Finally when you use Boost.Regex it is only necessary for you to add the <boost> root directory to your list of include + Finally when you use Boost.Regex it is only necessary for you to add the <boost> root directory to your list of include directories for that project. It is not necessary for you to manually add a .lib file to the project; the headers will automatically select the correct .lib file for your build mode and tell the linker to include it. @@ -252,12 +252,12 @@ to modify the makefile to add /Zc:wchar_t before building the library.

-
- +
+ GCC(2.95 and later) -
+

- You can build with gcc using the normal boost Jamfile in <boost>/libs/regex/build, alternatively + You can build with gcc using the normal boost Jamfile in <boost>/libs/regex/build, alternatively there is a conservative makefile for the g++ compiler. From the command prompt change to the <boost>/libs/regex/build directory and type:

@@ -298,16 +298,16 @@ LIBS: additional library files.

- For the more adventurous there is a configure script in <boost>/libs/config; + For the more adventurous there is a configure script in <boost>/libs/config; see the config library documentation.

-
- +
+ Sun Workshop 6.1 -
+

There is a makefile for the sun (6.1) compiler (C++ version 3.12). From the - command prompt change to the <boost>/libs/regex/build directory + command prompt change to the <boost>/libs/regex/build directory and type:

dmake -f sunpro.mak 
@@ -316,7 +316,7 @@ single and multithread versions of the library (libboost_regex.a, libboost_regex.so, libboost_regex_mt.a and libboost_regex_mt.so). When you build projects that use Boost.Regex, you will need to add the boost install directory to your list - of include paths and add <boost>/libs/regex/build/sunpro/ to + of include paths and add <boost>/libs/regex/build/sunpro/ to your library search path.

@@ -342,26 +342,27 @@ This makefile does not set any architecture specific options like -xarch=v9, you can set these by defining the appropriate macros, for example:

-
dmake CXXFLAGS="-xarchv9" LDFLAGS"-xarchv9" LIBSUFFIX"_v9" -f sunpro.mak
+
dmake CXXFLAGS="-xarchv9" LDFLAGS"-xarchv9" LIBSUFFIX"_v9" -f sunpro.mak

will build v9 variants of the regex library named libboost_regex_v9.a etc.

-
- +
+ Makefiles for Other compilers -
+

- There is a generic makefile (generic.mak ) provided in <boost-root>/libs/regex/build - see that makefile for details of + There is a generic makefile (generic.mak ) provided in <boost-root>/libs/regex/build - see that makefile for details of environment variables that need to be set before use.

- +

+

diff --git a/doc/html/boost_regex/introduction_and_overview.html b/doc/html/boost_regex/introduction_and_overview.html index ad97c7eb..b43e443a 100644 --- a/doc/html/boost_regex/introduction_and_overview.html +++ b/doc/html/boost_regex/introduction_and_overview.html @@ -1,14 +1,13 @@ -Introduction and - Overview +Introduction and Overview - + - - + + @@ -25,9 +24,9 @@

Regular expressions are a form of pattern-matching that are often used in text processing; many users will be familiar with the Unix utilities grep, sed and @@ -40,16 +39,15 @@ libraries can not do.

- The class basic_regex + The class basic_regex is the key class in this library; it represents a "machine readable" - regular expression, and is very closely modeled on std::basic_string, + regular expression, and is very closely modeled on std::basic_string, think of it as a string plus the actual state-machine required by the regular - expression algorithms. Like std::basic_string + expression algorithms. Like std::basic_string there are two typedefs that are almost always the means by which this class is referenced:

-
-namespace boost{
+
namespace boost{
 
 template <class charT, 
          class traits = regex_traits<charT> >
@@ -87,8 +85,7 @@
       Now let's take that expression and place it in some C++ code to validate the
       format of a credit card number:
     

-
-bool validate_card_format(const std::string& s)
+
bool validate_card_format(const std::string& s)
 {
    static const boost::regex e("(\\d{4}[- ]){3}\\d{4}");
    return regex_match(s, e);
@@ -100,7 +97,7 @@
       regular expression engine, consequently escapes in regular expressions have
       to be doubled up when embedding them in C/C++ code. Also note that all the
       examples assume that your compiler supports argument-dependent-lookup lookup,
-      if yours doesn't (for example VC6), then you will have to add some boost:: prefixes
+      if yours doesn't (for example VC6), then you will have to add some boost:: prefixes
       to some of the function calls in the examples.
     

@@ -113,11 +110,10 @@ the utilities sed and Perl will already be ahead here; we need two strings - one a regular expression - the other a "format string" that provides a description of the text to replace the match with. In Boost.Regex this search - and replace operation is performed with the algorithm regex_replace, for our credit card + and replace operation is performed with the algorithm regex_replace, for our credit card example we can write two algorithms like this to provide the format conversions:

-
-// match any format with the regular expression:
+
// match any format with the regular expression:
 const boost::regex e("\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z");
 const std::string machine_format("\\1\\2\\3\\4");
 const std::string human_format("\\1-\\2-\\3-\\4");
@@ -142,11 +138,10 @@
       expression match, however in general the result of a match contains a number
       of sub-expression matches in addition to the overall match. When the library
       needs to report a regular expression match it does so using an instance of
-      the class match_results,
+      the class match_results,
       as before there are typedefs of this class for the most common cases:
     

-
-namespace boost{
+
namespace boost{
 
 typedef match_results<const char*>                  cmatch;
 typedef match_results<const wchar_t*>               wcmatch;
@@ -156,12 +151,12 @@
 }
 

- The algorithms regex_search - and regex_match - make use of match_results - to report what matched; the difference between these algorithms is that regex_match + The algorithms regex_search + and regex_match + make use of match_results + to report what matched; the difference between these algorithms is that regex_match will only find matches that consume all of the input text, - where as regex_search + where as regex_search will search for a match anywhere within the text being matched.

@@ -170,22 +165,21 @@ of seamlessly searching almost any kind of data.

- For search and replace operations, in addition to the algorithm regex_replace that we have already - seen, the match_results - class has a format member that + For search and replace operations, in addition to the algorithm regex_replace that we have already + seen, the match_results + class has a format member that takes the result of a match and a format string, and produces a new string by merging the two.

For iterating through all occurences of an expression within a text, there - are two iterator types: regex_iterator will enumerate over - the match_results - objects found, while regex_token_iterator will enumerate + are two iterator types: regex_iterator will enumerate over + the match_results + objects found, while regex_token_iterator will enumerate a series of strings (similar to perl style split operations).

- For those that dislike templates, there is a high level wrapper class RegEx + For those that dislike templates, there is a high level wrapper class RegEx that is an encapsulation of the lower level template code - it provides a simplified interface for those that don't need the full power of the library, and supports only narrow characters, and the "extended" regular expression syntax. @@ -193,12 +187,12 @@ C++ standard library proposal.

- The POSIX API functions: regcomp, regexec, regfree and [regerr], are available + The POSIX API functions: regcomp, regexec, regfree and [regerr], are available in both narrow character and Unicode versions, and are provided for those who need compatibility with these API's.

- Finally, note that the library now has run-time + Finally, note that the library now has run-time localization support, and recognizes the full POSIX regular expression syntax - including advanced features like multi-character collating elements and equivalence classes - as well as providing compatibility with other regular @@ -207,10 +201,11 @@

- +

+

diff --git a/doc/html/boost_regex/partial_matches.html b/doc/html/boost_regex/partial_matches.html index b5befab7..16614be2 100644 --- a/doc/html/boost_regex/partial_matches.html +++ b/doc/html/boost_regex/partial_matches.html @@ -1,14 +1,13 @@ - Partial Matches +Partial Matches - + - - + + @@ -25,13 +24,13 @@

- The match_flag_type - match_partial can be passed - to the following algorithms: regex_match, regex_search, and regex_grep, and used with the iterator - regex_iterator. + The match_flag_type + match_partial can be passed + to the following algorithms: regex_match, regex_search, and regex_grep, and used with the iterator + regex_iterator. When used it indicates that partial as well as full matches should be found. A partial match is one that matched one or more characters at the end of the text input, but did not match all of the regular expression (although it may @@ -41,10 +40,9 @@ into memory (or even into a memory mapped file), or are of indeterminate length (for example the source may be a socket or similar). Partial and full matches can be differentiated as shown in the following table (the variable M represents - an instance of match_results as filled in by regex_match, - regex_search - or regex_grep): + an instance of match_results as filled in by regex_match, + regex_search + or regex_grep):

@@ -186,7 +184,7 @@

The following example tests to see whether the text could be a valid credit card number, as the user presses a key, the character entered would be added - to the string being built up, and passed to is_possible_card_number. + to the string being built up, and passed to is_possible_card_number. If this returns true then the text could be a valid card number, so the user interface's OK button would be enabled. If it returns false, then this is not yet a valid card number, but could be with more input, so the user interface @@ -194,8 +192,7 @@ the input could never become a valid number, and the inputted character must be discarded, and a suitable error indication displayed to the user.

-
-#include <string>
+
#include <string>
 #include <iostream>
 #include <boost/regex.hpp>
 
@@ -230,8 +227,7 @@
       if a partial match was encountered, then the partial match gets searched a
       second time as the start of the next batch of text:
     

-
-#include <iostream>
+
#include <iostream>
 #include <fstream>
 #include <sstream>
 #include <string>
@@ -297,10 +293,11 @@
 
 
- +

+

diff --git a/doc/html/boost_regex/ref.html b/doc/html/boost_regex/ref.html index 5bf87bab..dc6e496c 100644 --- a/doc/html/boost_regex/ref.html +++ b/doc/html/boost_regex/ref.html @@ -1,14 +1,13 @@ - Reference +Reference - + - - + + @@ -25,7 +24,8 @@
basic_regex
match_results
@@ -91,7 +91,7 @@
Traits Class Requirements
Iterator - Rrequirements
+ Requirements
Deprecated Interfaces
@@ -105,35 +105,14 @@ Level Class RegEx (Deprecated)
-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

- +

+

diff --git a/doc/html/boost_regex/ref/bad_expression.html b/doc/html/boost_regex/ref/bad_expression.html index 53c10241..bbffbd53 100644 --- a/doc/html/boost_regex/ref/bad_expression.html +++ b/doc/html/boost_regex/ref/bad_expression.html @@ -1,13 +1,13 @@ - bad_expression +bad_expression - + - - - + + + @@ -24,21 +24,20 @@ +
+ Synopsis -
-
-#include <boost/pattern_except.hpp>
+      
+
#include <boost/pattern_except.hpp>
 

- The class regex_error defines + The class regex_error defines the type of objects thrown as exceptions to report errors during the conversion from a string representing a regular expression to a finite state machine.

-
-namespace boost{
+
namespace boost{
 
 class regex_error : public std::runtime_error
 {
@@ -54,49 +53,47 @@
 
 } // namespace boost
 
-

- +

+ Description -
-
-regex_error(const std::string& s, regex_constants::error_type err, std::ptrdiff_t pos);
+      
+
regex_error(const std::string& s, regex_constants::error_type err, std::ptrdiff_t pos);
 regex_error(boost::regex_constants::error_type err);
 

- Effects: Constructs an object of class regex_error. + Effects: Constructs an object of class regex_error.

-
-boost::regex_constants::error_type code()const;
+
boost::regex_constants::error_type code()const;
 

- Effects: returns the error code that represents + 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 + Effects: returns the location in the expression where parsing stopped.

- Footnotes: the choice of std::runtime_error - as the base class for regex_error + Footnotes: the choice of std::runtime_error + as the base class for regex_error is moot; depending upon how the library is used exceptions may be either logic errors (programmer supplied expressions) or run time errors (user supplied - expressions). The library previously used bad_pattern - and bad_expression for errors, - these have been replaced by the single class regex_error + expressions). The library previously used bad_pattern + and bad_expression for errors, + these have been replaced by the single class regex_error to keep the library in synchronization with the Technical Report on C++ Library Extensions.

- +

+

diff --git a/doc/html/boost_regex/ref/basic_regex.html b/doc/html/boost_regex/ref/basic_regex.html index 905f35e0..6c312c65 100644 --- a/doc/html/boost_regex/ref/basic_regex.html +++ b/doc/html/boost_regex/ref/basic_regex.html @@ -1,13 +1,13 @@ - basic_regex +basic_regex - + - - - + + + @@ -24,43 +24,40 @@ +
+ Synopsis -
-
-#include <boost/regex.hpp>
+      
+
#include <boost/regex.hpp>
 

- The template class basic_regex + The template class basic_regex encapsulates regular expression parsing and compilation. The class takes two template parameters:

- For ease of use there are two typedefs that define the two standard basic_regex instances, unless you want + For ease of use there are two typedefs that define the two standard basic_regex instances, unless you want to use custom traits classes or non-standard character types (for example - see unicode support), + see unicode support), you won't need to use anything other than these:

-
-namespace boost{
+
namespace boost{
 
 template <class charT, class traits = regex_traits<charT>  >
 class basic_regex;
@@ -71,12 +68,11 @@
 }
 

- The definition of basic_regex - follows: it is based very closely on class basic_string, - and fulfils the requirements for a constant-container of charT. + The definition of basic_regex + follows: it is based very closely on class basic_string, + and fulfils the requirements for a constant-container of charT.

-
-namespace boost{
+
namespace boost{
 
 template <class  charT, class traits = regex_traits<charT> >
 class basic_regex {
@@ -89,66 +85,66 @@
    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          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:
@@ -246,94 +242,92 @@
 
 } // namespace boost
 
-

- +

+ Description -
+

- Class basic_regex has the + Class basic_regex has the following public members:

-
-// main option selection:
-static const regex_constants:: syntax_option_type normal           
+
// main option selection:
+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;
 

- The meaning of these options is documented in the syntax_option_type section. + The meaning of these options is documented in the syntax_option_type section.

The static constant members are provided as synonyms for the constants declared - in namespace boost::regex_constants; for each constant of type - syntax_option_type - declared in namespace boost::regex_constants + in namespace boost::regex_constants; for each constant of type + syntax_option_type + declared in namespace boost::regex_constants then a constant with the same name, type and value is declared within the scope of basic_regex.

-
-basic_regex();
+
basic_regex();
 

- Effects: Constructs an object of class - basic_regex. + Effects: Constructs an object of class + basic_regex.

-

Table 1. basic_regex default construction postconditions

-
+

Table 1. basic_regex default construction postconditions

+
@@ -354,67 +348,66 @@ -

- empty() + empty()

- true + true

- size() + size()

- 0 + 0

- str() + str()

- basic_string<charT>() + basic_string<charT>()

+
-

+

-
-basic_regex(const charT* p, flag_type f = regex_constants::normal);
+
basic_regex(const charT* p, flag_type f = regex_constants::normal);
 

- Requires: p shall not + Requires: p shall not be a null pointer.

- Throws: bad_expression if p - is not a valid regular expression, unless the flag no_except + Throws: bad_expression if p + is not a valid regular expression, unless the flag no_except is set in f.

- Effects: Constructs an object of class - basic_regex; + Effects: Constructs an object of class + basic_regex; the object's internal finite state machine is constructed from the regular expression contained in the null-terminated string p, - and interpreted according to the option + and interpreted according to the option flags specified in f.

-

Table 2. Postconditions for basic_regex construction

- +

Table 2. Postconditions for basic_regex construction

+
@@ -435,43 +428,43 @@ -

- empty() + empty()

- false + false

- size() + size()

- char_traits<charT>::length(p) + char_traits<charT>::length(p)

- str() + str()

- basic_string<charT>(p) + basic_string<charT>(p)

- flags() + flags()

@@ -483,7 +476,7 @@

- mark_count() + mark_count()

@@ -493,34 +486,33 @@
+
-

+

-
-basic_regex(const charT* p1, const charT* p2, 
+
basic_regex(const charT* p1, const charT* p2, 
             flag_type f = regex_constants::normal);
 

- Requires: p1 and p2 - are not null pointers, p1 < p2. + Requires: p1 and p2 + are not null pointers, p1 < p2.

- Throws: bad_expression if [p1,p2) is not - a valid regular expression, unless the flag no_except + Throws: bad_expression if [p1,p2) is not + a valid regular expression, unless the flag no_except is set in f.

- Effects: Constructs an object of class - basic_regex; + Effects: Constructs an object of class + basic_regex; the object's internal finite state machine is constructed from the regular expression contained in the sequence of characters [p1,p2), and interpreted - according the option flags + according the option flags specified in f.

-

Table 3. Postconditions for basic_regex construction

- +

Table 3. Postconditions for basic_regex construction

+
@@ -541,43 +533,43 @@ -

- empty() + empty()

- false + false

- size() + size()

- std::distance(p1,p2) + std::distance(p1,p2)

- str() + str()

- basic_string<charT>(p1,p2) + basic_string<charT>(p1,p2)

- flags() + flags()

@@ -589,7 +581,7 @@

- mark_count() + mark_count()

@@ -599,33 +591,32 @@
+
-

+

-
-basic_regex(const charT* p, size_type len, flag_type f);
+
basic_regex(const charT* p, size_type len, flag_type f);
 

- Requires: p shall not - be a null pointer, len < - max_size(). + Requires: p shall not + be a null pointer, len < + max_size().

- Throws: bad_expression if p - is not a valid regular expression, unless the flag no_except + Throws: bad_expression if p + is not a valid regular expression, unless the flag no_except is set in f.

- Effects: Constructs an object of class - basic_regex; + Effects: Constructs an object of class + basic_regex; the object's internal finite state machine is constructed from the regular expression contained in the sequence of characters [p, p+len), and interpreted according the option flags specified in f.

-

Table 4. Postconditions for basic_regex construction

- +

Table 4. Postconditions for basic_regex construction

+
@@ -646,19 +637,19 @@ -

- empty() + empty()

- false + false

- size() + size()

@@ -670,19 +661,19 @@

- str() + str()

- basic_string<charT>(p, len) + basic_string<charT>(p, len)

- flags() + flags()

@@ -694,7 +685,7 @@

- mark_count() + mark_count()

@@ -704,41 +695,39 @@
+
-

+

-
-basic_regex(const basic_regex& e);
+
basic_regex(const basic_regex& e);
 

- Effects: Constructs an object of class - basic_regex + Effects: Constructs an object of class + basic_regex as a copy of the object e.

-
-template <class ST, class SA>
+
template <class ST, class SA>
 basic_regex(const basic_string<charT, ST, SA>& s, 
             flag_type f = regex_constants::normal);
 

- Throws: bad_expression if s - is not a valid regular expression, unless the flag no_except + Throws: bad_expression if s + is not a valid regular expression, unless the flag no_except is set in f.

- Effects: Constructs an object of class - basic_regex; + Effects: Constructs an object of class + basic_regex; the object's internal finite state machine is constructed from the regular expression contained in the string s, and interpreted - according to the option + according to the option flags specified in f.

-

Table 5. Postconditions for basic_regex construction

- +

Table 5. Postconditions for basic_regex construction

+
@@ -759,31 +748,31 @@ -

- empty() + empty()

- false + false

- size() + size()

- s.size() + s.size()

- str() + str()

@@ -795,7 +784,7 @@

- flags() + flags()

@@ -807,7 +796,7 @@

- mark_count() + mark_count()

@@ -817,31 +806,30 @@
+
-

+

-
-template <class ForwardIterator>
+
template <class ForwardIterator>
 basic_regex(ForwardIterator first, ForwardIterator last, 
             flag_type f = regex_constants::normal);
 

- Throws: bad_expression if the sequence [first, - last) is not a valid regular expression, unless the flag no_except + Throws: bad_expression if the sequence [first, + last) is not a valid regular expression, unless the flag no_except is set in f.

- Effects: Constructs an object of class - basic_regex; + Effects: Constructs an object of class + basic_regex; the object's internal finite state machine is constructed from the regular expression contained in the sequence of characters [first, last), and interpreted - according to the option + according to the option flags specified in f.

-

Table 6. Postconditions for basic_regex construction

- +

Table 6. Postconditions for basic_regex construction

+
@@ -862,43 +850,43 @@ -

- empty() + empty()

- false + false

- size() + size()

- distance(first,last) + distance(first,last)

- str() + str()

- basic_string<charT>(first,last) + basic_string<charT>(first,last)

- flags() + flags()

@@ -910,7 +898,7 @@

- mark_count() + mark_count()

@@ -920,139 +908,126 @@
+
-

+

-
-basic_regex& operator=(const basic_regex& e);
+
basic_regex& operator=(const basic_regex& e);
 

- Effects: Returns the result of assign(e.str(), e.flags()). + Effects: Returns the result of assign(e.str(), e.flags()).

-
-basic_regex& operator=(const charT* ptr);
+
basic_regex& operator=(const charT* ptr);
 

- Requires: p shall not + Requires: p shall not be a null pointer.

- Effects: Returns the result of assign(ptr). + Effects: Returns the result of assign(ptr).

-
-template <class ST, class SA>
+
template <class ST, class SA>
 basic_regex& operator=(const basic_string<charT, ST, SA>& p);
 

- Effects: Returns the result of assign(p). + Effects: Returns the result of assign(p).

-
-const_iterator begin() const;
+
const_iterator begin() const;
 

- Effects: Returns a starting iterator to + Effects: Returns a starting iterator to a sequence of characters representing the regular expression.

-
-const_iterator end() const;
+
const_iterator end() const;
 

- Effects: Returns termination iterator to + Effects: Returns termination iterator to a sequence of characters representing the regular expression.

-
-size_type size() const;
+
size_type size() const;
 

- Effects: Returns the length of the sequence + Effects: Returns the length of the sequence of characters representing the regular expression.

-
-size_type max_size() const;
+
size_type max_size() const;
 

- Effects: Returns the maximum length of the + Effects: Returns the maximum length of the sequence of characters representing the regular expression.

-
-bool empty() const;
+
bool empty() const;
 

- Effects: Returns true if the object does + Effects: Returns true if the object does not contain a valid regular expression, otherwise false.

-
-unsigned mark_count() const;
+
unsigned mark_count() const;
 

- Effects: Returns the number of marked sub-expressions + Effects: Returns the number of marked sub-expressions within the regular expresion.

-
-basic_regex& assign(const basic_regex& that);
+
basic_regex& assign(const basic_regex& that);
 

- Effects: Returns assign(that.str(), that.flags()). + Effects: Returns assign(that.str(), that.flags()).

-
-basic_regex& assign(const charT* ptr, flag_type f = regex_constants::normal);
+
basic_regex& assign(const charT* ptr, flag_type f = regex_constants::normal);
 

- Effects: Returns assign(string_type(ptr), f). + Effects: Returns assign(string_type(ptr), f).

-
-basic_regex& assign(const charT* ptr, unsigned int len, flag_type f);
+
basic_regex& assign(const charT* ptr, unsigned int len, flag_type f);
 

- Effects: Returns assign(string_type(ptr, len), f). + Effects: Returns assign(string_type(ptr, len), f).

-
-template <class string_traits, class A>
+
template <class string_traits, class A>
 basic_regex& assign(const basic_string<charT, string_traits, A>& s,
                   flag_type f = regex_constants::normal);
 

- Throws: bad_expression if s - is not a valid regular expression, unless the flag no_except + Throws: bad_expression if s + is not a valid regular expression, unless the flag no_except is set in f.

- Returns: *this. + Returns: *this.

- Effects: Assigns the regular expression + Effects: Assigns the regular expression contained in the string s, interpreted according the - option flags specified + option flags specified in f.

-

Table 7. Postconditions for basic_regex::assign

- +

Table 7. Postconditions for basic_regex::assign

+
@@ -1073,31 +1048,31 @@ -

- empty() + empty()

- false + false

- size() + size()

- s.size() + s.size()

- str() + str()

@@ -1109,7 +1084,7 @@

- flags() + flags()

@@ -1121,7 +1096,7 @@

- mark_count() + mark_count()

@@ -1131,222 +1106,207 @@
+
-

+

-
-template <class InputIterator>
+
template <class InputIterator>
 basic_regex& assign(InputIterator first, InputIterator last,
                     flag_type f = regex_constants::normal);
 

- Requires: The type InputIterator + Requires: The type InputIterator corresponds to the Input Iterator requirements (24.1.1).

- Effects: Returns assign(string_type(first, last), f). + Effects: Returns assign(string_type(first, last), f).

-
-flag_type flags() const;
+
flag_type flags() const;
 

- Effects: Returns a copy of the regular + Effects: Returns a copy of the regular expression syntax flags that were passed to the object's constructor, - or the last call to assign. + or the last call to assign.

-
-int status() const;
+
int status() const;
 

- Effects: Returns zero if the expression + Effects: Returns zero if the expression contains a valid regular expression, otherwise an error code. This member function is retained for use in environments that cannot use exception handling.

-
-basic_string<charT> str() const;
+
basic_string<charT> str() const;
 

- Effects: Returns a copy of the character + Effects: Returns a copy of the character sequence passed to the object's constructor, or the last call to assign.

-
-int compare(basic_regex& e)const;
+
int compare(basic_regex& e)const;
 

- Effects: If flags() == e.flags() then returns str().compare(e.str()), - otherwise returns flags() - - e.flags(). + Effects: If flags() == e.flags() then returns str().compare(e.str()), + otherwise returns flags() + - e.flags().

-
-locale_type imbue(locale_type l);
+
locale_type imbue(locale_type l);
 

- Effects: Returns the result of traits_inst.imbue(l) where - traits_inst is a (default - initialized) instance of the template parameter traits - stored within the object. Calls to imbue + Effects: Returns the result of traits_inst.imbue(l) where + traits_inst is a (default + initialized) instance of the template parameter traits + stored within the object. Calls to imbue invalidate any currently contained regular expression.

- Postcondition: empty() == true. + Postcondition: empty() == true.

-
-locale_type getloc() const;
+
locale_type getloc() const;
 

- Effects: Returns the result of traits_inst.getloc() - where traits_inst is a (default + Effects: Returns the result of traits_inst.getloc() + where traits_inst is a (default initialized) instance of the template parameter traits stored within the object.

-
-void swap(basic_regex& e) throw();
+
void swap(basic_regex& e) throw();
 

- Effects: Swaps the contents of the two regular + Effects: Swaps the contents of the two regular expressions.

- Postcondition: *this contains the regular expression that + Postcondition: *this contains the regular expression that was in e, e contains the regular - expression that was in *this. + expression that was in *this.

- Complexity: constant time. + Complexity: constant time.

-
[Note] Note

- Comparisons between basic_regex objects are provided +

+ Comparisons between basic_regex objects are provided on an experimental basis: please note that these are not present in the Technical Report on C++ Library Extensions, so use with care if you are writing - code that may need to be ported to other implementations of basic_regex. + code that may need to be ported to other implementations of basic_regex.

-
-template <class charT, class traits>
+
template <class charT, class traits>
 bool operator == (const basic_regex<charT, traits>& lhs,
                   const basic_regex<charT, traits>& rhs);
 

- Effects: Returns lhs.compare(rhs) - == 0. + Effects: Returns lhs.compare(rhs) + == 0.

-
-template <class charT, class traits>
+
template <class charT, class traits>
 bool operator != (const basic_regex<charT, traits>& lhs,
                   const basic_regex<charT, traits>& rhs);
 

- Effects: Returns lhs.compare(rhs) - != 0. + Effects: Returns lhs.compare(rhs) + != 0.

-
-template <class charT, class traits>
+
template <class charT, class traits>
 bool operator < (const basic_regex<charT, traits>& lhs,
                const basic_regex<charT, traits>& rhs);
 

- Effects: Returns lhs.compare(rhs) - < 0. + Effects: Returns lhs.compare(rhs) + < 0.

-
-template <class charT, class traits>
+
template <class charT, class traits>
 bool operator <= (const basic_regex<charT, traits>& lhs,
                   const basic_regex<charT, traits>& rhs);
 

- Effects: Returns lhs.compare(rhs) - <= 0. + Effects: Returns lhs.compare(rhs) + <= 0.

-
-template <class charT, class traits>
+
template <class charT, class traits>
 bool operator >= (const basic_regex<charT, traits>& lhs,
                   const basic_regex<charT, traits>& rhs);
 

- Effects: Returns lhs.compare(rhs) - >= 0. + Effects: Returns lhs.compare(rhs) + >= 0.

-
-template <class charT, class traits>
+
template <class charT, class traits>
 bool operator > (const basic_regex<charT, traits>& lhs,
                const basic_regex<charT, traits>& rhs);
 

- Effects: Returns lhs.compare(rhs) - > 0. + Effects: Returns lhs.compare(rhs) + > 0.

-
[Note] Note

+

The basic_regex stream inserter is provided on an experimental basis, and outputs the textual representation of the expression to the stream.

-
-template <class charT, class io_traits, class re_traits>
+
template <class charT, class io_traits, class re_traits>
 basic_ostream<charT, io_traits>&
    operator << (basic_ostream<charT, io_traits>& os
                const basic_regex<charT, re_traits>& e);
 

- Effects: Returns (os << e.str()). + Effects: Returns (os << e.str()).

-
-template <class charT, class traits>
+
template <class charT, class traits>
 void swap(basic_regex<charT, traits>& lhs,
          basic_regex<charT, traits>& rhs);
 

- Effects: calls lhs.swap(rhs). + Effects: calls lhs.swap(rhs).

- +

+

diff --git a/doc/html/boost_regex/ref/concepts.html b/doc/html/boost_regex/ref/concepts.html index 92dd469b..528bfbb8 100644 --- a/doc/html/boost_regex/ref/concepts.html +++ b/doc/html/boost_regex/ref/concepts.html @@ -1,13 +1,13 @@ - Concepts +Concepts - + - - - + + + @@ -24,21 +24,23 @@
- +

+

diff --git a/doc/html/boost_regex/ref/concepts/charT_concept.html b/doc/html/boost_regex/ref/concepts/charT_concept.html index b4a51491..fe73b1e5 100644 --- a/doc/html/boost_regex/ref/concepts/charT_concept.html +++ b/doc/html/boost_regex/ref/concepts/charT_concept.html @@ -1,14 +1,13 @@ - charT Requirements +charT Requirements - + - - - + + + @@ -25,16 +24,17 @@

- Type charT used a template - argument to class template basic_regex, must have a trivial + Type charT used a template + argument to class template basic_regex, must have a trivial default constructor, copy constructor, assignment operator, and destructor. In addition the following requirements must be met for objects; c - of type charT, c1 - and c2 of type charT - const, and i - of type int: + of type charT, c1 + and c2 of type charT + const, and i + of type int:

@@ -258,10 +258,11 @@
- +

+

diff --git a/doc/html/boost_regex/ref/concepts/iterator_concepts.html b/doc/html/boost_regex/ref/concepts/iterator_concepts.html index 8e117a29..5f624d52 100644 --- a/doc/html/boost_regex/ref/concepts/iterator_concepts.html +++ b/doc/html/boost_regex/ref/concepts/iterator_concepts.html @@ -1,14 +1,12 @@ - Iterator - Rrequirements +Iterator Requirements - + - - + + @@ -26,19 +24,20 @@

The regular expression algorithms (and iterators) take all require a Bidirectional-Iterator.

- +

+

diff --git a/doc/html/boost_regex/ref/concepts/traits_concept.html b/doc/html/boost_regex/ref/concepts/traits_concept.html index 5a634cad..3ddc5295 100644 --- a/doc/html/boost_regex/ref/concepts/traits_concept.html +++ b/doc/html/boost_regex/ref/concepts/traits_concept.html @@ -1,15 +1,13 @@ - Traits Class - Requirements +Traits Class Requirements - + - - - + + + @@ -26,37 +24,37 @@

- There are two sets of requirements for the traits - template argument to basic_regex: a mininal interface + There are two sets of requirements for the traits + template argument to basic_regex: a mininal interface (which is part of the regex standardization proposal), and an optional Boost-specific enhanced interface.

-

- +

+ Minimal requirements. -
+

- In the following table X + In the following table X denotes a traits class defining types and functions for the character container - type charT; u - is an object of type X; - v is an object of type const - X; p is - a value of type const charT*; I1 and I2 - are Input Iterators; c is a value of type const charT; - s is an object of type X::string_type; - cs is an object of type const - X::string_type; b is - a value of type bool; I - is a value of type int; F1 - and F2 are values of type const - charT*; - and loc is an object of type X::locale_type. + type charT; u + is an object of type X; + v is an object of type const + X; p is + a value of type const charT*; I1 and I2 + are Input Iterators; c is a value of type const charT; + s is an object of type X::string_type; + cs is an object of type const + X::string_type; b is + a value of type bool; I + is a value of type int; F1 + and F2 are values of type const + charT*; + and loc is an object of type X::locale_type.

@@ -329,7 +327,7 @@ - - - - -

- v.value(c, i) + v.value(c, I)

@@ -380,39 +378,19 @@

-

- v.error_string(i) -

-
-

- std::string -

-
-

- Returns a human readable error string for the error condition i, - where i is one of the values enumerated by type regex_constants::error_type. - If the value i is not recognized then returns the string "Unknown - error" or a localized equivalent. -

-
-

- +

+ Additional Optional Requirements -
+

The following additional requirements are strictly optional, however in - order for basic_regex + order for basic_regex to take advantage of these additional interfaces, all of the following - requirements must be met; basic_regex will detect the presence - or absense of the member boost_extensions_tag + requirements must be met; basic_regex will detect the presence + or absense of the member boost_extensions_tag and configure itself appropriately.

@@ -493,8 +471,8 @@ that signifies the meaning of character c within the regular expression grammar, when c has been preceded by an escape character. Precondition: if b is the character preceding c in the expression being parsed - then: v.syntax_type(b) - == syntax_escape + then: v.syntax_type(b) + == syntax_escape

@@ -512,9 +490,9 @@ @@ -531,9 +509,9 @@ @@ -601,10 +579,11 @@

Returns a character d such that: for any character d that is to - be considered equivalent to c then v.translate(c,false)==v.translate(d,false). Likewise for all characters C + be considered equivalent to c then v.translate(c,false)==v.translate(d,false). Likewise for all characters C that are to be considered equivalent to c when comparisons are - to be performed without regard to case, then v.translate(c,true)==v.translate(C,true). + to be performed without regard to case, then v.translate(c,true)==v.translate(C,true).

- Behaves as follows: if p - == q - or if *p + Behaves as follows: if p + == q + or if *p is not a digit character then returns -1. Otherwise performs formatted numeric input on the sequence [p,q) and returns the result as an int. Postcondition: either p == q or *p is a non-digit character. @@ -543,7 +521,7 @@

- v.error_string(i) + v.error_string(I)

@@ -555,8 +533,8 @@

Returns a human readable error string for the error condition i, where i is one of the values enumerated by type regex_constants::error_type. - If the value i is not recognized then returns the string "Unknown - error" or a localized equivalent. + If the value I is not recognized then returns + the string "Unknown error" or a localized equivalent.

- +

+

diff --git a/doc/html/boost_regex/ref/deprecated_interfaces.html b/doc/html/boost_regex/ref/deprecated_interfaces.html index 7d3f52f1..4a3ee0b5 100644 --- a/doc/html/boost_regex/ref/deprecated_interfaces.html +++ b/doc/html/boost_regex/ref/deprecated_interfaces.html @@ -3,13 +3,11 @@ Deprecated Interfaces - + - - - + + + @@ -26,7 +24,8 @@ -

-

-

-

-

-

-

-

- +

+

diff --git a/doc/html/boost_regex/ref/deprecated_interfaces/old_regex.html b/doc/html/boost_regex/ref/deprecated_interfaces/old_regex.html index ea155135..8afa58db 100644 --- a/doc/html/boost_regex/ref/deprecated_interfaces/old_regex.html +++ b/doc/html/boost_regex/ref/deprecated_interfaces/old_regex.html @@ -1,14 +1,12 @@ - High - Level Class RegEx (Deprecated) +High Level Class RegEx (Deprecated) - + - + @@ -26,17 +24,16 @@

The high level wrapper class RegEx is now deprecated and does not form part of the regular expression standardization proposal. This type still exists, and existing code will continue to compile, however the following documentation is unlikely to be further updated.

-
-#include <boost/cregex.hpp>
+
#include <boost/cregex.hpp>
 

The class RegEx provides a high level simplified interface to the regular @@ -44,8 +41,7 @@ regular expressions always follow the "normal" syntax - that is the same as the perl / ECMAScript synatx.

-
-typedef bool (*GrepCallback)(const RegEx& expression);
+
typedef bool (*GrepCallback)(const RegEx& expression);
 typedef bool (*GrepFileCallback)(const char* file, const RegEx& expression);
 typedef bool (*FindFilesCallback)(const char* file);
 
@@ -138,7 +134,7 @@
 
 
                 

- RegEx(); + RegEx();

@@ -151,7 +147,7 @@

- RegEx(const RegEx& o); + RegEx(const RegEx& o);

@@ -164,40 +160,40 @@

- RegEx(const char* c, bool + RegEx(const char* c, bool icase = - false); + false);

Constructs an instance of RegEx, setting the expression to c, if icase is true then matching is insensitive - to case, otherwise it is sensitive to case. Throws bad_expression on failure. + to case, otherwise it is sensitive to case. Throws bad_expression on failure.

- RegEx(const std::string& s, bool + RegEx(const std::string& s, bool icase = - false); + false);

Constructs an instance of RegEx, setting the expression to s, if icase is true then matching is insensitive - to case, otherwise it is sensitive to case. Throws bad_expression on failure. + to case, otherwise it is sensitive to case. Throws bad_expression on failure.

- RegEx& - operator=(const RegEx& o); + RegEx& + operator=(const RegEx& o);

@@ -209,68 +205,68 @@

- RegEx& - operator=(const char* p); + RegEx& + operator=(const char* p);

- Assignment operator, equivalent to calling SetExpression(p, false). Throws bad_expression on failure. + Assignment operator, equivalent to calling SetExpression(p, false). Throws bad_expression on failure.

- RegEx& - operator=(const std::string& s); + RegEx& + operator=(const std::string& s);

- Assignment operator, equivalent to calling SetExpression(s, false). Throws bad_expression on failure. + Assignment operator, equivalent to calling SetExpression(s, false). Throws bad_expression on failure.

- unsigned int + unsigned int SetExpression(constchar* p, bool icase - = false); + = false);

Sets the current expression to p, if icase is true then matching is insensitive to case, otherwise it is sensitive - to case. Throws bad_expression on failure. + to case. Throws bad_expression on failure.

- unsigned int + unsigned int SetExpression(const std::string& s, bool icase = - false); + false);

Sets the current expression to s, if icase is true then matching is insensitive to case, otherwise it is sensitive - to case. Throws bad_expression on failure. + to case. Throws bad_expression on failure.

- std::string Expression()const; + std::string Expression()const;

@@ -282,17 +278,17 @@

- bool Match(const + bool Match(const char* p, boost::match_flag_type flags - = match_default); + = match_default);

Attempts to match the current expression against the text p - using the match flags flags - see match_flag_type. Returns + using the match flags flags - see match_flag_type. Returns true if the expression matches the whole of the input string.

@@ -301,17 +297,17 @@

- bool Match(const + bool Match(const std::string& s, boost::match_flag_type flags - = match_default); + = match_default);

Attempts to match the current expression against the text s - using the match_flag_type flags. + using the match_flag_type flags. Returns true if the expression matches the whole of the input string.

@@ -320,17 +316,17 @@

- bool Search(const + bool Search(const char* p, boost::match_flag_type flags - = match_default); + = match_default);

Attempts to find a match for the current expression somewhere in - the text p using the match_flag_type flags. + the text p using the match_flag_type flags. Returns true if the match succeeds.

@@ -338,17 +334,17 @@

- bool Search(const + bool Search(const std::string& s, boost::match_flag_type flags - = match_default); + = match_default);

Attempts to find a match for the current expression somewhere in - the text s using the match_flag_type flags. + the text s using the match_flag_type flags. Returns true if the match succeeds.

@@ -356,19 +352,19 @@

- unsigned int + unsigned int Grep(GrepCallback cb, const char* p, boost::match_flag_type flags - = match_default); + = match_default);

Finds all matches of the current expression in the text p - using the match_flag_type flags. - For each match found calls the call-back function cb as: cb(*this); + using the match_flag_type flags. + For each match found calls the call-back function cb as: cb(*this); If at any stage the call-back function returns false then the grep operation terminates, otherwise continues until no further matches are found. Returns the number of matches found. @@ -378,19 +374,19 @@

- unsigned int + unsigned int Grep(GrepCallback cb, const std::string& s, boost::match_flag_type flags - = match_default); + = match_default);

Finds all matches of the current expression in the text s - using the match_flag_type flags. - For each match found calls the call-back function cb as: cb(*this); + using the match_flag_type flags. + For each match found calls the call-back function cb as: cb(*this); If at any stage the call-back function returns false then the grep operation terminates, otherwise continues until no further matches are found. Returns the number of matches found. @@ -400,18 +396,18 @@

- unsigned int + unsigned int Grep(std::vector<std::string>& v, const char* p, boost::match_flag_type flags = - match_default); + match_default);

Finds all matches of the current expression in the text p - using the match_flag_type flags. + using the match_flag_type flags. For each match pushes a copy of what matched onto v. Returns the number of matches found.

@@ -420,18 +416,18 @@

- unsigned int + unsigned int Grep(std::vector<std::string>& v, const std::string& s, boost::match_flag_type flags = - match_default); + match_default);

Finds all matches of the current expression in the text s - using the match_flag_type flags. + using the match_flag_type flags. For each match pushes a copy of what matched onto v. Returns the number of matches found.

@@ -440,18 +436,18 @@

- unsigned int + unsigned int Grep(std::vector<unsigned int>& v, const char* p, boost::match_flag_type flags - = match_default); + = match_default);

Finds all matches of the current expression in the text p - using the match_flag_type flags. + using the match_flag_type flags. For each match pushes the starting index of what matched onto v. Returns the number of matches found.

@@ -460,18 +456,18 @@

- unsigned int + unsigned int Grep(std::vector<unsigned int>& v, const std::string& s, boost::match_flag_type flags - = match_default); + = match_default);

Finds all matches of the current expression in the text s - using the match_flag_type flags. + using the match_flag_type flags. For each match pushes the starting index of what matched onto v. Returns the number of matches found.

@@ -480,20 +476,20 @@

- unsigned int + unsigned int GrepFiles(GrepFileCallback cb, const char* files, bool recurse = false, boost::match_flag_type flags = - match_default); + match_default);

Finds all matches of the current expression in the files files - using the match_flag_type flags. + using the match_flag_type flags. For each match calls the call-back function cb. If the call-back returns false then the algorithm returns without considering further matches in the current file, or any further files. @@ -507,7 +503,7 @@ Returns the total number of matches found.

- May throw an exception derived from std::runtime_error + May throw an exception derived from std::runtime_error if file io fails.

@@ -515,20 +511,20 @@

- unsigned int + unsigned int GrepFiles(GrepFileCallback cb, const std::string& files, bool recurse = false, boost::match_flag_type flags = - match_default); + match_default);

Finds all matches of the current expression in the files files - using the match_flag_type flags. + using the match_flag_type flags. For each match calls the call-back function cb.

@@ -545,7 +541,7 @@ Returns the total number of matches found.

- May throw an exception derived from std::runtime_error + May throw an exception derived from std::runtime_error if file io fails.

@@ -553,20 +549,20 @@

- unsigned int + unsigned int FindFiles(FindFilesCallback cb, const char* files, bool recurse = false, boost::match_flag_type flags = - match_default); + match_default);

Searches files to find all those which contain at least one match - of the current expression using the match_flag_type flags. + of the current expression using the match_flag_type flags. For each matching file calls the call-back function cb. If the call-back returns false then the algorithm returns without considering any further files. @@ -580,7 +576,7 @@ Returns the total number of files found.

- May throw an exception derived from std::runtime_error + May throw an exception derived from std::runtime_error if file io fails.

@@ -588,20 +584,20 @@

- unsigned int + unsigned int FindFiles(FindFilesCallback cb, const std::string& files, bool recurse = false, boost::match_flag_type flags = - match_default); + match_default);

Searches files to find all those which contain at least one match - of the current expression using the match_flag_type flags. + of the current expression using the match_flag_type flags. For each matching file calls the call-back function cb.

@@ -617,7 +613,7 @@ Returns the total number of files found.

- May throw an exception derived from std::runtime_error + May throw an exception derived from std::runtime_error if file io fails.

@@ -625,14 +621,14 @@

- std::string Merge(const + std::string Merge(const std::string& in, const std::string& fmt, bool copy = true, boost::match_flag_type flags - = match_default); + = match_default);

@@ -645,22 +641,22 @@ If copy is true then all unmatched sections of input are copied unchanged to output, if the flag format_first_only is set then only the first occurance of the pattern found is replaced. - Returns the new string. See also format - string syntax, and match_flag_type. + Returns the new string. See also format + string syntax, and match_flag_type.

- std::string Merge(const + std::string Merge(const char* in, const char* fmt, bool copy = true, boost::match_flag_type flags - = match_default); + = match_default);

@@ -673,19 +669,19 @@ If copy is true then all unmatched sections of input are copied unchanged to output, if the flag format_first_only is set then only the first occurance of the pattern found is replaced. - Returns the new string. See also format - string syntax, and match_flag_type. + Returns the new string. See also format + string syntax, and match_flag_type.

- unsigned Split(std::vector<std::string>& v, std::string& s, boost::match_flag_type + unsigned Split(std::vector<std::string>& v, std::string& s, boost::match_flag_type flags = match_default, unsigned max_count - = ~0); + = ~0);

@@ -706,17 +702,17 @@

- unsigned int + unsigned int Position(int i - = 0)const; + = 0)const;

Returns the position of what matched sub-expression i. - If i = - 0 then returns the position - of the whole match. Returns RegEx::npos + If i = + 0 then returns the position + of the whole match. Returns RegEx::npos if the supplied index is invalid, or if the specified sub-expression did not participate in the match.

@@ -725,16 +721,16 @@

- unsigned int + unsigned int Length(int i - = 0)const; + = 0)const;

- Returns the length of what matched sub-expression i. If i = - 0 then returns the length - of the whole match. Returns RegEx::npos + Returns the length of what matched sub-expression i. If i = + 0 then returns the length + of the whole match. Returns RegEx::npos if the supplied index is invalid, or if the specified sub-expression did not participate in the match.

@@ -743,8 +739,8 @@

- bool Matched(int i = - 0)const; + bool Matched(int i = + 0)const;

@@ -757,23 +753,23 @@

- unsigned int - Line()const; + unsigned int + Line()const;

Returns the line on which the match occurred, indexes start from - 1 not zero, if no match occurred then returns RegEx::npos. + 1 not zero, if no match occurred then returns RegEx::npos.

- unsigned int + unsigned int Marks() - const; + const;

@@ -787,14 +783,14 @@

- std::string What(int i)const; + std::string What(int i)const;

Returns a copy of what matched sub-expression i. - If i = - 0 then returns a copy of + If i = + 0 then returns a copy of the whole match. Returns a null string if the index is invalid or if the specified sub-expression did not participate in a match.

@@ -803,13 +799,13 @@

- std::string operator[](int - i)const ; + std::string operator[](int + i)const ;

- Returns what(i); + Returns what(i); Can be used to simplify access to sub-expression matches, and make usage more perl-like.

@@ -820,10 +816,11 @@
- +

+

diff --git a/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html b/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html index 559d3a9e..2365c417 100644 --- a/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html +++ b/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html @@ -1,15 +1,13 @@ - - regex_format (Deprecated) +regex_format (Deprecated) - + - + @@ -26,31 +24,29 @@

- The algorithm regex_format - is deprecated; new code should use match_results<>::format instead. Existing code + The algorithm regex_format + is deprecated; new code should use match_results<>::format instead. Existing code will continue to compile, the following documentation is taken from the previous version of Boost.Regex and will not be further updated:

-

- +

+ Algorithm regex_format -
-
-#include <boost/regex.hpp>
+        
+
#include <boost/regex.hpp>
 

- The algorithm regex_format + The algorithm regex_format takes the results of a match and creates a new string based upon a format - string, regex_format can + string, regex_format can be used for search and replace operations:

-
-template <class OutputIterator, class iterator, class Allocator, class charT>
+
template <class OutputIterator, class iterator, class Allocator, class charT>
 OutputIterator regex_format(OutputIterator out,
                            const match_results<iterator, Allocator>& m,
                            const charT* fmt,
@@ -62,7 +58,7 @@
                            match_flag_type flags = 0);
 

- The library also defines the following convenience variation of regex_format, which returns the result + The library also defines the following convenience variation of regex_format, which returns the result directly as a string, rather than outputting to an iterator.

@@ -70,13 +66,12 @@ -
[Note] Note

+

This version may not be available, or may be available in a more limited form, depending upon your compilers capabilities

-
-template <class iterator, class Allocator, class charT>
+
template <class iterator, class Allocator, class charT>
 std::basic_string<charT> regex_format
                                  (const match_results<iterator, Allocator>& m, 
                                  const charT* fmt,
@@ -112,7 +107,7 @@
 
 
                 

- OutputIterator out + OutputIterator out

@@ -125,12 +120,12 @@

- const match_results<iterator, Allocator>& m + const match_results<iterator, Allocator>& m

- An instance of match_results obtained + An instance of match_results obtained from one of the matching algorithms above, and denoting what matched.

@@ -138,7 +133,7 @@

- const charT* fmt + const charT* fmt

@@ -151,7 +146,7 @@

- unsigned flags + unsigned flags

@@ -163,19 +158,20 @@

- Format flags are described under match_flag_type. + Format flags are described under match_flag_type.

The format string syntax (and available options) is described more fully - under format strings. + under format strings.

- +

+

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 13d2a5bf..9a1884aa 100644 --- a/doc/html/boost_regex/ref/deprecated_interfaces/regex_grep.html +++ b/doc/html/boost_regex/ref/deprecated_interfaces/regex_grep.html @@ -1,16 +1,13 @@ - - regex_grep (Deprecated) +regex_grep (Deprecated) - + - - + + @@ -27,28 +24,26 @@

- The algorithm regex_grep - is deprecated in favor of regex_iterator which provides + The algorithm regex_grep + is deprecated in favor of regex_iterator which provides a more convenient and standard library friendly interface.

The following documentation is taken unchanged from the previous boost release, and will not be updated in future.

-
-#include <boost/regex.hpp>
+
#include <boost/regex.hpp>
 

- regex_grep allows you to + regex_grep allows you to search through a bidirectional-iterator range and locate all the (non-overlapping) matches with a given regular expression. The function is declared as:

-
-template <class Predicate, class iterator, class charT, class traits>
+
template <class Predicate, class iterator, class charT, class traits>
 unsigned int regex_grep(Predicate foo,
                         iterator first,
                         iterator last,
@@ -57,12 +52,11 @@
 

The library also defines the following convenience versions, which take - either a const charT*, or a const - std::basic_string<>& + either a const charT*, or a const + std::basic_string<>& in place of a pair of iterators.

-
-template <class Predicate, class charT, class traits>
+
template <class Predicate, class charT, class traits>
 unsigned int regex_grep(Predicate foo, 
             const charT* str, 
             const basic_regex<charT, traits>& e, 
@@ -75,7 +69,7 @@
             boost::match_flag_type flags = match_default);
 

- The parameters for the primary version of regex_grep + The parameters for the primary version of regex_grep have the following meanings:

@@ -97,9 +91,9 @@

The algorithm finds all of the non-overlapping matches of the expression - e, for each match it fills a match_results<iterator> structure, which contains information + e, for each match it fills a match_results<iterator> structure, which contains information on what matched, and calls the predicate foo, passing - the match_results<iterator> + the match_results<iterator> as a single argument. If the predicate returns true, then the grep operation continues, otherwise it terminates without searching for further matches. The function returns the number of matches found. @@ -107,8 +101,7 @@

The general form of the predicate is:

-
-struct grep_predicate
+
struct grep_predicate
 {
    bool operator()(const match_results<iterator_type>& m);
 };
@@ -123,12 +116,12 @@
           utilities would output the results to the screen, another program could
           index a file based on a regular expression and store a set of bookmarks
           in a list, or a text file conversion utility would output to file. The
-          results of one regex_grep
-          can even be chained into another regex_grep
+          results of one regex_grep
+          can even be chained into another regex_grep
           to create recursive parsers.
         

- The algorithm may throw std::runtime_error + The algorithm may throw std::runtime_error if the complexity of matching the expression against an N character string begins to exceed O(N2), or if the program runs out of stack space while matching the expression (if Boost.Regex is configured @@ -136,10 +129,9 @@ (if Boost.Regex is configured in non-recursive mode).

- Example: convert the example from regex_search to use regex_grep instead: + Example: convert the example from regex_search to use regex_grep instead:

-
-#include <string> 
+
#include <string> 
 #include <map> 
 #include <boost/regex.hpp> 
 
@@ -198,11 +190,10 @@
 }
 

- Example: Use regex_grep + Example: Use regex_grep to call a global callback function:

-
-#include <string> 
+
#include <string> 
 #include <map> 
 #include <boost/regex.hpp> 
 
@@ -258,12 +249,11 @@
 }
 

- Example: use regex_grep - to call a class member function, use the standard library adapters std::mem_fun and std::bind1st + Example: use regex_grep + to call a class member function, use the standard library adapters std::mem_fun and std::bind1st to convert the member function into a predicate:

-
-#include <string> 
+
#include <string> 
 #include <map> 
 #include <boost/regex.hpp> 
 #include <functional> 
@@ -316,8 +306,7 @@
           Finally, C++ Builder users can use C++ Builder's closure type as a callback
           argument:
         

-
-#include <string> 
+
#include <string> 
 #include <map> 
 #include <boost/regex.hpp> 
 #include <functional> 
@@ -373,10 +362,11 @@
 
 
- +

+

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 ce02c4a1..b430a1bc 100644 --- a/doc/html/boost_regex/ref/deprecated_interfaces/regex_split.html +++ b/doc/html/boost_regex/ref/deprecated_interfaces/regex_split.html @@ -1,16 +1,13 @@ - - regex_split (deprecated) +regex_split (deprecated) - + - - + + @@ -27,31 +24,26 @@

- The algorithm regex_split has been deprecated - in favor of the iterator regex_token_iterator which has + The algorithm regex_split has been deprecated + in favor of the iterator regex_token_iterator which has a more flexible and powerful interface, as well as following the more usual standard library "pull" rather than "push" semantics.

- Code which uses regex_split will continue to compile, + Code which uses 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 + 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>
+
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, 
                         const basic_regex<charT, Traits2>& e,
@@ -69,7 +61,7 @@
                         std::basic_string<charT, Traits1, Alloc1>& s);
 

- Effects: Each version of the algorithm + Effects: Each version of the algorithm takes an output-iterator for output, and a string for input. If the expression contains no marked sub-expressions, then the algorithm writes one string onto the output-iterator for each section of input that does not match @@ -80,11 +72,11 @@ processed will be deleted from the string s (if max_split is not reached then all of s will be deleted). Returns the number of strings written to the output-iterator. If the parameter - max_split is not specified then it defaults to UINT_MAX. If no expression is specified, + max_split is not specified then it defaults to UINT_MAX. If no expression is specified, then it defaults to "\s+", and splitting occurs on whitespace.

- Throws: std::runtime_error + Throws: std::runtime_error if the complexity of matching the expression against an N character string begins to exceed O(N2), or if the program runs out of stack space while matching the expression (if Boost.Regex is configured in recursive mode), @@ -92,12 +84,11 @@ is configured in non-recursive mode).

- Example: the following function will split + Example: the following function will split the input string into a series of tokens, and remove each token from the string s:

-
-unsigned tokenise(std::list<std::string>& l, std::string& s)
+
unsigned tokenise(std::list<std::string>& l, std::string& s)
 {
    return boost::regex_split(std::back_inserter(l), s);
 }
@@ -106,8 +97,7 @@
           Example: the following short program will extract all of the URL's from
           a html file, and print them out to cout:
         

-
-#include <list>
+
#include <list>
 #include <fstream>
 #include <iostream>
 #include <boost/regex.hpp>
@@ -159,10 +149,11 @@
 
 
- +

+

diff --git a/doc/html/boost_regex/ref/error_type.html b/doc/html/boost_regex/ref/error_type.html index b362c115..81df8453 100644 --- a/doc/html/boost_regex/ref/error_type.html +++ b/doc/html/boost_regex/ref/error_type.html @@ -1,13 +1,13 @@ - error_type +error_type - + - - - + + + @@ -24,17 +24,17 @@ +
+ Synopsis -
+

Type error type represents the different types of errors that can be raised by the library when parsing a regular expression.

-
-namespace boost{ namespace regex_constants{
+
namespace boost{ namespace regex_constants{
 
 typedef implementation-specific-type error_type;
 
@@ -56,12 +56,12 @@
 } // namespace regex_constants
 } // namespace boost
 
-

- +

+ Description -
+

- The type error_type is an + The type error_type is an implementation-specific enumeration type that may take one of the following values:

@@ -257,10 +257,11 @@
- +

+

diff --git a/doc/html/boost_regex/ref/match_flag_type.html b/doc/html/boost_regex/ref/match_flag_type.html index bf5a7e95..91b55c46 100644 --- a/doc/html/boost_regex/ref/match_flag_type.html +++ b/doc/html/boost_regex/ref/match_flag_type.html @@ -1,14 +1,13 @@ - match_flag_type +match_flag_type - + - - - + + + @@ -25,15 +24,15 @@

- The type match_flag_type + The type match_flag_type is an implementation specific bitmask type (see C++ std 17.3.2.1.2) that controls how a regular expression is matched against a character sequence. - The behavior of the format flags is described in more detail in the format syntax guide. + The behavior of the format flags is described in more detail in the format syntax guide.

-
-namespace boost{ namespace regex_constants{
+
namespace boost{ namespace regex_constants{
 
 typedef implemenation-specific-bitmask-type match_flag_type;
 
@@ -69,12 +68,12 @@
 } // namespace regex_constants
 } // namespace boost
 
-

- +

+ Description -
+

- The type match_flag_type + The type match_flag_type is an implementation specific bitmask type (see C++ std 17.3.2.1.2). When matching a regular expression against a sequence of characters [first, last) then setting its elements has the effects listed in the table below: @@ -328,8 +327,7 @@

@@ -415,7 +413,7 @@ @@ -443,8 +441,7 @@ @@ -481,10 +478,11 @@

Specifies that the expression should be matched according to the - POSIX leftmost-longest + POSIX leftmost-longest rule, regardless of what kind of expression was compiled. Be warned that these rules do not work well with many Perl-specific features such as non-greedy repeats. @@ -360,7 +358,7 @@

Makes the expression behave as if it had no marked subexpressions, - no matter how many capturing groups are actually present. The match_results + no matter how many capturing groups are actually present. The match_results class will only contain information about the overall match, and not any sub-expressions.

@@ -380,7 +378,7 @@ Specification, Chapter 15 part 5.4.11 String.prototype.replace. (FWD.1).

- This is functionally identical to the Perl + This is functionally identical to the Perl format string rules.

@@ -402,7 +400,7 @@ Specifies that when a regular expression match is to be replaced by a new string, that the new string is constructed using the rules used by the Unix sed utility in IEEE Std 1003.1-2001, Portable Operating - SystemInterface (POSIX ), Shells and Utilities. See also the Sed Format string reference. + SystemInterface (POSIX ), Shells and Utilities. See also the Sed Format string reference.

Specifies that when a regular expression match is to be replaced - by a new string, that the new string is constructed using the + by a new string, that the new string is constructed using the same rules as Perl 5.

Specifies that all syntax extensions are enabled, including conditional - (?ddexpression1:expression2) replacements: see the format + (?ddexpression1:expression2) replacements: see the format string guide for more details.

- +

+

diff --git a/doc/html/boost_regex/ref/match_results.html b/doc/html/boost_regex/ref/match_results.html index 2e6fca10..db38d7a4 100644 --- a/doc/html/boost_regex/ref/match_results.html +++ b/doc/html/boost_regex/ref/match_results.html @@ -1,13 +1,13 @@ - match_results +match_results - + - - - + + + @@ -24,45 +24,44 @@ +
+ Synopsis -
-
-#include <boost/regex.hpp>
+      
+
#include <boost/regex.hpp>
 

Regular expressions are different from many simple pattern-matching algorithms in that as well as finding an overall match they can also produce sub-expression matches: each sub-expression being delimited in the pattern by a pair of parenthesis (...). There has to be some method for reporting sub-expression - matches back to the user: this is achieved this by defining a class match_results that acts as an indexed collection + matches back to the user: this is achieved this by defining a class match_results that acts as an indexed collection of sub-expression matches, each sub-expression match being contained in an - object of type sub_match. + object of type sub_match.

- Template class match_results + Template class match_results denotes a collection of character sequences representing the result of a - regular expression match. Objects of type match_results - are passed to the algorithms regex_match and regex_search, and are returned by - the iterator regex_iterator. Storage for the + regular expression match. Objects of type match_results + are passed to the algorithms regex_match and regex_search, and are returned by + the iterator regex_iterator. Storage for the collection is allocated and freed as necessary by the member functions of - class match_results. + class match_results.

- The template class match_results + The template class match_results conforms to the requirements of a Sequence, as specified in (lib.sequence.reqmts), except that only operations defined for const-qualified Sequences are supported.

- Class template match_results - is most commonly used as one of the typedefs cmatch, - wcmatch, smatch, - or wsmatch: + Class template match_results + is most commonly used as one of the typedefs cmatch, + wcmatch, smatch, + or wsmatch:

-
-template <class BidirectionalIterator,
+
template <class BidirectionalIterator,
          class Allocator = std::allocator<sub_match<BidirectionalIterator> >
 class match_results;
 
@@ -142,23 +141,22 @@
 void swap(match_results<BidirectionalIterator, Allocator>& m1,
          match_results<BidirectionalIterator, Allocator>& m2);
 
-

- +

+ Description -
+

- In all match_results constructors, + In all match_results constructors, a copy of the Allocator argument is used for any memory allocation performed by the constructor or member functions during the lifetime of the object.

-
-match_results(const Allocator& a = Allocator());
+
match_results(const Allocator& a = Allocator());
 

- Effects: Constructs an object of class - match_results. The postconditions + Effects: Constructs an object of class + match_results. The postconditions of this function are indicated in the table:

@@ -219,20 +217,18 @@

-
-match_results(const match_results& m);
+
match_results(const match_results& m);
 

- Effects: Constructs an object of class match_results, + Effects: Constructs an object of class match_results, as a copy of m.

-
-match_results& operator=(const match_results& m);
+
match_results& operator=(const match_results& m);
 

- Effects: Assigns m to *this. The postconditions + Effects: Assigns m to *this. The postconditions of this function are indicated in the table:

@@ -353,218 +349,201 @@

-
-size_type size()const;
+
size_type size()const;
 

- Effects: Returns the number of sub_match elements stored in *this; + Effects: Returns the number of sub_match elements stored in *this; that is the number of marked sub-expressions in the regular expression that was matched plus one.

-
-size_type max_size()const;
+
size_type max_size()const;
 

- Effects: Returns the maximum number of - sub_match + Effects: Returns the maximum number of + sub_match elements that can be stored in *this.

-
-bool empty()const;
+
bool empty()const;
 

- Effects: Returns size() == 0. + Effects: Returns size() == 0.

-
-difference_type length(int sub = 0)const;
+
difference_type length(int sub = 0)const;
 

- Effects: Returns the length of sub-expression - sub, that is to say: (*this)[sub].length(). + Effects: Returns the length of sub-expression + sub, that is to say: (*this)[sub].length().

-
-difference_type position(unsigned int sub = 0)const;
+
difference_type position(unsigned int sub = 0)const;
 

- Effects: Returns the starting location of + Effects: Returns the starting location of sub-expression sub, or -1 if sub - was not matched. Note that if this represents a partial match , then position() - will return the location of the partial match even though (*this)[0].matched + was not matched. Note that if this represents a partial match , then position() + will return the location of the partial match even though (*this)[0].matched is false.

-
-string_type str(int sub = 0)const;
+
string_type str(int sub = 0)const;
 

- Effects: Returns sub-expression sub - as a string: string_type((*this)[sub]). + Effects: Returns sub-expression sub + as a string: string_type((*this)[sub]).

-
-const_reference operator[](int n) const;
+
const_reference operator[](int n) const;
 

- Effects: Returns a reference to the sub_match + Effects: Returns a reference to the sub_match object representing the character sequence that matched marked sub-expression - n. If n == 0 then returns - a reference to a sub_match object representing the + n. If n == 0 then returns + a reference to a sub_match object representing the character sequence that matched the whole regular expression. If n is out of range, or if n is an unmatched sub-expression, - then returns a sub_match + then returns a sub_match object whose matched member is false.

-
-const_reference prefix()const;
+
const_reference prefix()const;
 

- Effects: Returns a reference to the sub_match + Effects: Returns a reference to the sub_match object representing the character sequence from the start of the string being matched or searched, to the start of the match found.

-
-const_reference suffix()const;
+
const_reference suffix()const;
 

- Effects: Returns a reference to the sub_match + Effects: Returns a reference to the sub_match object representing the character sequence from the end of the match found to the end of the string being matched or searched.

-
-const_iterator begin()const;
+
const_iterator begin()const;
 

- Effects: Returns a starting iterator that + Effects: Returns a starting iterator that enumerates over all the marked sub-expression matches stored in *this.

-
-const_iterator end()const;
+
const_iterator end()const;
 

- Effects: Returns a terminating iterator + Effects: Returns a terminating iterator that enumerates over all the marked sub-expression matches stored in *this.

-
-template <class OutputIterator>
+
template <class OutputIterator>
 OutputIterator format(OutputIterator out,
                      const string_type& fmt,
                      match_flag_type flags = format_default);
 

- Requires: The type OutputIterator + Requires: The type OutputIterator conforms to the Output Iterator requirements (C++ std 24.1.2).

- Effects: Copies the character sequence - [fmt.begin(), fmt.end()) - to OutputIterator out. + Effects: Copies the character sequence + [fmt.begin(), fmt.end()) + to OutputIterator out. For each format specifier or escape sequence in fmt, replace that sequence with either the character(s) it represents, or the - sequence of characters within *this to which it refers. The bitmasks specified + sequence of characters within *this to which it refers. The bitmasks specified in flags determines what format specifiers or escape sequences are recognized, by default this is the format used by ECMA-262, ECMAScript Language Specification, Chapter 15 part 5.4.11 String.prototype.replace.

- See the format syntax guide for more information. + See the format syntax guide for more information.

- Returns: out. + Returns: out.

-
-string_type format(const string_type& fmt,
+
string_type format(const string_type& fmt,
                   match_flag_type flags = format_default);
 

- Effects: Returns a copy of the string fmt. + Effects: Returns a copy of the string fmt. For each format specifier or escape sequence in fmt, replace that sequence with either the character(s) it represents, or the - sequence of characters within *this to which it refers. The bitmasks specified + sequence of characters within *this to which it refers. The bitmasks specified in flags determines what format specifiers or escape sequences are recognized, by default this is the format used by ECMA-262, ECMAScript Language Specification, Chapter 15 part 5.4.11 String.prototype.replace.

- See the format syntax guide for more information. + See the format syntax guide for more information.

-
-allocator_type get_allocator()const;
+
allocator_type get_allocator()const;
 

- Effects: Returns a copy of the Allocator + Effects: Returns a copy of the Allocator that was passed to the object's constructor.

-
-void swap(match_results& that);
+
void swap(match_results& that);
 

- Effects: Swaps the contents of the two sequences. + Effects: Swaps the contents of the two sequences.

- Postcondition: *this contains the sequence + Postcondition: *this contains the sequence of matched sub-expressions that were in that, that contains the sequence of matched sub-expressions that were in *this.

- Complexity: constant time. + Complexity: constant time.

-
-typedef typename value_type::capture_sequence_type capture_sequence_type;
+
typedef typename value_type::capture_sequence_type capture_sequence_type;
 

Defines an implementation-specific type that satisfies the requirements of a standard library Sequence (21.1.1 including the optional Table 68 operations), - whose value_type is a sub_match<BidirectionalIterator>. This type happens to be std::vector<sub_match<BidirectionalIterator> >, + whose value_type is a sub_match<BidirectionalIterator>. This type happens to be std::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; 
 

- Effects: returns a sequence containing all + Effects: returns a sequence containing all the captures obtained for sub-expression i.

- Returns: (*this)[i].captures(); + Returns: (*this)[i].captures();

- Preconditions: the library must be built + Preconditions: the library must be built and used with BOOST_REGEX_MATCH_EXTRA defined, and you must pass the flag - match_extra to the regex matching functions ( regex_match, regex_search, regex_iterator or regex_token_iterator) in order for + match_extra to the regex matching functions ( regex_match, regex_search, regex_iterator or regex_token_iterator) in order for this member function to be defined and return useful information.

- Rationale: Enabling this feature has several + Rationale: Enabling this feature has several consequences:

    @@ -584,57 +563,54 @@

-
-template <class BidirectionalIterator, class Allocator>
+
template <class BidirectionalIterator, class Allocator>
 bool operator == (const match_results<BidirectionalIterator, Allocator>& m1,
                   const match_results<BidirectionalIterator, Allocator>& m2);
 

- Effects: Compares the two sequences for + Effects: Compares the two sequences for equality.

-
-template <class BidirectionalIterator, class Allocator>
+
template <class BidirectionalIterator, class Allocator>
 bool operator != (const match_results<BidirectionalIterator, Allocator>& m1,
                   const match_results<BidirectionalIterator, Allocator>& m2);
 

- Effects: Compares the two sequences for + Effects: Compares the two sequences for inequality.

-
-template <class charT, class traits, class BidirectionalIterator, class Allocator>
+
template <class charT, class traits, class BidirectionalIterator, class Allocator>
 basic_ostream<charT, traits>&
    operator << (basic_ostream<charT, traits>& os,
                const match_results<BidirectionalIterator, Allocator>& m);
 

- Effects: Writes the contents of m - to the stream os as if by calling os - << m.str(); + Effects: Writes the contents of m + to the stream os as if by calling os + << m.str(); Returns os.

-
-template <class BidirectionalIterator, class Allocator>
+
template <class BidirectionalIterator, class Allocator>
 void swap(match_results<BidirectionalIterator, Allocator>& m1,
          match_results<BidirectionalIterator, Allocator>& m2);
 

- Effects: Swaps the contents of the two sequences. + Effects: Swaps the contents of the two sequences.

- +

+

diff --git a/doc/html/boost_regex/ref/non_std_strings.html b/doc/html/boost_regex/ref/non_std_strings.html index 5d2f434d..f47ef100 100644 --- a/doc/html/boost_regex/ref/non_std_strings.html +++ b/doc/html/boost_regex/ref/non_std_strings.html @@ -1,15 +1,13 @@ - Interfacing With Non-Standard - String Types +Interfacing With Non-Standard String Types - + - - - + + + @@ -26,9 +24,9 @@
Working With Unicode and ICU String Types
@@ -72,15 +70,14 @@ been provided for them already: currently this includes the ICU and MFC string class types.

-

-

- +

+

diff --git a/doc/html/boost_regex/ref/non_std_strings/icu.html b/doc/html/boost_regex/ref/non_std_strings/icu.html index 83799cc1..3e20a8d6 100644 --- a/doc/html/boost_regex/ref/non_std_strings/icu.html +++ b/doc/html/boost_regex/ref/non_std_strings/icu.html @@ -1,17 +1,13 @@ - Working With - Unicode and ICU String Types +Working With Unicode and ICU String Types - + - - - + + + @@ -28,9 +24,9 @@
- +

+

diff --git a/doc/html/boost_regex/ref/non_std_strings/icu/intro.html b/doc/html/boost_regex/ref/non_std_strings/icu/intro.html index 87fe0850..8282b43d 100644 --- a/doc/html/boost_regex/ref/non_std_strings/icu/intro.html +++ b/doc/html/boost_regex/ref/non_std_strings/icu/intro.html @@ -1,17 +1,13 @@ - Introduction - to using Regex with ICU +Introduction to using Regex with ICU - + - - - + + + @@ -28,14 +24,13 @@

The header:

-
-<boost/regex/icu.hpp>
+
<boost/regex/icu.hpp>
 

contains the data types and algorithms necessary for working with regular @@ -67,10 +62,11 @@

- +

+

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 5d4ae06e..2b9bf51c 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 @@ -1,17 +1,13 @@ - - Unicode Regular Expression Algorithms +Unicode Regular Expression Algorithms - + - - - + + + @@ -28,41 +24,40 @@

- The regular expression algorithms regex_match, regex_search and regex_replace all expect that + The regular expression algorithms regex_match, regex_search and regex_replace all expect that the character sequence upon which they operate, is encoded in the same character encoding as the regular expression object with which they are used. For Unicode regular expressions that behavior is undesirable: while we may want to process the data in UTF-32 "chunks", the actual data is much more likely to encoded as either UTF-8 or UTF-16. Therefore the header <boost/regex/icu.hpp> provides a series of thin wrappers - around these algorithms, called u32regex_match, - u32regex_search, and - u32regex_replace. These + around these algorithms, called u32regex_match, + u32regex_search, and + u32regex_replace. These wrappers use iterator-adapters internally to make external UTF-8 or UTF-16 data look as though it's really a UTF-32 sequence, that can then be passed on to the "real" algorithm.

-

- +

+ u32regex_match -
+

- For each regex_match - algorithm defined by <boost/regex.hpp>, - then <boost/regex/icu.hpp> defines an overloaded algorithm that - takes the same arguments, but which is called u32regex_match, + For each regex_match + algorithm defined by <boost/regex.hpp>, + then <boost/regex/icu.hpp> defines an overloaded algorithm that + takes the same arguments, but which is called u32regex_match, and which will accept UTF-8, UTF-16 or UTF-32 encoded data, as well as an ICU UnicodeString as input.

Example: match a password, encoded in a UTF-16 UnicodeString:

-
-//
+
//
 // Find out if *password* meets our password requirements,
 // as defined by the regular expression *requirements*.
 //
@@ -74,8 +69,7 @@
 

Example: match a UTF-8 encoded filename:

-
-//
+
//
 // Extract filename part of a path from a UTF-8 encoded std::string and return the result
 // as another std::string:
 //
@@ -94,23 +88,22 @@
    }
 }
 
-

- +

+ u32regex_search -
+

- For each regex_search - algorithm defined by <boost/regex.hpp>, - then <boost/regex/icu.hpp> defines an overloaded algorithm that - takes the same arguments, but which is called u32regex_search, + For each regex_search + algorithm defined by <boost/regex.hpp>, + then <boost/regex/icu.hpp> defines an overloaded algorithm that + takes the same arguments, but which is called u32regex_search, and which will accept UTF-8, UTF-16 or UTF-32 encoded data, as well as an ICU UnicodeString as input.

Example: search for a character sequence in a specific language block:

-
-UnicodeString extract_greek(const UnicodeString& text)
+
UnicodeString extract_greek(const UnicodeString& text)
 {
    // searches through some UTF-16 encoded text for a block encoded in Greek,
    // this expression is imperfect, but the best we can do for now - searching
@@ -134,15 +127,15 @@
    }
 }
 
-

- +

+ u32regex_replace -
+

- For each regex_replace algorithm defined - by <boost/regex.hpp>, then <boost/regex/icu.hpp> + For each regex_replace algorithm defined + by <boost/regex.hpp>, then <boost/regex/icu.hpp> defines an overloaded algorithm that takes the same arguments, but which - is called u32regex_replace, + is called u32regex_replace, and which will accept UTF-8, UTF-16 or UTF-32 encoded data, as well as an ICU UnicodeString as input. The input sequence and the format string specifier passed to the algorithm, can be encoded independently (for @@ -153,8 +146,7 @@

Example: Credit card number reformatting:

-
-//
+
//
 // Take a credit card number as a string of digits, 
 // and reformat it as a human readable string with "-"
 // separating each group of four digit;, 
@@ -174,10 +166,11 @@
 
 
- +

+

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 f3c9352c..45fea130 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 @@ -1,17 +1,13 @@ - - Unicode Aware Regex Iterators +Unicode Aware Regex Iterators - + - - - + + + @@ -28,23 +24,22 @@ +
+ u32regex_iterator -
+

- Type u32regex_iterator - is in all respects the same as regex_iterator except that since - the regular expression type is always u32regex + Type u32regex_iterator + is in all respects the same as regex_iterator except that since + the regular expression type is always u32regex it only takes one template parameter (the iterator type). It also calls - u32regex_search internally, + u32regex_search internally, allowing it to interface correctly with UTF-8, UTF-16, and UTF-32 data:

-
-template <class BidirectionalIterator>
+
template <class BidirectionalIterator>
 class u32regex_iterator
 {
    // for members see regex_iterator
@@ -55,12 +50,11 @@
 typedef u32regex_iterator<const UChar32*>  utf32regex_iterator;
 

- In order to simplify the construction of a u32regex_iterator + In order to simplify the construction of a u32regex_iterator from a string, there are a series of non-member helper functions called make_u32regex_iterator:

-
-u32regex_iterator<const char*> 
+
u32regex_iterator<const char*> 
    make_u32regex_iterator(const char* s, 
                           const u32regex& e, 
                           regex_constants::match_flag_type m = regex_constants::match_default);
@@ -95,8 +89,7 @@
             Example: search for international currency symbols, along with their
             associated numeric value:
           

-
-void enumerate_currencies(const std::string& text)
+
void enumerate_currencies(const std::string& text)
 {
    // enumerate and print all the currency symbols, along
    // with any associated numeric values:
@@ -132,20 +125,19 @@
 

Provided of course that the input is encoded as UTF-8.

-

- +

+ u32regex_token_iterator -
+

- Type u32regex_token_iterator - is in all respects the same as regex_token_iterator except - that since the regular expression type is always u32regex + Type u32regex_token_iterator + is in all respects the same as regex_token_iterator except + that since the regular expression type is always u32regex it only takes one template parameter (the iterator type). It also calls - u32regex_search internally, + u32regex_search internally, allowing it to interface correctly with UTF-8, UTF-16, and UTF-32 data:

-
-template <class BidirectionalIterator>
+
template <class BidirectionalIterator>
 class u32regex_token_iterator
 {
    // for members see regex_token_iterator
@@ -156,12 +148,11 @@
 typedef u32regex_token_iterator<const UChar32*>  utf32regex_token_iterator;
 

- In order to simplify the construction of a u32regex_token_iterator + In order to simplify the construction of a u32regex_token_iterator from a string, there are a series of non-member helper functions called - make_u32regex_token_iterator: + make_u32regex_token_iterator:

-
-u32regex_token_iterator<const char*> 
+
u32regex_token_iterator<const char*> 
    make_u32regex_token_iterator(
          const char* s, 
          const u32regex& e, 
@@ -202,8 +193,7 @@
             of marked sub-expression sub in regular expression e,
             found in text s, using match_flags m.
           

-
-template <std::size_t N>
+
template <std::size_t N>
 u32regex_token_iterator<const char*> 
    make_u32regex_token_iterator(
          const char* p, 
@@ -248,8 +238,7 @@
             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, 
@@ -294,8 +283,7 @@
             Example: search for international currency symbols, along with their
             associated numeric value:
           

-
-void enumerate_currencies2(const std::string& text)
+
void enumerate_currencies2(const std::string& text)
 {
    // enumerate and print all the currency symbols, along
    // with any associated numeric values:
@@ -321,10 +309,11 @@
 
 
- +

+

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 6f42cbf9..39677b16 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 @@ -1,17 +1,13 @@ - - Unicode regular expression types +Unicode regular expression types - + - - - + + + @@ -28,113 +24,105 @@

- Header <boost/regex/icu.hpp> provides a regular expression traits + Header <boost/regex/icu.hpp> provides a regular expression traits class that handles UTF-32 characters:

-
-class icu_regex_traits;
+
class icu_regex_traits;
 

and a regular expression type based upon that:

-
-typedef basic_regex<UChar32,icu_regex_traits> u32regex;
+
typedef basic_regex<UChar32,icu_regex_traits> u32regex;
 

- The type u32regex is + The type u32regex is regular expression type to use for all Unicode regular expressions; internally it uses UTF-32 code points, but can be created from, and used to search, either UTF-8, or UTF-16 encoded strings as well as UTF-32 ones.

- The constructors, and assign member functions of u32regex, + The constructors, and assign member functions of u32regex, require UTF-32 encoded strings, but there are a series of overloaded - algorithms called make_u32regex + algorithms called make_u32regex which allow regular expressions to be created from UTF-8, UTF-16, or UTF-32 encoded strings:

-
-template <class InputIterator> 
+
template <class InputIterator> 
 u32regex make_u32regex(InputIterator i, 
                        InputIterator j, 
                        boost::regex_constants::syntax_option_type opt);
 

- Effects: Creates a regular expression + Effects: Creates a regular expression object from the iterator sequence [i,j). The character encoding of the 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, 
+
u32regex make_u32regex(const char* p, 
                        boost::regex_constants::syntax_option_type opt 
                            = boost::regex_constants::perl);
 

- Effects: Creates a regular expression + Effects: Creates a regular expression object from the Null-terminated UTF-8 characater sequence p.

-
-u32regex make_u32regex(const unsigned char* p, 
+
u32regex make_u32regex(const unsigned char* p, 
                        boost::regex_constants::syntax_option_type opt 
                            = boost::regex_constants::perl);
 

- Effects: Creates a regular expression + Effects: Creates a regular expression object from the Null-terminated UTF-8 characater sequence p.

-
-u32regex make_u32regex(const wchar_t* p, 
+
u32regex make_u32regex(const wchar_t* p, 
                        boost::regex_constants::syntax_option_type opt 
                            = boost::regex_constants::perl);
 

- Effects: Creates a regular expression + Effects: Creates a regular expression object from the Null-terminated characater sequence p. The character 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, 
+
u32regex make_u32regex(const UChar* p, 
                        boost::regex_constants::syntax_option_type opt 
                            = boost::regex_constants::perl);
 

- Effects: Creates a regular expression + Effects: Creates a regular expression object from the Null-terminated UTF-16 characater sequence p.

-
-template<class C, class T, class A>
+
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 
                            = boost::regex_constants::perl);
 

- Effects: Creates a regular expression + Effects: Creates a regular expression object from the string s. The character encoding of the string is determined based upon sizeof(C): 1 implies UTF-8, 2 implies UTF-16, and 4 implies UTF-32.

-
-u32regex make_u32regex(const UnicodeString& s, 
+
u32regex make_u32regex(const UnicodeString& s, 
                        boost::regex_constants::syntax_option_type opt 
                            = boost::regex_constants::perl);
 

- Effects: Creates a regular expression + Effects: Creates a regular expression object from the UTF-16 encoding string s.

- +

+

diff --git a/doc/html/boost_regex/ref/non_std_strings/mfc_strings.html b/doc/html/boost_regex/ref/non_std_strings/mfc_strings.html index f17f4620..7634d2a3 100644 --- a/doc/html/boost_regex/ref/non_std_strings/mfc_strings.html +++ b/doc/html/boost_regex/ref/non_std_strings/mfc_strings.html @@ -1,17 +1,13 @@ - Using - Boost Regex With MFC Strings +Using Boost Regex With MFC Strings - + - - - + + + @@ -28,9 +24,9 @@
- +

+

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 0d05bf1c..3a03bd2e 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 @@ -1,17 +1,13 @@ - - Overloaded Algorithms For MFC String Types +Overloaded Algorithms For MFC String Types - + - - - + + + @@ -28,31 +24,30 @@

- For each regular expression algorithm that's overloaded for a std::basic_string argument, there is also + For each regular expression algorithm that's overloaded for a std::basic_string argument, there is also one overloaded for the MFC/ATL string types. These algorithm signatures all look a lot more complex than they actually are, but for completeness here they are anyway:

-

- +

+ regex_match -
+

There are two overloads, the first reports what matched in a match_results structure, the second does not.

- All the usual caveats for regex_match apply, in particular + All the usual caveats for regex_match apply, in particular the algorithm will only report a successful match if all of the input - text matches the expression, if this isn't what you want then use regex_search + text matches the expression, if this isn't what you want then use regex_search instead.

-
-template <class charT, class T, class A>
+
template <class charT, class T, class A>
 bool regex_match(
    const ATL::CSimpleStringT<charT>& s, 
    match_results<const B*, A>& what, 
@@ -60,15 +55,14 @@
    boost::regex_constants::match_flag_type f = boost::regex_constants::match_default); 
 

- Effects: returns ::boost::regex_match(s.GetString(), + Effects: returns ::boost::regex_match(s.GetString(), s.GetString() - + s.GetLength(), what, e, f); + + s.GetLength(), what, e, f);

- Example: + Example:

-
-//
+
//
 // Extract filename part of a path from a CString and return the result
 // as another CString:
 //
@@ -87,28 +81,26 @@
    }
 }
 
-

- +

+ regex_match (second overload) -
-
-template <class charT, class T>
+          
+
template <class charT, class T>
 bool regex_match(
    const ATL::CSimpleStringT<charT>& s,
    const basic_regex<B, T>& e,
    boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
 

- Effects: returns ::boost::regex_match(s.GetString(), + Effects: returns ::boost::regex_match(s.GetString(), s.GetString() - + s.GetLength(), e, f); + + s.GetLength(), e, f);

- Example: + Example:

-
-//
+
//
 // Find out if *password* meets our password requirements,
 // as defined by the regular expression *requirements*.
 //
@@ -117,31 +109,29 @@
    return boost::regex_match(password, boost::make_regex(requirements));
 }      
 
-

- +

+ regex_search -
+

- There are two additional overloads for regex_search, the first reports + There are two additional overloads for regex_search, the first reports what matched the second does not:

-
-template <class charT, class A, class T>
+
template <class charT, class A, class T>
 bool regex_search(const ATL::CSimpleStringT<charT>& s,
                   match_results<const charT*, A>& what,
                   const basic_regex<charT, T>& e,
                   boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
 

- Effects: returns ::boost::regex_search(s.GetString(), + Effects: returns ::boost::regex_search(s.GetString(), s.GetString() + s.GetLength(), what, e, f);

- Example: Postcode extraction from an + Example: Postcode extraction from an address string.

-
-CString extract_postcode(const CString& address)
+
CString extract_postcode(const CString& address)
 {
    // searches throw address for a UK postcode and returns the result,
    // the expression used is by Phil A. on www.regxlib.com:
@@ -158,32 +148,30 @@
    }
 }      
 
-

- +

+ regex_search (second overload) -
-
-template <class charT, class T>
+          
+
template <class charT, class T>
 inline bool regex_search(const ATL::CSimpleStringT<charT>& s,
                const basic_regex<charT, T>& e,
                boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
 

- Effects: returns ::boost::regex_search(s.GetString(), + Effects: returns ::boost::regex_search(s.GetString(), s.GetString() - + s.GetLength(), e, f); + + s.GetLength(), e, f);

-

- +

+ regex_replace -
+

- There are two additional overloads for regex_replace, the first sends + There are two additional overloads for regex_replace, the first sends output to an output iterator, while the second creates a new string

-
-template <class OutputIterator, class BidirectionalIterator, class traits, class
+
template <class OutputIterator, class BidirectionalIterator, class traits, class
          charT>
 OutputIterator regex_replace(OutputIterator out,
                            BidirectionalIterator first,
@@ -193,26 +181,24 @@
                            match_flag_type flags = match_default)
 

- Effects: returns ::boost::regex_replace(out, first, last, e, fmt.GetString(), - flags); + Effects: returns ::boost::regex_replace(out, first, last, e, fmt.GetString(), + flags);

-
-template <class traits, charT>
+
template <class traits, charT>
 ATL::CSimpleStringT<charT> regex_replace(const ATL::CSimpleStringT<charT>& s,
                            const basic_regex<charT, traits>& e,
                            const ATL::CSimpleStringT<charT>& fmt,
                            match_flag_type flags = match_default)
 

- Effects: returns a new string created - using regex_replace, + Effects: returns a new string created + using regex_replace, and the same memory manager as string s.

- Example: + Example:

-
-//
+
//
 // Take a credit card number as a string of digits, 
 // and reformat it as a human readable string with "-"
 // separating each group of four digits:
@@ -228,10 +214,11 @@
 
 
- +

+

diff --git a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_intro.html b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_intro.html index 017ca050..a63c09a3 100644 --- a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_intro.html +++ b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_intro.html @@ -1,17 +1,13 @@ - - Introduction to Boost.Regex and MFC Strings +Introduction to Boost.Regex and MFC Strings - + - - - + + + @@ -28,11 +24,11 @@

- The header <boost/regex/mfc.hpp> provides Boost.Regex support for + The header <boost/regex/mfc.hpp> provides Boost.Regex support for MFC string types: note that this support requires Visual Studio .NET (Visual C++ 7) or later, where all of the MFC and ATL string types are based around the CSimpleStringT class template. @@ -42,8 +38,7 @@ then you can substitute any of the following MFC/ATL types (all of which inherit from CSimpleStringT):

-
-CString
+
CString
 CStringA
 CStringW
 CAtlString
@@ -56,10 +51,11 @@
 
 
- +

+

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 beabcfcf..b6d5da8a 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 @@ -1,16 +1,13 @@ - - Iterating Over the Matches Within An MFC String +Iterating Over the Matches Within An MFC String - + - - - + + + @@ -27,20 +24,19 @@

The following helper functions are provided to ease the conversion from - an MFC/ATL string to a regex_iterator or regex_token_iterator: + an MFC/ATL string to a regex_iterator or regex_token_iterator:

-

- +

+ regex_iterator creation helper -
-
-template <class charT>
+          
+
template <class charT>
 regex_iterator<charT const*> 
    make_regex_iterator(
       const ATL::CSimpleStringT<charT>& s, 
@@ -48,15 +44,14 @@
       ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default);
 

- Effects: returns regex_iterator(s.GetString(), s.GetString() + s.GetLength(), + Effects: returns regex_iterator(s.GetString(), s.GetString() + s.GetLength(), e, - f); + f);

- Example: + Example:

-
-void enumerate_links(const CString& html)
+
void enumerate_links(const CString& html)
 {
    // enumerate and print all the  links in some HTML text,
    // the expression used is by Andew Lee on www.regxlib.com:
@@ -72,13 +67,12 @@
    }
 }
 
-

- +

+ regex_token_iterator creation helpers -
-
-template <class charT> 
+          
+
template <class charT> 
 regex_token_iterator<charT const*> 
    make_regex_token_iterator(
       const ATL::CSimpleStringT<charT>& s, 
@@ -87,13 +81,12 @@
       ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default);
 

- Effects: returns regex_token_iterator(s.GetString(), s.GetString() + s.GetLength(), + Effects: returns regex_token_iterator(s.GetString(), s.GetString() + s.GetLength(), e, sub, - f); + f);

-
-template <class charT> 
+
template <class charT> 
 regex_token_iterator<charT const*> 
    make_regex_token_iterator(
       const ATL::CSimpleStringT<charT>& s, 
@@ -102,13 +95,12 @@
       ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default);
 

- Effects: returns regex_token_iterator(s.GetString(), s.GetString() + s.GetLength(), + Effects: returns regex_token_iterator(s.GetString(), s.GetString() + s.GetLength(), e, subs, - f); + f);

-
-template <class charT, std::size_t N> 
+
template <class charT, std::size_t N> 
 regex_token_iterator<charT const*> 
    make_regex_token_iterator(
       const ATL::CSimpleStringT<charT>& s, 
@@ -117,16 +109,15 @@
       ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default);
 

- Effects: returns regex_token_iterator(s.GetString(), s.GetString() + s.GetLength(), + Effects: returns regex_token_iterator(s.GetString(), s.GetString() + s.GetLength(), e, subs, - f); + f);

- Example: + Example:

-
-void enumerate_links2(const CString& html)
+
void enumerate_links2(const CString& html)
 {
    // enumerate and print all the  links in some HTML text,
    // the expression used is by Andew Lee on www.regxlib.com:
@@ -145,10 +136,11 @@
 
 
- +

+

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 5c4f3b44..54484d18 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 @@ -1,17 +1,13 @@ - - Regular Expression Creation From an MFC String +Regular Expression Creation From an MFC String - + - - - + + + @@ -28,30 +24,30 @@

The following helper function is available to assist in the creation of a regular expression from an MFC/ATL string type:

-
-template <class charT>
+
template <class charT>
 basic_regex<charT> 
    make_regex(const ATL::CSimpleStringT<charT>& s, 
             ::boost::regex_constants::syntax_option_type f = boost::regex_constants::normal);
 

- Effects: returns basic_regex<charT>(s.GetString(), s.GetString() + s.GetLength(), - f); + Effects: returns basic_regex<charT>(s.GetString(), s.GetString() + s.GetLength(), + f);

- +

+

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 452240b8..cf126ab8 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 @@ -1,17 +1,13 @@ - - Regex Types Used With MFC Strings +Regex Types Used With MFC Strings - + - - - + + + @@ -28,31 +24,31 @@

The following typedefs are provided for the convenience of those working with TCHAR's:

-
-typedef basic_regex<TCHAR>                  tregex; 
+
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 - TCHAR, then use the regular Boost.Regex types regex - and wregex instead. + TCHAR, then use the regular Boost.Regex types regex + and wregex instead.

- +

+

diff --git a/doc/html/boost_regex/ref/posix.html b/doc/html/boost_regex/ref/posix.html index 18acf970..6dd072af 100644 --- a/doc/html/boost_regex/ref/posix.html +++ b/doc/html/boost_regex/ref/posix.html @@ -1,14 +1,13 @@ - POSIX Compatible C API's +POSIX Compatible C API's - + - - - + + + @@ -25,13 +24,14 @@
-
[Note] Note

+

this is an abridged reference to the POSIX API functions, these are provided for compatibility with other libraries, rather than as an API to be used in new code (unless you need access from a language other than C++). This @@ -39,14 +39,12 @@ as the names used are macros that expand to the actual function names.

-
-#include <boost/cregex.hpp>
+
#include <boost/cregex.hpp>
 

or:

-
-#include <boost/regex.h>
+
#include <boost/regex.h>
 

The following functions are available for users who need a POSIX compatible @@ -59,9 +57,9 @@ [Important] Important -

- Note that all the symbols defined here are enclosed inside namespace boost when used in C++ programs, unless - you use #include <boost/regex.h> +

+ Note that all the symbols defined here are enclosed inside namespace boost when used in C++ programs, unless + you use #include <boost/regex.h> instead - in which case the symbols are still defined in namespace boost, but are made available in the global namespace as well.

@@ -69,8 +67,7 @@

The functions are defined as:

-
-extern "C" {
+
extern "C" {
 
 struct regex_tA;
 struct regex_tW;
@@ -125,13 +122,13 @@
 
 
               

- unsigned int - re_nsub + unsigned int + re_nsub

- This is filled in by regcomp + This is filled in by regcomp and indicates the number of sub-expressions contained in the regular expression.

@@ -140,7 +137,7 @@

- const TCHAR* re_endp + const TCHAR* re_endp

@@ -157,23 +154,23 @@ [Note] Note -

- regex_t is actually a - #define - it is either - regex_tA or regex_tW depending upon whether UNICODE is defined or not, TCHAR is either char - or wchar_t again depending - upon the macro UNICODE. +

+ regex_t is actually a + #define - it is either + regex_tA or regex_tW depending upon whether UNICODE is defined or not, TCHAR is either char + or wchar_t again depending + upon the macro UNICODE.

-

- +

+ regcomp -
+

- regcomp takes a pointer to - a regex_t, a pointer to the + regcomp takes a pointer to + a regex_t, a pointer to the expression to compile and a flags parameter which can be a combination of:

@@ -202,9 +199,9 @@ @@ -217,12 +214,12 @@ @@ -346,8 +343,8 @@ @@ -359,8 +356,8 @@ @@ -372,8 +369,8 @@ @@ -381,10 +378,10 @@

- Compiles modern regular expressions. Equivalent to regbase::char_classes | + Compiles modern regular expressions. Equivalent to regbase::char_classes | regbase::intervals | - regbase::bk_refs. + regbase::bk_refs.

Compiles basic (obsolete) regular expression syntax. Equivalent to - regbase::char_classes | + regbase::char_classes | regbase::intervals | regbase::limited_ops | regbase::bk_braces | regbase::bk_parens | - regbase::bk_refs. + regbase::bk_refs.

- A shortcut for awk-like behavior: REG_EXTENDED - | REG_ESCAPE_IN_LISTS + A shortcut for awk-like behavior: REG_EXTENDED + | REG_ESCAPE_IN_LISTS

- A shortcut for grep like behavior: REG_BASIC - | REG_NEWLINE_ALT + A shortcut for grep like behavior: REG_BASIC + | REG_NEWLINE_ALT

- A shortcut for egrep like behavior: REG_EXTENDED - | REG_NEWLINE_ALT + A shortcut for egrep like behavior: REG_EXTENDED + | REG_NEWLINE_ALT

-

- +

+ regerror -
+

regerror takes the following parameters, it maps an error code to a human readable string: @@ -469,10 +466,10 @@

-

- +

+ regexec -
+

regexec finds the first occurrence of expression e within string buf. If len is non-zero then *m is filled in with what matched @@ -539,21 +536,22 @@

-

- +

+ regfree -
+

- regfree frees all the memory + regfree frees all the memory that was allocated by regcomp.

- +

+

diff --git a/doc/html/boost_regex/ref/regex_iterator.html b/doc/html/boost_regex/ref/regex_iterator.html index 0939d550..8b7f7873 100644 --- a/doc/html/boost_regex/ref/regex_iterator.html +++ b/doc/html/boost_regex/ref/regex_iterator.html @@ -1,13 +1,13 @@ - regex_iterator +regex_iterator - + - - - + + + @@ -24,15 +24,15 @@

- The iterator type regex_iterator will enumerate all + The iterator type regex_iterator will enumerate all of the regular expression matches found in some sequence: dereferencing a - regex_iterator - yields a reference to a match_results object. + regex_iterator + yields a reference to a match_results object.

-
-template <class BidirectionalIterator, 
+
template <class BidirectionalIterator, 
          class charT = iterator_traits<BidirectionalIterator>::value_type,
          class traits = regex_traits<charT> >
 class regex_iterator 
@@ -77,39 +77,37 @@
                           const basic_regex<charT, traits>& e, 
                           regex_constants::match_flag_type m = regex_constants::match_default);
 
-

- +

+ Description -
+

- A regex_iterator + A regex_iterator is constructed from a pair of iterators, and enumerates all occurrences of a regular expression within that iterator range.

-
-regex_iterator();
+
regex_iterator();
 

- Effects: constructs an end of sequence - regex_iterator. + Effects: constructs an end of sequence + regex_iterator.

-
-regex_iterator(BidirectionalIterator a, BidirectionalIterator b, 
+
regex_iterator(BidirectionalIterator a, BidirectionalIterator b, 
                const regex_type& re, 
                match_flag_type m = match_default);
 

- Effects: constructs a regex_iterator that will enumerate + Effects: constructs a regex_iterator that will enumerate all occurrences of the expression re, within the sequence - [a,b), and found using match_flag_type m. - The object re must exist for the lifetime of the regex_iterator. + [a,b), and found using match_flag_type m. + The object re must exist for the lifetime of the regex_iterator.

- Throws: std::runtime_error + Throws: std::runtime_error if the complexity of matching the expression against an N character string begins to exceed O(N2), or if the program runs out of stack space while matching the expression (if Boost.Regex is configured in recursive mode), or if the @@ -118,51 +116,46 @@

-
-regex_iterator(const regex_iterator& that);
+
regex_iterator(const regex_iterator& that);
 

- Effects: constructs a copy of that. + Effects: constructs a copy of that.

- Postconditions: *this == that. + Postconditions: *this == that.

-
-regex_iterator& operator=(const regex_iterator&);
+
regex_iterator& operator=(const regex_iterator&);
 

- Effects: sets *this equal to those in that. + Effects: sets *this equal to those in that.

- Postconditions: *this == that. + Postconditions: *this == that.

-
-bool operator==(const regex_iterator& that)const;
+
bool operator==(const regex_iterator& that)const;
 

- Effects: returns true if *this is equal + Effects: returns true if *this is equal to that.

-
-bool operator!=(const regex_iterator&)const;
+
bool operator!=(const regex_iterator&)const;
 

- Effects: returns !(*this == that). + Effects: returns !(*this == that).

-
-const value_type& operator*()const;
+
const value_type& operator*()const;
 

- Effects: dereferencing a regex_iterator object it yields - a const reference to a match_results object, whose members + Effects: dereferencing a regex_iterator object it yields + a const reference to a match_results object, whose members are set as follows:

@@ -186,31 +179,31 @@

- (*it).size() + (*it).size()

- re.mark_count() + re.mark_count()

- (*it).empty() + (*it).empty()

- false + false

- (*it).prefix().first + (*it).prefix().first

@@ -223,44 +216,44 @@

- (*it).prefix().last + (*it).prefix().last

- The same as the start of the match found: (*it)[0].first + The same as the start of the match found: (*it)[0].first

- (*it).prefix().matched + (*it).prefix().matched

- True if the prefix did not match an empty string: (*it).prefix().first != - (*it).prefix().second + True if the prefix did not match an empty string: (*it).prefix().first != + (*it).prefix().second

- (*it).suffix().first + (*it).suffix().first

- The same as the end of the match found: (*it)[0].second + The same as the end of the match found: (*it)[0].second

- (*it).suffix().last + (*it).suffix().last

@@ -272,20 +265,20 @@

- (*it).suffix().matched + (*it).suffix().matched

- True if the suffix did not match an empty string: (*it).suffix().first != - (*it).suffix().second + True if the suffix did not match an empty string: (*it).suffix().first != + (*it).suffix().second

- (*it)[0].first + (*it)[0].first

@@ -298,7 +291,7 @@

- (*it)[0].second + (*it)[0].second

@@ -310,7 +303,7 @@

- (*it)[0].matched + (*it)[0].matched

@@ -323,12 +316,12 @@

- (*it)[n].first + (*it)[n].first

- For all integers n < (*it).size(), + For all integers n < (*it).size(), the start of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then last. @@ -338,12 +331,12 @@

- (*it)[n].second + (*it)[n].second

- For all integers n < (*it).size(), + For all integers n < (*it).size(), the end of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then last. @@ -353,12 +346,12 @@

- (*it)[n].matched + (*it)[n].matched

- For all integers n < (*it).size(), + For all integers n < (*it).size(), true if sub-expression n participated in the match, false otherwise.

@@ -367,12 +360,12 @@

- (*it).position(n) + (*it).position(n)

- For all integers n < (*it).size(), + For all integers n < (*it).size(), then the distance from the start of the underlying sequence to the start of sub-expression match n.

@@ -382,29 +375,27 @@

-
-const value_type* operator->()const;
+
const value_type* operator->()const;
 

- Effects: returns &(*this). + Effects: returns &(*this).

-
-regex_iterator& operator++();
+
regex_iterator& operator++();
 

- Effects: moves the iterator to the next + Effects: moves the iterator to the next match in the underlying sequence, or the end of sequence iterator if none if found. When the last match found matched a zero length string, then the - regex_iterator + regex_iterator will find the next match as follows: if there exists a non-zero length match that starts at the same location as the last one, then returns it, otherwise starts looking for the next (possibly zero length) match from one position to the right of the last match.

- Throws: std::runtime_error + Throws: std::runtime_error if the complexity of matching the expression against an N character string begins to exceed O(N2), or if the program runs out of stack space while matching the expression (if Boost.Regex is configured in recursive mode), or if the @@ -412,24 +403,22 @@ in non-recursive mode).

- Returns: *this. + Returns: *this.

-
-regex_iterator operator++(int);
+
regex_iterator operator++(int);
 

- Effects: constructs a copy result of *this, then - calls ++(*this). + Effects: constructs a copy result of *this, then + calls ++(*this).

- Returns: result. + 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); 
@@ -441,21 +430,20 @@
                      regex_constants::match_flag_type m = regex_constants::match_default);
 

- Effects: returns an iterator that enumerates + Effects: returns an iterator that enumerates all occurences of expression e in text p - using match_flag_type + using match_flag_type m.

-

- +

+ Examples -
+

The following example takes a C++ source file and builds up an index of class names, and the location of that class in the file.

-
-#include <string>
+
#include <string>
 #include <map>
 #include <fstream>
 #include <iostream>
@@ -549,10 +537,11 @@
 
- +

+

diff --git a/doc/html/boost_regex/ref/regex_match.html b/doc/html/boost_regex/ref/regex_match.html index 55bd6752..b5ef87d9 100644 --- a/doc/html/boost_regex/ref/regex_match.html +++ b/doc/html/boost_regex/ref/regex_match.html @@ -1,13 +1,13 @@ - regex_match +regex_match - + - - - + + + @@ -24,13 +24,13 @@
-
-#include <boost/regex.hpp> 
+ regex_match
+
+
#include <boost/regex.hpp> 
 

- The algorithm regex_match - determines whether a given regular expression matches all + The algorithm regex_match + determines whether a given regular expression matches all of a given character sequence denoted by a pair of bidirectional-iterators, the algorithm is defined as follows, the main use of this function is data input validation. @@ -40,15 +40,14 @@

-
[Important] Important

- Note that the result is true only if the expression matches the whole of the input sequence. If you want to search - for an expression somewhere within the sequence then use regex_search. If you want to match - a prefix of the character string then use regex_search with the flag match_continuous +

+ Note that the result is true only if the expression matches the whole of the input sequence. If you want to search + for an expression somewhere within the sequence then use regex_search. If you want to match + a prefix of the character string then use regex_search with the flag match_continuous set.

-
-template <class BidirectionalIterator, class Allocator, class charT, class traits>
+
template <class BidirectionalIterator, class Allocator, class charT, class traits>
 bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
                  match_results<BidirectionalIterator, Allocator>& m,
                  const basic_regex <charT, traits>& e,
@@ -80,31 +79,30 @@
                  const basic_regex <charT, traits>& e,
                  match_flag_type flags = match_default);
 
-

- +

+ Description -
-
-template <class BidirectionalIterator, class Allocator, class charT, class traits>
+      
+
template <class BidirectionalIterator, class Allocator, class charT, class traits>
 bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
                  match_results<BidirectionalIterator, Allocator>& m,
                  const basic_regex <charT, traits>& e,
                  match_flag_type flags = match_default);
 

- Requires: Type BidirectionalIterator meets + Requires: Type BidirectionalIterator meets the requirements of a Bidirectional Iterator (24.1.4).

- Effects: Determines whether there is an + Effects: Determines whether there is an exact match between the regular expression e, and all of the character sequence [first, last), parameter flags - (see match_flag_type) + (see match_flag_type) is used to control how the expression is matched against the character sequence. Returns true if such a match exists, false otherwise.

- Throws: std::runtime_error + Throws: std::runtime_error if the complexity of matching the expression against an N character string begins to exceed O(N2), or if the program runs out of stack space while matching the expression (if Boost.Regex is configured in recursive mode), or if the @@ -112,7 +110,7 @@ in non-recursive mode).

- Postconditions: If the function returns + Postconditions: If the function returns false, then the effect on parameter m is undefined, otherwise the effects on parameter m are given in the table: @@ -138,127 +136,127 @@

- m.size() + m.size()

- e.mark_count() + e.mark_count()

- m.empty() + m.empty()

- false + false

- m.prefix().first + m.prefix().first

- first + first

- m.prefix().last + m.prefix().last

- first + first

- m.prefix().matched + m.prefix().matched

- false + false

- m.suffix().first + m.suffix().first

- last + last

- m.suffix().last + m.suffix().last

- last + last

- m.suffix().matched + m.suffix().matched

- false + false

- m[0].first + m[0].first

- first + first

- m[0].second + m[0].second

- last + last

- m[0].matched + m[0].matched

@@ -271,72 +269,69 @@

- m[n].first + m[n].first

- For all integers n < m.size(), the start of the sequence that + For all integers n < m.size(), the start of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the - match, then last. + match, then last.

- m[n].second + m[n].second

- For all integers n < m.size(), the end of the sequence that matched + For all integers n < m.size(), the end of the sequence that matched sub-expression n. Alternatively, if sub-expression - n did not participate in the match, then last. + n did not participate in the match, then last.

- m[n].matched + m[n].matched

- For all integers n < m.size(), true if sub-expression n + For all integers n < m.size(), true if sub-expression n participated in the match, false otherwise.

-
-template <class BidirectionalIterator, class charT, class traits>
+
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);
 

- Effects: Behaves "as if" by constructing - an instance of match_results<BidirectionalIterator> what, - and then returning the result of regex_match(first, last, what, e, - flags). + Effects: Behaves "as if" by constructing + an instance of match_results<BidirectionalIterator> what, + and then returning the result of regex_match(first, last, what, e, + flags).

-
-template <class charT, class Allocator, class traits>
+
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);
 

- Effects: Returns the result of regex_match(str, str + Effects: Returns the result of regex_match(str, str + char_traits<charT>::length(str), - m, e, flags). + m, e, flags).

-
-template <class ST, class SA, class Allocator,
+
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, 
@@ -344,37 +339,34 @@
                match_flag_type flags = match_default);
 

- Effects: Returns the result of regex_match(s.begin(), s.end(), m, e, flags). + Effects: Returns the result of regex_match(s.begin(), s.end(), m, e, flags).

-
-template <class charT, class traits>
+
template <class charT, class traits>
 bool regex_match(const charT* str,
                const basic_regex <charT, traits>& e,
                match_flag_type flags = match_default);
 

- Effects: Returns the result of regex_match(str, str + Effects: Returns the result of regex_match(str, str + char_traits<charT>::length(str), - e, flags). + e, flags).

-
-template <class ST, class SA, class charT, class traits>
+
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);
 

- Effects: Returns the result of regex_match(s.begin(), s.end(), e, flags). + Effects: Returns the result of regex_match(s.begin(), s.end(), e, flags).

-

- +

+ Examples -
+

The following example processes an ftp response:

-
-#include <stdlib.h> 
+
#include <stdlib.h> 
 #include <boost/regex.hpp> 
 #include <string> 
 #include <iostream> 
@@ -408,10 +400,11 @@
 
- +

+

diff --git a/doc/html/boost_regex/ref/regex_replace.html b/doc/html/boost_regex/ref/regex_replace.html index 5c47aaf3..a6a7beb7 100644 --- a/doc/html/boost_regex/ref/regex_replace.html +++ b/doc/html/boost_regex/ref/regex_replace.html @@ -1,13 +1,13 @@ - regex_replace +regex_replace - + - - - + + + @@ -24,22 +24,21 @@
-
-#include <boost/regex.hpp> 
+ regex_replace
+
+
#include <boost/regex.hpp> 
 

- The algorithm regex_replace searches through a + The algorithm regex_replace searches through a string finding all the matches to the regular expression: for each match - it then calls match_results<>::format to format the string and + it then calls match_results<>::format to format the string and sends the result to the output iterator. Sections of text that do not match are copied to the output unchanged only if the flags - parameter does not have the flag format_no_copy - set. If the flag format_first_only + parameter does not have the flag format_no_copy + set. If the flag format_first_only is set then only the first occurrence is replaced rather than all occurrences.

-
-template <class OutputIterator, class BidirectionalIterator, class traits, class charT>
+
template <class OutputIterator, class BidirectionalIterator, class traits, class charT>
 OutputIterator regex_replace(OutputIterator out,
                              BidirectionalIterator first,
                              BidirectionalIterator last,
@@ -53,12 +52,11 @@
                                   const basic_string<charT>& fmt,
                                   match_flag_type flags = match_default);
 
-

- +

+ Description -
-
-template <class OutputIterator, class BidirectionalIterator, class traits, class charT>
+      
+
template <class OutputIterator, class BidirectionalIterator, class traits, class charT>
 OutputIterator regex_replace(OutputIterator out,
                              BidirectionalIterator first,
                              BidirectionalIterator last,
@@ -73,84 +71,76 @@
         and copies the resulting string to out.
       

- If the flag format_no_copy + If the flag format_no_copy is set in flags then unmatched sections of text are not copied to output.

- If the flag format_first_only + If the flag format_first_only is set in flags then only the first occurence of e is replaced.

The manner in which the format string fmt is interpretted, along with the rules used for finding matches, are determined by the flags - set in flags: see match_flag_type. + set in flags: see match_flag_type.

- Effects: Constructs an regex_iterator object: + Effects: Constructs an regex_iterator object:

-
-regex_iterator<BidirectionalIterator, charT, traits, Allocator> 
+
regex_iterator<BidirectionalIterator, charT, traits, Allocator> 
                                           i(first, last, e, flags), 
 

and uses i to enumerate through all of the matches - m of type match_results <BidirectionalIterator> + m of type match_results <BidirectionalIterator> that occur within the sequence [first, last).

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.

- If flags & - format_first_only is non-zero then + If flags & + format_first_only is non-zero then only the first match found is replaced.

- Throws: std::runtime_error + Throws: std::runtime_error if the complexity of matching the expression against an N character string begins to exceed O(N2), or if the program runs out of stack space while matching the expression (if Boost.Regex is configured in recursive mode), or if the @@ -158,31 +148,29 @@ in non-recursive mode).

- Returns: out. + Returns: out.

-
-template <class traits, class charT>
+
template <class traits, class charT>
 basic_string<charT> regex_replace(const basic_string<charT>& s,
                                   const basic_regex<charT, traits>& e,
                                   const basic_string<charT>& fmt,
                                   match_flag_type flags = match_default);
 

- Effects: Constructs an object basic_string<charT> result, calls regex_replace(back_inserter(result), s.begin(), s.end(), e, + Effects: Constructs an object basic_string<charT> result, calls regex_replace(back_inserter(result), s.begin(), s.end(), e, fmt, - flags), - and then returns result. + flags), + and then returns result.

-

- +

+ Examples -
+

The following example takes C/C++ source code as input, and outputs syntax highlighted HTML code.

-
-#include <fstream>
+
#include <fstream>
 #include <sstream>
 #include <string>
 #include <iterator>
@@ -294,10 +282,11 @@
 
 
- +

+

diff --git a/doc/html/boost_regex/ref/regex_search.html b/doc/html/boost_regex/ref/regex_search.html index 196ac687..e4230a2a 100644 --- a/doc/html/boost_regex/ref/regex_search.html +++ b/doc/html/boost_regex/ref/regex_search.html @@ -1,13 +1,13 @@ - regex_search +regex_search - + - - - + + + @@ -24,19 +24,18 @@
-
-#include <boost/regex.hpp> 
+ regex_search
+
+
#include <boost/regex.hpp> 
 

- The algorithm regex_search will search a range + The algorithm regex_search will search a range denoted by a pair of bidirectional-iterators for a given regular expression. The algorithm uses various heuristics to reduce the search time by only checking 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,
@@ -73,30 +72,29 @@
                   const basic_regex<charT, traits>& e,
                   match_flag_type flags = match_default);
 
-

- +

+ Description -
-
-template <class BidirectionalIterator, class Allocator, class charT, class traits>
+      
+
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);
 

- Requires: Type BidirectionalIterator meets + Requires: Type BidirectionalIterator meets the requirements of a Bidirectional Iterator (24.1.4).

- Effects: Determines whether there is some + Effects: Determines whether there is some sub-sequence within [first,last) that matches the regular expression e, parameter flags is used to control how the expression is matched against the character sequence. Returns true if such a sequence exists, false otherwise.

- Throws: std::runtime_error + Throws: std::runtime_error if the complexity of matching the expression against an N character string begins to exceed O(N2), or if the program runs out of stack space while matching the expression (if Boost.Regex is configured in recursive mode), or if the @@ -104,7 +102,7 @@ in non-recursive mode).

- Postconditions: If the function returns + Postconditions: If the function returns false, then the effect on parameter m is undefined, otherwise the effects on parameter m are given in the table: @@ -130,105 +128,105 @@

- m.size() + m.size()

- e.mark_count() + e.mark_count()

- m.empty() + m.empty()

- false + false

- m.prefix().first + m.prefix().first

- first + first

- m.prefix().last + m.prefix().last

- m[0].first + m[0].first

- m.prefix().matched + m.prefix().matched

- m.prefix().first != - m.prefix().second + m.prefix().first != + m.prefix().second

- m.suffix().first + m.suffix().first

- m[0].second + m[0].second

- m.suffix().last + m.suffix().last

- last + last

- m.suffix().matched + m.suffix().matched

- m.suffix().first != - m.suffix().second + m.suffix().first != + m.suffix().second

- m[0].first + m[0].first

@@ -241,7 +239,7 @@

- m[0].second + m[0].second

@@ -253,7 +251,7 @@

- m[0].matched + m[0].matched

@@ -266,12 +264,12 @@

- m[n].first + m[n].first

- For all integers n < m.size(), the start of the sequence that + For all integers n < m.size(), the start of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then last. @@ -281,45 +279,43 @@

- m[n].second + m[n].second

- For all integers n < m.size(), the end of the sequence that matched + For all integers n < m.size(), the end of the sequence that matched sub-expression n. Alternatively, if sub-expression - n did not participate in the match, then last. + n did not participate in the match, then last.

- m[n].matched + m[n].matched

- For all integers n < m.size(), true if sub-expression n + For all integers n < m.size(), true if sub-expression n participated in the match, false otherwise.

-
-template <class charT, class Allocator, class traits>
+
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);
 

- Effects: Returns the result of regex_search(str, str + Effects: Returns the result of regex_search(str, str + char_traits<charT>::length(str), - m, e, flags). + m, e, flags).

-
-template <class ST, class SA, class Allocator, class charT,
+
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,
@@ -327,53 +323,49 @@
                   match_flag_type flags = match_default);
 

- Effects: Returns the result of regex_search(s.begin(), s.end(), m, e, flags). + Effects: Returns the result of regex_search(s.begin(), s.end(), m, e, flags).

-
-template <class iterator, class charT, class traits>
+
template <class iterator, class charT, class traits>
 bool regex_search(iterator first, iterator last,
                   const basic_regex<charT, traits>& e,
                   match_flag_type flags = match_default);
 

- Effects: Behaves "as if" by constructing - an instance of match_results<BidirectionalIterator> what, - and then returning the result of regex_search(first, last, what, e, - flags). + Effects: Behaves "as if" by constructing + an instance of match_results<BidirectionalIterator> what, + and then returning the result of regex_search(first, last, what, e, + flags).

-
-template <class charT, class traits>
+
template <class charT, class traits>
 bool regex_search(const charT* str
                   const basic_regex<charT, traits>& e,
                   match_flag_type flags = match_default);
 

- Effects: Returns the result of regex_search(str, str + Effects: Returns the result of regex_search(str, str + char_traits<charT>::length(str), - e, flags). + e, flags).

-
-template <class ST, class SA, class charT, class traits>
+
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);
 

- Effects: Returns the result of regex_search(s.begin(), s.end(), e, flags). + Effects: Returns the result of regex_search(s.begin(), s.end(), e, flags).

-

- +

+ Examples -
+

The following example, takes the contents of a file in the form of a string, and searches for all the C++ class declarations in the file. The code will - work regardless of the way that std::string + work regardless of the way that std::string 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 <string> 
 #include <map> 
 #include <boost/regex.hpp> 
 
@@ -417,10 +409,11 @@
 
- +

+

diff --git a/doc/html/boost_regex/ref/regex_token_iterator.html b/doc/html/boost_regex/ref/regex_token_iterator.html index 292ff6b0..350c527b 100644 --- a/doc/html/boost_regex/ref/regex_token_iterator.html +++ b/doc/html/boost_regex/ref/regex_token_iterator.html @@ -1,13 +1,13 @@ - regex_token_iterator +regex_token_iterator - + - - - + + + @@ -24,22 +24,22 @@

- The template class regex_token_iterator is an iterator + The template class regex_token_iterator is an iterator adapter; that is to say it represents a new view of an existing iterator sequence, by enumerating all the occurrences of a regular expression within that sequence, and presenting one or more character sequence for each match - found. Each position enumerated by the iterator is a sub_match object that represents + found. Each position enumerated by the iterator is a sub_match object that represents what matched a particular sub-expression within the regular expression. When - class regex_token_iterator is used to + class regex_token_iterator is used to enumerate a single sub-expression with index -1, then the iterator performs field splitting: that is to say it enumerates one character sequence for 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 
@@ -135,43 +135,41 @@
          const std::vector<int>& submatch, 
          regex_constants::match_flag_type m = regex_constants::match_default);
 
-

- +

+ Description -
+

-
-regex_token_iterator();
+
regex_token_iterator();
 

- Effects: constructs an end of sequence iterator. + Effects: constructs an end of sequence iterator.

-
-regex_token_iterator(BidirectionalIterator a, 
+
regex_token_iterator(BidirectionalIterator a, 
                      BidirectionalIterator b, 
                      const regex_type& re, 
                      int submatch = 0, 
                      match_flag_type m = match_default);
 

- Preconditions: !re.empty(). Object re shall exist + Preconditions: !re.empty(). Object re shall exist for the lifetime of the iterator constructed from it.

- Effects: constructs a regex_token_iterator that will enumerate + Effects: constructs a regex_token_iterator that will enumerate one string for each regular expression match of the expression re found within the sequence [a,b), using match flags m - (see match_flag_type). + (see match_flag_type). The string enumerated is the sub-expression submatch for each match found; if submatch is -1, then enumerates all the text sequences that did not match the expression re (that is to performs field splitting).

- Throws: std::runtime_error + Throws: std::runtime_error if the complexity of matching the expression against an N character string begins to exceed O(N2), or if the program runs out of stack space while matching the expression (if Boost.Regex is configured in recursive mode), or if the @@ -180,33 +178,32 @@

-
-regex_token_iterator(BidirectionalIterator a, 
+
regex_token_iterator(BidirectionalIterator a, 
                      BidirectionalIterator b, 
                      const regex_type& re, 
                      const std::vector<int>& submatches, 
                      match_flag_type m = match_default);
 

- Preconditions: submatches.size() - && !re.empty(). Object re shall exist + Preconditions: submatches.size() + && !re.empty(). Object re shall exist for the lifetime of the iterator constructed from it.

- Effects: constructs a regex_token_iterator that will enumerate - submatches.size() + Effects: constructs a regex_token_iterator that will enumerate + submatches.size() strings for each regular expression match of the expression re found within the sequence [a,b), using match flags m - (see match_flag_type). + (see match_flag_type). For each match found one string will be enumerated for each sub-expression - index contained within submatches vector; if submatches[0] + index contained within submatches vector; if submatches[0] is -1, then the first string enumerated for each match will be all of the text from end of the last match to the start of the current match, in addition there will be one extra string enumerated when no more matches can be found: from the end of the last match found, to the end of the underlying sequence.

- Throws: std::runtime_error + Throws: std::runtime_error if the complexity of matching the expression against an N character string begins to exceed O(N2), or if the program runs out of stack space while matching the expression (if Boost.Regex is configured in recursive mode), or if the @@ -215,8 +212,7 @@

-
-template <std::size_t N>
+
template <std::size_t N>
 regex_token_iterator(BidirectionalIterator a, 
                      BidirectionalIterator b, 
                      const regex_type& re, 
@@ -224,23 +220,23 @@
                      match_flag_type m = match_default);
 

- Preconditions: !re.empty(). Object re shall exist + Preconditions: !re.empty(). Object re shall exist for the lifetime of the iterator constructed from it.

- Effects: constructs a regex_token_iterator that will enumerate + Effects: constructs a regex_token_iterator that will enumerate R strings for each regular expression match of the expression re found within the sequence [a,b), using match flags - m (see match_flag_type). For each match + m (see match_flag_type). For each match found one string will be enumerated for each sub-expression index contained - within the submatches array; if submatches[0] + within the submatches array; if submatches[0] is -1, then the first string enumerated for each match will be all of the text from end of the last match to the start of the current match, in addition there will be one extra string enumerated when no more matches can be found: from the end of the last match found, to the end of the underlying sequence.

- Throws: std::runtime_error + Throws: std::runtime_error if the complexity of matching the expression against an N character string begins to exceed O(N2), or if the program runs out of stack space while matching the expression (if Boost.Regex is configured in recursive mode), or if the @@ -249,70 +245,63 @@

-
-regex_token_iterator(const regex_token_iterator& that);
+
regex_token_iterator(const regex_token_iterator& that);
 

- Effects: constructs a copy of that. + Effects: constructs a copy of that.

- Postconditions: *this == that. + Postconditions: *this == that.

-
-regex_token_iterator& operator=(const regex_token_iterator& that);
+
regex_token_iterator& operator=(const regex_token_iterator& that);
 

- Effects: sets *this to be equal to that. + Effects: sets *this to be equal to that.

- Postconditions: *this == that. + Postconditions: *this == that.

-
-bool operator==(const regex_token_iterator&)const;
+
bool operator==(const regex_token_iterator&)const;
 

- Effects: returns true if *this is the same position as that. + Effects: returns true if *this is the same position as that.

-
-bool operator!=(const regex_token_iterator&)const;
+
bool operator!=(const regex_token_iterator&)const;
 

- Effects: returns !(*this == that). + Effects: returns !(*this == that).

-
-const value_type& operator*()const;
+
const value_type& operator*()const;
 

- Effects: returns the current character sequence + Effects: returns the current character sequence being enumerated.

-
-const value_type* operator->()const;
+
const value_type* operator->()const;
 

- Effects: returns &(*this). + Effects: returns &(*this).

-
-regex_token_iterator& operator++();
+
regex_token_iterator& operator++();
 

- Effects: Moves on to the next character + Effects: Moves on to the next character sequence to be enumerated.

- Throws: std::runtime_error + Throws: std::runtime_error if the complexity of matching the expression against an N character string begins to exceed O(N2), or if the program runs out of stack space while matching the expression (if Boost.Regex is configured in recursive mode), or if the @@ -320,24 +309,22 @@ in non-recursive mode).

- Returns: *this. + Returns: *this.

-
-regex_token_iterator& operator++(int);
+
regex_token_iterator& operator++(int);
 

- Effects: constructs a copy result of *this, then - calls ++(*this). + Effects: constructs a copy result of *this, then + calls ++(*this).

- Returns: result. + Returns: result.

-
-template <class charT, class traits>
+
template <class charT, class traits>
 regex_token_iterator<const charT*, charT, traits> 
    make_regex_token_iterator(
          const charT* p, 
@@ -388,22 +375,21 @@
          regex_constants::match_flag_type m = regex_constants::match_default);
 

- Effects: returns a regex_token_iterator that enumerates - one sub_match + Effects: returns a regex_token_iterator that enumerates + one sub_match for each value in submatch for each occurrence of regular expression e in string p, matched - using match_flag_type + using match_flag_type m.

-

- +

+ Examples -
+

The following example takes a string and splits it into a series of tokens:

-
-#include <iostream>
+
#include <iostream>
 #include <boost/regex.hpp>
 
 using namespace std;
@@ -441,8 +427,7 @@
         The following example takes a html file and outputs a list of all the linked
         files:
       

-
-#include <fstream>
+
#include <fstream>
 #include <iostream>
 #include <iterator>
 #include <boost/regex.hpp>
@@ -511,10 +496,11 @@
 
 
- +

+

diff --git a/doc/html/boost_regex/ref/regex_traits.html b/doc/html/boost_regex/ref/regex_traits.html index f358fb18..8f7507c8 100644 --- a/doc/html/boost_regex/ref/regex_traits.html +++ b/doc/html/boost_regex/ref/regex_traits.html @@ -1,14 +1,13 @@ - regex_traits +regex_traits - + - - - + + + @@ -25,9 +24,9 @@
-
-namespace boost{
+ regex_traits
+
+
namespace boost{
 
 template <class charT, class implementationT = sensible_default_choice>
 struct regex_traits : public implementationT
@@ -39,35 +38,35 @@
 struct c_regex_traits;
 
 template <class charT>
-struct cpp_regex_traits;
+class cpp_regex_traits;
 
 template <class charT>
-struct w32_regex_traits;
+class w32_regex_traits;
 
 } // namespace boost
 
-

- +

+ Description -
+

- The class regex_traits is + The class regex_traits is just a thin wrapper around an actual implemention class, which may be one of:

  • -c_regex_traits: this class +c_regex_traits: this class is deprecated, it wraps the C locale, and is used as the default implementation when the platform is not Win32, and the C++ locale is not available.
  • -cpp_regex_traits: the default +cpp_regex_traits: the default traits class for non-Win32 platforms, allows the regex class to be imbued with a std::locale instance.
  • -w32_regex_traits: the default +w32_regex_traits: the default traits class implementation on Win32 platforms, allows the regex class to be imbued with an LCID.
  • @@ -78,26 +77,26 @@

    • - BOOST_REGEX_USE_C_LOCALE: makes c_regex_traits + BOOST_REGEX_USE_C_LOCALE: makes c_regex_traits the default.
    • - BOOST_REGEX_USE_CPP_LOCALE: makes cpp_regex_traits + BOOST_REGEX_USE_CPP_LOCALE: makes cpp_regex_traits the default.

    - All these traits classes fulfil the traits + All these traits classes fulfil the traits class requirements.

- +

+

diff --git a/doc/html/boost_regex/ref/sub_match.html b/doc/html/boost_regex/ref/sub_match.html index 25d88d03..e2b5ea60 100644 --- a/doc/html/boost_regex/ref/sub_match.html +++ b/doc/html/boost_regex/ref/sub_match.html @@ -1,13 +1,13 @@ - sub_match +sub_match - + - - - + + + @@ -24,38 +24,38 @@
-
-#include <boost/regex.hpp>
+ sub_match
+
+
#include <boost/regex.hpp>
 

Regular expressions are different from many simple pattern-matching algorithms in that as well as finding an overall match they can also produce sub-expression matches: each sub-expression being delimited in the pattern by a pair of parenthesis (...). There has to be some method for reporting sub-expression - matches back to the user: this is achieved this by defining a class match_results + matches back to the user: this is achieved this by defining a class match_results that acts as an indexed collection of sub-expression matches, each sub-expression - match being contained in an object of type sub_match. + match being contained in an object of type sub_match.

- Objects of type sub_match - may only be obtained by subscripting an object of type match_results. + Objects of type sub_match + may only be obtained by subscripting an object of type match_results.

- Objects of type sub_match - may be compared to objects of type std::basic_string, - or const charT* or const - charT. + Objects of type sub_match + may be compared to objects of type std::basic_string, + or const charT* or const + charT.

- Objects of type sub_match - may be added to objects of type std::basic_string, - or const charT* or const - charT, to produce a new std::basic_string + Objects of type sub_match + may be added to objects of type std::basic_string, + or const charT* or const + charT, to produce a new std::basic_string object.

- When the marked sub-expression denoted by an object of type sub_match participated in a regular + When the marked sub-expression denoted by an object of type sub_match participated in a regular expression match then member matched evaluates to true, and members first and second denote the range of characters [first,second) which formed that match. Otherwise @@ -64,25 +64,24 @@ values.

- When the marked sub-expression denoted by an object of type sub_match was repeated, then the - sub_match + When the marked sub-expression denoted by an object of type sub_match was repeated, then the + sub_match object represents the match obtained by the last repeat. The complete set of all the captures obtained for all the repeats, may be accessed via the captures() member function (Note: this has serious performance implications, you have to explicitly enable this feature).

- If an object of type sub_match represents sub-expression + If an object of type sub_match represents sub-expression 0 - that is to say the whole match - then member matched - is always true, unless a partial - match was obtained as a result of the flag match_partial + is always true, unless a partial + match was obtained as a result of the flag match_partial being passed to a regular expression algorithm, in which case member matched is false, and members first and second represent the character range that formed the partial match.

-
-namespace boost{
+
namespace boost{
 
 template <class BidirectionalIterator>
 class sub_match;
@@ -329,58 +328,52 @@
 
 } // namespace boost
 
-

- +

+ Description -
-
- - Members
+
+ + Members +

-
-typedef typename std::iterator_traits<iterator>::value_type value_type;
+
typedef typename std::iterator_traits<iterator>::value_type value_type;
 

The type pointed to by the iterators.

-
-typedef typename std::iterator_traits<iterator>::difference_type difference_type;
+
typedef typename std::iterator_traits<iterator>::difference_type difference_type;
 

A type that represents the difference between two iterators.

-
-typedef BidirectionalIterator iterator;
+
typedef BidirectionalIterator iterator;
 

The iterator type.

-
-iterator first
+
iterator first
 

An iterator denoting the position of the start of the match.

-
-iterator second
+
iterator second
 

An iterator denoting the position of the end of the match.

-
-bool matched
+
bool matched
 

A Boolean value denoting whether this sub-expression participated in the @@ -388,88 +381,80 @@

-
-static difference_type length();
+
static difference_type length();
 

- Effects: returns the length of this matched - sub-expression, or 0 if this sub-expression was not matched: matched ? distance(first, second) : 0). + Effects: returns the length of this matched + sub-expression, or 0 if this sub-expression was not matched: matched ? distance(first, second) : 0).

-
-operator basic_string<value_type>()const;
+
operator basic_string<value_type>()const;
 

- Effects: converts *this into a string: returns (matched ? basic_string<value_type>(first, second) : basic_string<value_type>()). + Effects: converts *this into a string: returns (matched ? basic_string<value_type>(first, second) : basic_string<value_type>()).

-
-basic_string<value_type> str()const;
+
basic_string<value_type> str()const;
 

- Effects: returns a string representation - of *this: - (matched - ? basic_string<value_type>(first, second) : basic_string<value_type>()). + Effects: returns a string representation + of *this: + (matched + ? basic_string<value_type>(first, second) : basic_string<value_type>()).

-
-int compare(const sub_match& s)const;
+
int compare(const sub_match& s)const;
 

- Effects: performs a lexical comparison to - s: returns str().compare(s.str()). + Effects: performs a lexical comparison to + s: returns str().compare(s.str()).

-
-int compare(const basic_string<value_type>& s)const;
+
int compare(const basic_string<value_type>& s)const;
 

- Effects: compares *this to the string s: - returns str().compare(s). + Effects: compares *this to the string s: + returns str().compare(s).

-
-int compare(const value_type* s)const;
+
int compare(const value_type* s)const;
 

- Effects: compares *this to the null-terminated string s: - returns str().compare(s). + Effects: compares *this to the null-terminated string s: + returns str().compare(s).

-
-typedef implementation-private capture_sequence_type;
+
typedef implementation-private capture_sequence_type;
 

Defines an implementation-specific type that satisfies the requirements of a standard library Sequence (21.1.1 including the optional Table 68 operations), - whose value_type is a sub_match<BidirectionalIterator>. This type happens to be std::vector<sub_match<BidirectionalIterator> >, + whose value_type is a sub_match<BidirectionalIterator>. This type happens to be std::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 + Effects: returns a sequence containing all the captures obtained for this sub-expression.

- Preconditions: the library must be built + Preconditions: the library must be built and used with BOOST_REGEX_MATCH_EXTRA defined, and you must pass the flag - match_extra to the regex - matching functions ( regex_match, regex_search, regex_iterator or regex_token_iterator) in order for + match_extra to the regex + matching functions ( regex_match, regex_search, regex_iterator or regex_token_iterator) in order for this member #function to be defined and return useful information.

- Rationale: Enabling this feature has several + Rationale: Enabling this feature has several consequences:

    @@ -487,506 +472,463 @@ to take place.
-
- +
+ sub_match non-member operators -
+

-
-template <class BidirectionalIterator>
+
template <class BidirectionalIterator>
 bool operator == (const sub_match<BidirectionalIterator>& lhs,
                   const sub_match<BidirectionalIterator>& rhs);
 

- Effects: returns lhs.compare(rhs) - == 0. + Effects: returns lhs.compare(rhs) + == 0.

-
-template <class BidirectionalIterator>
+
template <class BidirectionalIterator>
 bool operator != (const sub_match<BidirectionalIterator>& lhs,
                   const sub_match<BidirectionalIterator>& rhs);
 

- Effects: returns lhs.compare(rhs) - != 0. + Effects: returns lhs.compare(rhs) + != 0.

-
-template <class BidirectionalIterator>
+
template <class BidirectionalIterator>
 bool operator < (const sub_match<BidirectionalIterator>& lhs,
                const sub_match<BidirectionalIterator>& rhs);
 

- Effects: returns lhs.compare(rhs) - < 0. + Effects: returns lhs.compare(rhs) + < 0.

-
-template <class BidirectionalIterator>
+
template <class BidirectionalIterator>
 bool operator <= (const sub_match<BidirectionalIterator>& lhs,
                   const sub_match<BidirectionalIterator>& rhs);
 

- Effects: returns lhs.compare(rhs) - <= 0. + Effects: returns lhs.compare(rhs) + <= 0.

-
-template <class BidirectionalIterator>
+
template <class BidirectionalIterator>
 bool operator >= (const sub_match<BidirectionalIterator>& lhs,
                   const sub_match<BidirectionalIterator>& rhs);
 

- Effects: returns lhs.compare(rhs) - >= 0. + Effects: returns lhs.compare(rhs) + >= 0.

-
-template <class BidirectionalIterator>
+
template <class BidirectionalIterator>
 bool operator > (const sub_match<BidirectionalIterator>& lhs,
                const sub_match<BidirectionalIterator>& rhs);
 

- Effects: returns lhs.compare(rhs) - > 0. + Effects: returns lhs.compare(rhs) + > 0.

-
-template <class BidirectionalIterator, class traits, class Allocator> 
+
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);
 

- Effects: returns lhs - == rhs.str(). + Effects: returns lhs + == rhs.str().

-
-template <class BidirectionalIterator, class traits, class Allocator> 
+
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);
 

- Effects: returns lhs - != rhs.str(). + Effects: returns lhs + != rhs.str().

-
-template <class BidirectionalIterator, class traits, class Allocator> 
+
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);
 

- Effects: returns lhs - < rhs.str(). + Effects: returns lhs + < rhs.str().

-
-template <class BidirectionalIterator, class traits, class Allocator> 
+
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);
 

- Effects: returns lhs - > rhs.str(). + Effects: returns lhs + > rhs.str().

-
-template <class BidirectionalIterator, class traits, class Allocator> 
+
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);
 

- Effects: returns lhs - >= rhs.str(). + Effects: returns lhs + >= rhs.str().

-
-template <class BidirectionalIterator, class traits, class Allocator> 
+
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);
 

- Effects: returns lhs - <= rhs.str(). + Effects: returns lhs + <= 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, 
                                           Allocator>& rhs);
 

- Effects: returns lhs.str() - == 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, 
                                           Allocator>& rhs);
 

- Effects: returns lhs.str() - != 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, 
                                        Allocator>& rhs);
 

- Effects: returns lhs.str() - < 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, 
                                          Allocator>& rhs);
 

- Effects: returns lhs.str() - > 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, 
                                           Allocator>& rhs);
 

- Effects: returns lhs.str() - >= 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, 
                                           Allocator>& rhs);
 

- Effects: returns lhs.str() - <= rhs. + Effects: returns lhs.str() + <= rhs.

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, 
                   const sub_match<BidirectionalIterator>& rhs); 
 

- Effects: returns lhs - == rhs.str(). + Effects: returns lhs + == rhs.str().

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, 
                   const sub_match<BidirectionalIterator>& rhs); 
 

- Effects: returns lhs - != rhs.str(). + Effects: returns lhs + != rhs.str().

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, 
                const sub_match<BidirectionalIterator>& rhs); 
 

- Effects: returns lhs - < rhs.str(). + Effects: returns lhs + < rhs.str().

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, 
                const sub_match<BidirectionalIterator>& rhs); 
 

- Effects: returns lhs - > rhs.str(). + Effects: returns lhs + > rhs.str().

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, 
                   const sub_match<BidirectionalIterator>& rhs); 
 

- Effects: returns lhs - >= rhs.str(). + Effects: returns lhs + >= rhs.str().

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs, 
                   const sub_match<BidirectionalIterator>& rhs); 
 

- Effects: returns lhs - <= rhs.str(). + Effects: returns lhs + <= rhs.str().

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator == (const sub_match<BidirectionalIterator>& lhs, 
                   typename iterator_traits<BidirectionalIterator>::value_type const* rhs); 
 

- Effects: returns lhs.str() - == rhs. + Effects: returns lhs.str() + == rhs.

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator != (const sub_match<BidirectionalIterator>& lhs, 
                   typename iterator_traits<BidirectionalIterator>::value_type const* rhs); 
 

- Effects: returns lhs.str() - != rhs. + Effects: returns lhs.str() + != rhs.

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator < (const sub_match<BidirectionalIterator>& lhs, 
                typename iterator_traits<BidirectionalIterator>::value_type const* rhs); 
 

- Effects: returns lhs.str() - < rhs. + Effects: returns lhs.str() + < rhs.

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator > (const sub_match<BidirectionalIterator>& lhs, 
                typename iterator_traits<BidirectionalIterator>::value_type const* rhs); 
 

- Effects: returns lhs.str() - > rhs. + Effects: returns lhs.str() + > rhs.

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator >= (const sub_match<BidirectionalIterator>& lhs, 
                   typename iterator_traits<BidirectionalIterator>::value_type const* rhs); 
 

- Effects: returns lhs.str() - >= rhs. + Effects: returns lhs.str() + >= rhs.

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator <= (const sub_match<BidirectionalIterator>& lhs, 
                   typename iterator_traits<BidirectionalIterator>::value_type const* rhs); 
 

- Effects: returns lhs.str() - <= rhs. + Effects: returns lhs.str() + <= rhs.

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, 
                   const sub_match<BidirectionalIterator>& rhs); 
 

- Effects: returns lhs - == rhs.str(). + Effects: returns lhs + == rhs.str().

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, 
                   const sub_match<BidirectionalIterator>& rhs); 
 

- Effects: returns lhs - != rhs.str(). + Effects: returns lhs + != rhs.str().

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, 
                const sub_match<BidirectionalIterator>& rhs); 
 

- Effects: returns lhs - < rhs.str(). + Effects: returns lhs + < rhs.str().

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, 
                const sub_match<BidirectionalIterator>& rhs); 
 

- Effects: returns lhs - > rhs.str(). + Effects: returns lhs + > rhs.str().

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, 
                   const sub_match<BidirectionalIterator>& rhs); 
 

- Effects: returns lhs - >= rhs.str(). + Effects: returns lhs + >= rhs.str().

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs, 
                   const sub_match<BidirectionalIterator>& rhs); 
 

- Effects: returns lhs - <= rhs.str(). + Effects: returns lhs + <= rhs.str().

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator == (const sub_match<BidirectionalIterator>& lhs, 
                   typename iterator_traits<BidirectionalIterator>::value_type const& rhs); 
 

- Effects: returns lhs.str() - == rhs. + Effects: returns lhs.str() + == rhs.

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator != (const sub_match<BidirectionalIterator>& lhs, 
                   typename iterator_traits<BidirectionalIterator>::value_type const& rhs); 
 

- Effects: returns lhs.str() - != rhs. + Effects: returns lhs.str() + != rhs.

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator < (const sub_match<BidirectionalIterator>& lhs, 
                typename iterator_traits<BidirectionalIterator>::value_type const& rhs); 
 

- Effects: returns lhs.str() - < rhs. + Effects: returns lhs.str() + < rhs.

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator > (const sub_match<BidirectionalIterator>& lhs, 
                typename iterator_traits<BidirectionalIterator>::value_type const& rhs); 
 

- Effects: returns lhs.str() - > rhs. + Effects: returns lhs.str() + > rhs.

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator >= (const sub_match<BidirectionalIterator>& lhs, 
                   typename iterator_traits<BidirectionalIterator>::value_type const& rhs); 
 

- Effects: returns lhs.str() - >= rhs. + Effects: returns lhs.str() + >= rhs.

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 bool operator <= (const sub_match<BidirectionalIterator>& lhs, 
                   typename iterator_traits<BidirectionalIterator>::value_type const& rhs); 
 

- Effects: returns lhs.str() - <= rhs. + Effects: returns lhs.str() + <= rhs.

- The addition operators for sub_match allow you to add a sub_match - to any type to which you can add a std::string + The addition operators for sub_match allow you to add a sub_match + to any type to which you can add a std::string and obtain a new string as the result.

-
-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 std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, 
                                        traits, 
@@ -994,13 +936,12 @@
                const sub_match<BidirectionalIterator>& m); 
 

- Effects: returns s - + m.str(). + 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, 
@@ -1008,91 +949,86 @@
                                        Allocator>& s); 
 

- Effects: returns m.str() - + s. + Effects: returns m.str() + + s.

-
-template <class BidirectionalIterator> 
+
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(). + Effects: returns s + + m.str().

-
-template <class BidirectionalIterator> 
+
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. + Effects: returns m.str() + + s.

-
-template <class BidirectionalIterator> 
+
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(). + Effects: returns s + + m.str().

-
-template <class BidirectionalIterator> 
+
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. + Effects: returns m.str() + + s.

-
-template <class BidirectionalIterator> 
+
template <class BidirectionalIterator> 
 std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> 
    operator + (const sub_match<BidirectionalIterator>& m1,
                const sub_match<BidirectionalIterator>& m2);
 

- Effects: returns m1.str() - + m2.str(). + Effects: returns m1.str() + + m2.str().

-
- +
+ Stream inserter -
+

-
-template <class charT, class traits, class BidirectionalIterator>
+
template <class charT, class traits, class BidirectionalIterator>
 basic_ostream<charT, traits>&
    operator << (basic_ostream<charT, traits>& os
                const sub_match<BidirectionalIterator>& m);
 

- Effects: returns (os << m.str()). + Effects: returns (os << m.str()).

- +

+

diff --git a/doc/html/boost_regex/ref/syntax_option_type.html b/doc/html/boost_regex/ref/syntax_option_type.html index 9a4e4ab1..1b85cd92 100644 --- a/doc/html/boost_regex/ref/syntax_option_type.html +++ b/doc/html/boost_regex/ref/syntax_option_type.html @@ -1,14 +1,13 @@ - syntax_option_type +syntax_option_type - + - - - + + + @@ -25,7 +24,8 @@
syntax_option_type Synopsis
@@ -43,10 +43,11 @@
- +

+

diff --git a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_basic.html b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_basic.html index 6a93eee2..ebf60a22 100644 --- a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_basic.html +++ b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_basic.html @@ -1,16 +1,13 @@ - - Options for POSIX Basic Regular Expressions +Options for POSIX Basic Regular Expressions - + - - - + + + @@ -27,9 +24,9 @@

Exactly one of the following must always be set for POSIX basic regular expressions: @@ -72,8 +69,7 @@

@@ -205,7 +199,7 @@

Specifies that when a regular expression is matched against a character container sequence, then no sub-expression matches are to be stored - in the supplied match_results structure. + in the supplied match_results structure.

@@ -243,9 +237,8 @@ @@ -265,7 +258,7 @@

Specifies that the \n character has the same effect as the alternation operator |. Allows newline separated lists to be used as a list - of alternatives. This bit is already set, if you use the grep option. + of alternatives. This bit is already set, if you use the grep option.

@@ -282,7 +275,7 @@ @@ -301,9 +294,8 @@ @@ -358,7 +350,7 @@ @@ -376,7 +368,7 @@ @@ -386,10 +378,11 @@

Specifies that the grammar recognized by the regular expression - engine is the same as that used by POSIX + engine is the same as that used by POSIX basic regular expressions in IEEE Std 1003.1-2001, Portable Operating System Interface (POSIX ), Base Definitions and Headers, Section 9, Regular Expressions (FWD.1). @@ -111,13 +107,12 @@

Specifies that the grammar recognized by the regular expression - engine is the same as that used by POSIX utility grep in IEEE Std 1003.1-2001, + engine is the same as that used by POSIX utility grep in IEEE Std 1003.1-2001, Portable Operating System Interface (POSIX ), Shells and Utilities, Section 4, Utilit\ies, grep (FWD.1).

- That is to say, the same as POSIX + That is to say, the same as POSIX basic syntax, but with the newline character acting as an alternation character; the expression is treated as a newline separated list of alternatives. @@ -137,8 +132,7 @@

- Specifies that the grammar recognised is the superset of the POSIX-Basic syntax + Specifies that the grammar recognised is the superset of the POSIX-Basic syntax used by the emacs program.

- Specifies that character ranges of the form [a-b] - should be locale sensitive. This bit is on by default for POSIX-Basic regular expressions, + Specifies that character ranges of the form [a-b] + should be locale sensitive. This bit is on by default for POSIX-Basic regular expressions, but can be unset to force ranges to be compared by code point only.

- When set then character classes such as [[:alnum:]] + When set then character classes such as [[:alnum:]] are not allowed.

When set this makes the escape character ordinary inside lists, - so that [\b] would match either '\' or 'b'. - This bit is on by default for POSIX-basic + so that [\b] would match either '\' or 'b'. + This bit is on by default for POSIX-basic regular expressions, but can be unset to force escapes to be recognised inside lists.

@@ -339,8 +331,8 @@

- When set then \? acts - as a zero-or-one repeat operator, and \+ + When set then \? acts + as a zero-or-one repeat operator, and \+ acts as a one-or-more repeat operator.

- When set then \| acts + When set then \| acts as the alternation operator.

- Prevents basic_regex from throwing + Prevents basic_regex from throwing an exception when an invalid expression is encountered.

- +

+

diff --git a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html index 9c11ca00..40b26c30 100644 --- a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html +++ b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html @@ -1,16 +1,13 @@ - - Options for POSIX Extended Regular Expressions +Options for POSIX Extended Regular Expressions - + - - - + + + @@ -27,12 +24,11 @@

- Exactly one of the following must always be set for POSIX + Exactly one of the following must always be set for POSIX extended regular expressions:

@@ -79,8 +75,7 @@ (FWD.1).

- Refer to the POSIX + Refer to the POSIX extended regular expression guide for more information.

@@ -111,8 +106,7 @@ grep (FWD.1).

- That is to say, the same as POSIX + That is to say, the same as POSIX extended syntax, but with the newline character acting as an alternation character in addition to "|".

@@ -137,8 +131,7 @@ and Utilities, Section 4, awk (FWD.1).

- That is to say: the same as POSIX + That is to say: the same as POSIX extended syntax, but with escape sequences in character classes permitted.

@@ -214,7 +207,7 @@

Specifies that when a regular expression is matched against a character container sequence, then no sub-expression matches are to be stored - in the supplied match_results structure. + in the supplied match_results structure.

@@ -252,7 +245,7 @@ @@ -340,10 +333,11 @@

- Specifies that character ranges of the form [a-b] + Specifies that character ranges of the form [a-b] should be locale sensitive. This bit is on by default for POSIX-Extended regular expressions, but can be unset to force ranges to be compared by code point only. @@ -292,7 +285,7 @@

When set this makes the escape character ordinary inside lists, - so that [\b] would match either '\' or 'b'. + so that [\b] would match either '\' or 'b'. This bit is on by default for POSIX-Extended regular expressions, but can be unset to force escapes to be recognised inside lists.

@@ -330,7 +323,7 @@

- Prevents basic_regex from throwing + Prevents basic_regex from throwing an exception when an invalid expression is encountered.

- +

+

diff --git a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_literal.html b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_literal.html index 7e1ad83c..33b0e5b9 100644 --- a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_literal.html +++ b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_literal.html @@ -1,15 +1,13 @@ - - Options for Literal Strings +Options for Literal Strings - + - - - + + + @@ -26,9 +24,9 @@

The following must always be set to interpret the expression as a string literal: @@ -145,10 +143,11 @@

- +

+

diff --git a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_overview.html b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_overview.html index e8d09cca..824e23a4 100644 --- a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_overview.html +++ b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_overview.html @@ -1,16 +1,13 @@ - - Overview of syntax_option_type +Overview of syntax_option_type - + - - - + + + @@ -27,38 +24,35 @@

- The type syntax_option_type is an implementation + The type syntax_option_type is an implementation specific bitmask type (see C++ standard 17.3.2.1.2). Setting its elements - has the effects listed in the table below, a valid value of type syntax_option_type - will always have exactly one of the elements normal, - basic, extended, - awk, grep, - egrep, sed, - literal or perl set. + has the effects listed in the table below, a valid value of type syntax_option_type + will always have exactly one of the elements normal, + basic, extended, + awk, grep, + egrep, sed, + literal or perl set.

Note that for convenience all the constants listed here are duplicated - within the scope of class template basic_regex, so you can use any + within the scope of class template basic_regex, so you can use any of:

-
-boost::regex_constants::constant_name
+
boost::regex_constants::constant_name
 

or

-
-boost::regex::constant_name
+
boost::regex::constant_name
 

or

-
-boost::wregex::constant_name
+
boost::wregex::constant_name
 

in an interchangeable manner. @@ -66,10 +60,11 @@

- +

+

diff --git a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html index 36fea83b..31a70ec9 100644 --- a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html +++ b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html @@ -1,16 +1,13 @@ - - Options for Perl Regular Expressions +Options for Perl Regular Expressions - + - - - + + + @@ -27,9 +24,9 @@

One of the following must always be set for perl regular expressions:

@@ -76,12 +73,11 @@ part 10, RegExp (Regular Expression) Objects (FWD.1).

- This is functionally identical to the Perl + This is functionally identical to the Perl regular expression syntax.

- Boost.Regex also recognizes all of the perl-compatible (?...) extensions in this mode. + Boost.Regex also recognizes all of the perl-compatible (?...) extensions in this mode.

@@ -215,7 +211,7 @@

Specifies that when a regular expression is matched against a character container sequence, then no sub-expression matches are to be stored - in the supplied match_results structure. + in the supplied match_results structure.

@@ -253,7 +249,7 @@ @@ -290,7 +286,7 @@ @@ -329,9 +325,9 @@ @@ -350,9 +346,9 @@ @@ -380,10 +376,11 @@

- Specifies that character ranges of the form [a-b] + Specifies that character ranges of the form [a-b] should be locale sensitive.

- Prevents basic_regex from throwing + Prevents basic_regex from throwing an exception when an invalid expression is encountered.

Normally whether Boost.Regex will match "." against a - newline character is determined by the match flag match_dot_not_newline. Specifying - this flag is equivalent to prefixing the expression with (?-s) and therefore causes "." - not to match a newline character regardless of whether match_not_dot_newline is set + newline character is determined by the match flag match_dot_not_newline. Specifying + this flag is equivalent to prefixing the expression with (?-s) and therefore causes "." + not to match a newline character regardless of whether match_not_dot_newline is set in the match flags.

Normally whether Boost.Regex will match "." against a - newline character is determined by the match flag match_dot_not_newline. Specifying - this flag is equivalent to prefixing the expression with (?s) and therefore causes "." - to match a newline character regardless of whether match_not_dot_newline is set + newline character is determined by the match flag match_dot_not_newline. Specifying + this flag is equivalent to prefixing the expression with (?s) and therefore causes "." + to match a newline character regardless of whether match_not_dot_newline is set in the match flags.

- +

+

diff --git a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_synopsis.html b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_synopsis.html index 40e6d61f..099bab6f 100644 --- a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_synopsis.html +++ b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_synopsis.html @@ -1,15 +1,13 @@ - - syntax_option_type Synopsis +syntax_option_type Synopsis - + - - - + + + @@ -26,18 +24,17 @@

- Type syntax_option_type + Type syntax_option_type is an implementation specific bitmask type that controls how a regular expression string is to be interpreted. For convenience note that all the constants listed here, are also duplicated within the scope of class template - basic_regex. + basic_regex.

-
-namespace std{ namespace regex_constants{
+
namespace std{ namespace regex_constants{
 
 typedef implementation-specific-bitmask-type syntax_option_type;
 
@@ -65,10 +62,11 @@
 
 
- +

+

diff --git a/doc/html/boost_regex/syntax.html b/doc/html/boost_regex/syntax.html index df1cc1bc..14a2b9bc 100644 --- a/doc/html/boost_regex/syntax.html +++ b/doc/html/boost_regex/syntax.html @@ -1,14 +1,13 @@ - Regular Expression Syntax +Regular Expression Syntax - + - - + + @@ -25,7 +24,8 @@
Perl Regular Expression Syntax
@@ -63,18 +63,15 @@

@@ -82,25 +79,14 @@ You can also construct a regular expression that treats every character as a literal, but that's not really a "syntax"!

-

-

-

-

-

-

-

-

-

-

-

-

- +

+

diff --git a/doc/html/boost_regex/syntax/basic_extended.html b/doc/html/boost_regex/syntax/basic_extended.html index ba068602..e5287248 100644 --- a/doc/html/boost_regex/syntax/basic_extended.html +++ b/doc/html/boost_regex/syntax/basic_extended.html @@ -1,16 +1,13 @@ - POSIX Extended Regular - Expression Syntax +POSIX Extended Regular Expression Syntax - + - - - + + + @@ -27,60 +24,59 @@ +

+ Synopsis -

+

The POSIX-Extended regular expression syntax is supported by the POSIX C - regular expression API's, and variations are used by the utilities egrep and awk. + regular expression API's, and variations are used by the utilities egrep and awk. You can construct POSIX extended regular expressions in Boost.Regex by passing - the flag extended to the + the flag extended to the regex constructor, for example:

-
-// e1 is a case sensitive POSIX-Extended expression:
+
// e1 is a case sensitive POSIX-Extended expression:
 boost::regex e1(my_expression, boost::regex::extended);
 // e2 a case insensitive POSIX-Extended expression:
 boost::regex e2(my_expression, boost::regex::extended|boost::regex::icase);
 

-

- +

+ POSIX Extended Syntax -

+

In POSIX-Extended regular expressions, all characters match themselves except for the following special characters:

.[{()\*+?|^$
-

- +

+ Wildcard: -
+

The single character '.' when used outside of a character set will match any single character except:

  • - The NULL character when the flag match_no_dot_null + The NULL character when the flag match_no_dot_null is passed to the matching algorithms.
  • - The newline character when the flag match_not_dot_newline + The newline character when the flag match_not_dot_newline is passed to the matching algorithms.
-

- +

+ Anchors: -
+

A '^' character shall match the start of a line when used as the first character of an expression, or the first character of a sub-expression. @@ -89,39 +85,39 @@ 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 sub-expressions: -
+

- A section beginning ( and ending - ) acts as a marked sub-expression. + A section beginning ( and ending + ) acts as a marked sub-expression. Whatever matched the sub-expression is split out in a separate field by the matching algorithms. Marked sub-expressions can also repeated, or referred to by a back-reference.

-

- +

+ Repeats: -
+

Any atom (a single character, a marked sub-expression, or a character class) - can be repeated with the *, - +, ?, - and {} operators. + can be repeated with the *, + +, ?, + and {} operators.

- The * operator will match the + The * operator will match the preceding atom zero or more times, for example the expression - a*b will match any of the following: + a*b will match any of the following:

b
 ab
 aaaaaaaab
 

- The + operator will match the + The + operator will match the preceding atom one or more times, for example the expression a+b will match any of the following:

@@ -134,9 +130,9 @@ aaaaaaaab
b
 

- The ? operator will match the + The ? operator will match the preceding atom zero or one times, for example the expression - ca?b will match any of the following: + ca?b will match any of the following:

cb
 cab
@@ -150,15 +146,15 @@ cab
         An atom can also be repeated with a bounded repeat:
       

- a{n} Matches + a{n} Matches 'a' repeated exactly n times.

- a{n,} Matches + a{n,} Matches 'a' repeated n or more times.

- a{n, m} Matches 'a' repeated between n + a{n, m} Matches 'a' repeated between n and m times inclusive.

@@ -168,32 +164,29 @@ cab

Will match either of:

-
-aa
+
aa
 aaa
 

But neither of:

-
-a
+
a
 aaaa
 

It is an error to use a repeat operator, if the preceding construct can not be repeated, for example:

-
-a(*)
+
a(*)
 

- Will raise an error, as there is nothing for the * + Will raise an error, as there is nothing for the * operator to be applied to.

-

- +

+ Back references: -
+

An escape character followed by a digit n, where n is in the range 1-9, matches the same string that was matched by sub-expression @@ -203,43 +196,41 @@ cab

Will match the string:

-
-aaabbaaa
+
aaabbaaa
 

But not the string:

-
-aaabba
+
aaabba
 
-
[Caution] Caution

+

The POSIX standard does not support back-references for "extended" regular expressions, this is a compatible extension to that standard.

-

- +

+ Alternation -
+

- The | operator will match either - of its arguments, so for example: abc|def will + The | operator will match either + of its arguments, so for example: abc|def will match either "abc" or "def".

- Parenthesis can be used to group alternations, for example: ab(d|ef) + Parenthesis can be used to group alternations, for example: ab(d|ef) will match either of "abd" or "abef".

-

- +

+ Character sets: -
+

A character set is a bracket-expression starting with [ and ending with ], it defines a set of characters, and matches any single character that is @@ -248,109 +239,107 @@ cab

A bracket expression may contain any combination of the following:

-
- +
+ Single characters: -
+

- For example [abc], will match any of the characters 'a', 'b', + For example [abc], will match any of the characters 'a', 'b', or 'c'.

-
- +
+ Character ranges: -
+

- For example [a-c] + For example [a-c] will match any single character in the range 'a' to 'c'. By default, for POSIX-Extended regular expressions, a character x is within the range y to z, if it collates within that range; this results in locale specific behavior . This - behavior can be turned off by unsetting the collate - option flag - in + behavior can be turned off by unsetting the collate + option flag - in which case whether a character appears within a range is determined by comparing the code points of the characters only.

-
- +
+ 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 - range a-c. + complement of the characters it contains, for example [^a-c] matches any character that is not in the + range a-c.

-
- +
+ Character classes: -
+

- An expression of the form [[:name:]] - matches the named character class "name", for example [[:lower:]] matches any lower case character. See - character class names. + An expression of the form [[:name:]] + matches the named character class "name", for example [[:lower:]] matches any lower case character. See + character class names.

-
- +
+ Collating Elements: -
+

- An expression of the form [[.col.] matches + An expression of the form [[.col.] matches the collating element col. A collating element is any single character, or any sequence of characters that collates as a single unit. Collating elements may also be used as the end point of a range, for - example: [[.ae.]-c] + example: [[.ae.]-c] matches the character sequence "ae", plus any single character in the range "ae"-c, assuming that "ae" is treated as a single collating element in the current locale.

Collating elements may be used in place of escapes (which are not normally - allowed inside character sets), for example [[.^.]abc] would + allowed inside character sets), for example [[.^.]abc] would match either one of the characters 'abc^'.

- As an extension, a collating element may also be specified via its symbolic name, for example: + As an extension, a collating element may also be specified via its symbolic name, for example:

-
-[[.NUL.]]
+
[[.NUL.]]
 

matches a NUL character.

-
- +
+ Equivalence classes: -
+

- An expression of the form [[=col=]], + An expression of the form [[=col=]], matches any character or collating element whose primary sort key is the same as that for collating element col, as with colating - elements the name col may be a symbolic + elements the name col may be a symbolic name. A primary sort key is one that ignores case, accentation, or - locale-specific tailorings; so for example [[=a=]] matches + locale-specific tailorings; so for example [[=a=]] matches any of the characters: a, À, Á, Â, Ã, Ä, Å, A, à, á, â, ã, ä and å. Unfortunately implementation of this is reliant on the platform's collation and localisation support; this feature can not be relied upon to work portably across all platforms, or even all locales on one platform.

-
- +
+ Combinations: -
+

All of the above can be combined in one character set declaration, for example: - [[:digit:]a-c[.NUL.]]. + [[:digit:]a-c[.NUL.]].

-

- +

+ Escapes -
+

The POSIX standard defines no escape sequences for POSIX-Extended regular expressions, except that: @@ -365,7 +354,7 @@ cab

  • An escape inside a character class declaration shall match itself: in other words the escape character is not "special" inside a character - class declaration; so [\^] + class declaration; so [\^] will match either a literal '\' or a '^'.
  • @@ -373,11 +362,11 @@ cab However, that's rather restrictive, so the following standard-compatible extensions are also supported by Boost.Regex:

    -
    - +
    + Escapes matching a specific character -
    +

    The following escape sequences are all synonyms for single characters:

    @@ -556,17 +545,17 @@ cab

    Matches the single character which has the symbolic name name. For - example \\N{newline} matches the single character \n. + example \\N{newline} matches the single character \n.

    -
    - +
    + "Single character" character classes: -
    +

    Any escaped character x, if x is the name of a character class shall match any character that is a member @@ -597,130 +586,130 @@ cab

    - \d + \d

    - [[:digit:]] + [[:digit:]]

    - \l + \l

    - [[:lower:]] + [[:lower:]]

    - \s + \s

    - [[:space:]] + [[:space:]]

    - \u + \u

    - [[:upper:]] + [[:upper:]]

    - \w + \w

    - [[:word:]] + [[:word:]]

    - \D + \D

    - [^[:digit:]] + [^[:digit:]]

    - \L + \L

    - [^[:lower:]] + [^[:lower:]]

    - \S + \S

    - [^[:space:]] + [^[:space:]]

    - \U + \U

    - [^[:upper:]] + [^[:upper:]]

    - \W + \W

    - [^[:word:]] + [^[:word:]]

    -
    - +
    + Character Properties -
    +

    The character property names in the following table are all equivalent to the names used in character classes. @@ -752,7 +741,7 @@ cab

    - \pX + \pX

    @@ -762,14 +751,14 @@ cab

    - [[:X:]] + [[:X:]]

    - \p{Name} + \p{Name}

    @@ -779,14 +768,14 @@ cab

    - [[:Name:]] + [[:Name:]]

    - \PX + \PX

    @@ -796,14 +785,14 @@ cab

    - [^[:X:]] + [^[:X:]]

    - \P{Name} + \P{Name}

    @@ -813,20 +802,20 @@ cab

    - [^[:Name:]] + [^[:Name:]]

    - For example \pd - matches any "digit" character, as does \p{digit}. + For example \pd + matches any "digit" character, as does \p{digit}.

    -
    - +
    + Word Boundaries -
    +

    The following escape sequences match the boundaries of words:

    @@ -851,7 +840,7 @@ cab

    - \< + \<

    @@ -863,7 +852,7 @@ cab

    - \> + \>

    @@ -875,7 +864,7 @@ cab

    - \b + \b

    @@ -887,7 +876,7 @@ cab

    - \B + \B

    @@ -898,11 +887,11 @@ cab
    -
    - +
    + Buffer boundaries -
    +

    The following match only at buffer boundaries: a "buffer" in this context is the whole of the input text that is being matched against (note @@ -953,7 +942,7 @@ cab

    - \A + \A

    @@ -965,7 +954,7 @@ cab

    - \z + \z

    @@ -977,50 +966,49 @@ cab

    - \Z + \Z

    Matches an optional sequence of newlines at the end of a buffer: - equivalent to the regular expression \n*\z + equivalent to the regular expression \n*\z

    -
    - +
    + Continuation Escape -
    +

    - The sequence \G + The sequence \G matches only at the end of the last match found, or at the start of the text being matched if no previous match was found. This escape useful if you're iterating over the matches contained within a text, and you want each subsequence match to start where the last one ended.

    -
    - +
    + Quoting escape -
    +

    - The escape sequence \Q + The escape sequence \Q begins a "quoted sequence": all the subsequent characters are treated - as literals, until either the end of the regular expression or \E is found. - For example the expression: \Q\*+\Ea+ would match either of: + as literals, until either the end of the regular expression or \E is found. + For example the expression: \Q\*+\Ea+ would match either of:

    -
    -\*+a
    +
    \*+a
     \*+aaa
     
    -
    - +
    + Unicode escapes -
    +
    @@ -1042,7 +1030,7 @@ cab

    - \C + \C

    @@ -1055,7 +1043,7 @@ cab

    - \X + \X

    @@ -1067,40 +1055,40 @@ cab
    -
    - +
    + Any other escape -
    +

    Any other escape sequence matches the character that is escaped, for example \@ matches a literal '@'.

    -

    - +

    + Operator precedence -
    +

    The order of precedence for of operators is as follows:

    1. - Collation-related bracket symbols [==] - [::] [..] + Collation-related bracket symbols [==] + [::] [..]
    2. - Escaped characters \ + Escaped characters \
    3. - Character set (bracket expression) [] + Character set (bracket expression) []
    4. - Grouping () + Grouping ()
    5. - Single-character-ERE duplication * - + ? {m,n} + Single-character-ERE duplication * + + ? {m,n}
    6. Concatenation @@ -1109,50 +1097,48 @@ cab Anchoring ^$
    7. - Alternation | + Alternation |
    -

    - +

    + What Gets Matched -
    +

    When there is more that one way to match a regular expression, the "best" - possible match is obtained using the leftmost-longest + possible match is obtained using the leftmost-longest rule.

    -

    - +

    + Variations -

    -

    - - Egrep

    +
    + + Egrep +

    - When an expression is compiled with the flag - egrep set, then the + When an expression is compiled with the flag + egrep set, then the expression is treated as a newline separated list of POSIX-Extended expressions, a match is found if any of the expressions in the list match, for example:

    -
    -boost::regex e("abc\ndef", boost::regex::egrep);
    +
    boost::regex e("abc\ndef", boost::regex::egrep);
     

    will match either of the POSIX-Basic expressions "abc" or "def".

    As its name suggests, this behavior is consistent with the Unix utility - egrep, and with grep when + egrep, and with grep when used with the -E option.

    -

    - +

    + awk -
    +

    In addition to the POSIX-Extended features the escape character is special inside a character class @@ -1163,26 +1149,23 @@ cab specification are required to be supported - however Boost.Regex supports these by default anyway.

    -

    - +

    + Options -

    +

    - There are a variety - of flags that may be combined with the extended - and egrep options when constructing - the regular expression, in particular note that the newline_alt option alters the syntax, - while the collate, nosubs - and icase options + There are a variety + of flags that may be combined with the extended + and egrep options when constructing + the regular expression, in particular note that the newline_alt option alters the syntax, + while the collate, nosubs + and icase options modify how the case and locale sensitivity are to be applied.

    -

    - +

    + References -

    +

    IEEE Std 1003.1-2001, Portable Operating System Interface (POSIX ), Base Definitions @@ -1201,10 +1184,11 @@ cab

    - +

    +

    diff --git a/doc/html/boost_regex/syntax/basic_syntax.html b/doc/html/boost_regex/syntax/basic_syntax.html index 2e1fbf33..d1a0af81 100644 --- a/doc/html/boost_regex/syntax/basic_syntax.html +++ b/doc/html/boost_regex/syntax/basic_syntax.html @@ -1,16 +1,13 @@ - POSIX Basic Regular - Expression Syntax +POSIX Basic Regular Expression Syntax - + - - - + + + @@ -27,59 +24,58 @@ +

    + Synopsis -

    +

    - The POSIX-Basic regular expression syntax is used by the Unix utility sed, and variations are used by grep and emacs. + The POSIX-Basic regular expression syntax is used by the Unix utility sed, and variations are used by grep and emacs. You can construct POSIX basic regular expressions in Boost.Regex by passing - the flag basic to the regex - constructor (see syntax_option_type), for example: + the flag basic to the regex + constructor (see syntax_option_type), for example:

    -
    -// e1 is a case sensitive POSIX-Basic expression:
    +
    // e1 is a case sensitive POSIX-Basic expression:
     boost::regex e1(my_expression, boost::regex::basic);
     // e2 a case insensitive POSIX-Basic expression:
     boost::regex e2(my_expression, boost::regex::basic|boost::regex::icase);
     

    -

    - +

    + POSIX Basic Syntax -

    +

    In POSIX-Basic regular expressions, all characters are match themselves except for the following special characters:

    .[\*^$
    -

    - +

    + Wildcard: -
    +

    The single character '.' when used outside of a character set will match any single character except:

    • - The NULL character when the flag match_no_dot_null + The NULL character when the flag match_no_dot_null is passed to the matching algorithms.
    • - The newline character when the flag match_not_dot_newline + The newline character when the flag match_not_dot_newline is passed to the matching algorithms.
    -

    - +

    + Anchors: -
    +

    A '^' character shall match the start of a line when used as the first character of an expression, or the first character of a sub-expression. @@ -88,30 +84,30 @@ 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 sub-expressions: -
    +

    - A section beginning \( and ending - \) acts as a marked sub-expression. + A section beginning \( and ending + \) acts as a marked sub-expression. Whatever matched the sub-expression is split out in a separate field by the matching algorithms. Marked sub-expressions can also repeated, or referred-to by a back-reference.

    -

    - +

    + Repeats: -
    +

    Any atom (a single character, a marked sub-expression, or a character class) can be repeated with the * operator.

    - For example a* + For example a* will match any number of letter a's repeated zero or more times (an atom - repeated zero times matches an empty string), so the expression a*b + repeated zero times matches an empty string), so the expression a*b will match any of the following:

    b
    @@ -122,15 +118,15 @@ aaaaaaaab
             An atom can also be repeated with a bounded repeat:
           

    - a\{n\} Matches + a\{n\} Matches 'a' repeated exactly n times.

    - a\{n,\} Matches + a\{n,\} Matches 'a' repeated n or more times.

    - a\{n, m\} Matches 'a' repeated between n and m times + a\{n, m\} Matches 'a' repeated between n and m times inclusive.

    @@ -158,10 +154,10 @@ aaaa Will raise an error, as there is nothing for the * operator to be applied to.

    -

    - +

    + Back references: -
    +

    An escape character followed by a digit n, where n is in the range 1-9, matches the same string that was matched by sub-expression @@ -176,11 +172,11 @@ aaaa But not the string:

    aaabba
    -

    - +

    + Character sets: -
    +

    A character set is a bracket-expression starting with [ and ending with ], it defines a set of characters, and matches any single character that is @@ -189,69 +185,68 @@ aaaa

    A bracket expression may contain any combination of the following:

    -
    - +
    + Single characters: -
    +

    - For example [abc], will match any of the characters 'a', 'b', + For example [abc], will match any of the characters 'a', 'b', or 'c'.

    -
    - +
    + Character ranges: -
    +

    - For example [a-c] + For example [a-c] will match any single character in the range 'a' to 'c'. By default, for POSIX-Basic regular expressions, a character x is within the range y to z, if it collates within that range; this results in locale specific behavior. This behavior - can be turned off by unsetting the collate + can be turned off by unsetting the collate option flag when constructing the regular expression - in which case whether a character appears within a range is determined by comparing the code points of the characters only.

    -
    - +
    + 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 + complement of the characters it contains, for example [^a-c] matches any character that is not in the range a-c.

    -
    - +
    + Character classes: -
    +

    - An expression of the form [[:name:]] - matches the named character class "name", for example [[:lower:]] matches any lower case character. See - character class names. + An expression of the form [[:name:]] + matches the named character class "name", for example [[:lower:]] matches any lower case character. See + character class names.

    -
    - +
    + Collating Elements: -
    +

    - An expression of the form [[.col.] matches + An expression of the form [[.col.] matches the collating element col. A collating element is any single character, or any sequence of characters that collates as a single unit. Collating elements may also be used as the end point of a range, for - example: [[.ae.]-c] + example: [[.ae.]-c] matches the character sequence "ae", plus any single character in the rangle "ae"-c, assuming that "ae" is treated as a single collating element in the current locale.

    Collating elements may be used in place of escapes (which are not normally - allowed inside character sets), for example [[.^.]abc] would + allowed inside character sets), for example [[.^.]abc] would match either one of the characters 'abc^'.

    @@ -260,38 +255,38 @@ aaaa

    [[.NUL.]]

    - matches a 'NUL' character. See collating + matches a 'NUL' character. See collating element names.

    -
    - +
    + Equivalence classes: -
    +

    - An expression of theform [[=col=]], + An expression of theform [[=col=]], matches any character or collating element whose primary sort key is the same as that for collating element col, as with collating - elements the name col may be a collating + elements the name col may be a collating symbolic name. A primary sort key is one that ignores case, accentation, - or locale-specific tailorings; so for example [[=a=]] matches + or locale-specific tailorings; so for example [[=a=]] matches any of the characters: a, À, Á, Â, Ã, Ä, Å, A, à, á, â, ã, ä and å. Unfortunately implementation of this is reliant on the platform's collation and localisation support; this feature can not be relied upon to work portably across all platforms, or even all locales on one platform.

    -
    - +
    + Combinations: -
    +

    All of the above can be combined in one character set declaration, for example: - [[:digit:]a-c[.NUL.]]. + [[:digit:]a-c[.NUL.]].

    -

    - +

    + Escapes -
    +

    With the exception of the escape sequences \{, \}, \(, and \), which are documented above, an escape followed by any character matches that character. @@ -300,37 +295,35 @@ aaaa

    .[\*^$

    "ordinary". Note that the escape character loses its special meaning - inside a character set, so [\^] + inside a character set, so [\^] will match either a literal '\' or a '^'.

    -

    - +

    + What Gets Matched -

    -

    - When there is more that one way to match a regular expression, the "best" - possible match is obtained using the leftmost-longest - rule. -

    -

    - - Variations -

    -

    -

    -

    - - Grep

    - When an expression is compiled with the flag grep + When there is more that one way to match a regular expression, the "best" + possible match is obtained using the leftmost-longest + rule. +

    +

    + + Variations +

    +

    +

    +
    + + Grep +
    +

    + When an expression is compiled with the flag grep set, then the expression is treated as a newline separated list of POSIX-Basic expressions, a match is found if any of the expressions in the list match, for example:

    -
    -boost::regex e("abc\ndef", boost::regex::grep);
    +
    boost::regex e("abc\ndef", boost::regex::grep);
     

    will match either of the POSIX-Basic @@ -339,10 +332,10 @@ aaaa

    As its name suggests, this behavior is consistent with the Unix utility grep.

    -

    - +

    + emacs -
    +

    In addition to the POSIX-Basic features the following characters are also special: @@ -616,31 +609,27 @@ aaaa according to the Perl "depth first search" rules. Emacs expressions are matched this way because they contain Perl-like extensions, that do not interact - well with the POSIX-style + well with the POSIX-style leftmost-longest rule.

    -

    - +

    + Options -

    +

    - There are a variety - of flags that may be combined with the basic - and grep options when constructing - the regular expression, in particular note that the newline_alt, no_char_classes, - no-intervals, bk_plus_qm - and bk_plus_vbar options - all alter the syntax, while the collate and icase + There are a variety + of flags that may be combined with the basic + and grep options when constructing + the regular expression, in particular note that the newline_alt, no_char_classes, + no-intervals, bk_plus_qm + and bk_plus_vbar options + all alter the syntax, while the collate and icase options modify how the case and locale sensitivity are to be applied.

    -

    - +

    + References -

    +

    IEEE Std 1003.1-2001, Portable Operating System Interface (POSIX ), Base Definitions @@ -657,10 +646,11 @@ aaaa

    - +

    +

    diff --git a/doc/html/boost_regex/syntax/character_classes.html b/doc/html/boost_regex/syntax/character_classes.html index 12d9356e..8a88baf5 100644 --- a/doc/html/boost_regex/syntax/character_classes.html +++ b/doc/html/boost_regex/syntax/character_classes.html @@ -1,16 +1,13 @@ - Character Class - Names +Character Class Names - + - - - + + + @@ -27,9 +24,9 @@
    - +

    +

    diff --git a/doc/html/boost_regex/syntax/character_classes/optional_char_class_names.html b/doc/html/boost_regex/syntax/character_classes/optional_char_class_names.html index 631ddf24..f9ca8d6e 100644 --- a/doc/html/boost_regex/syntax/character_classes/optional_char_class_names.html +++ b/doc/html/boost_regex/syntax/character_classes/optional_char_class_names.html @@ -1,16 +1,13 @@ - - Character classes that are supported by Unicode Regular Expressions +Character classes that are supported by Unicode Regular Expressions - + - - - + + + @@ -27,12 +24,12 @@

    The following character classes are only supported by Unicode Regular Expressions: - that is those that use the u32regex + that is those that use the u32regex type. The names used are the same as those from Chapter 4 of the Unicode standard.

    @@ -536,10 +533,11 @@
    - +

    +

    diff --git a/doc/html/boost_regex/syntax/character_classes/std_char_clases.html b/doc/html/boost_regex/syntax/character_classes/std_char_clases.html index 4a6bbd08..1d1f612e 100644 --- a/doc/html/boost_regex/syntax/character_classes/std_char_clases.html +++ b/doc/html/boost_regex/syntax/character_classes/std_char_clases.html @@ -1,17 +1,13 @@ - - Character Classes that are Always Supported +Character Classes that are Always Supported - + - - - + + + @@ -28,9 +24,9 @@

    The following character class names are always supported by Boost.Regex:

    @@ -386,10 +382,11 @@
    - +

    +

    diff --git a/doc/html/boost_regex/syntax/collating_names.html b/doc/html/boost_regex/syntax/collating_names.html index 991967a1..6fc589cd 100644 --- a/doc/html/boost_regex/syntax/collating_names.html +++ b/doc/html/boost_regex/syntax/collating_names.html @@ -1,14 +1,13 @@ - Collating Names +Collating Names - + - - - + + + @@ -25,7 +24,8 @@
    - +

    +

    diff --git a/doc/html/boost_regex/syntax/collating_names/digraphs.html b/doc/html/boost_regex/syntax/collating_names/digraphs.html index de77c8cc..55b9ee20 100644 --- a/doc/html/boost_regex/syntax/collating_names/digraphs.html +++ b/doc/html/boost_regex/syntax/collating_names/digraphs.html @@ -1,14 +1,13 @@ - Digraphs +Digraphs - + - - - + + + @@ -25,7 +24,8 @@

    The following are treated as valid digraphs when used as a collating name:

    @@ -47,10 +47,11 @@
    - +

    +

    diff --git a/doc/html/boost_regex/syntax/collating_names/named_unicode.html b/doc/html/boost_regex/syntax/collating_names/named_unicode.html index 4d8e0ca4..2fbedb55 100644 --- a/doc/html/boost_regex/syntax/collating_names/named_unicode.html +++ b/doc/html/boost_regex/syntax/collating_names/named_unicode.html @@ -1,16 +1,13 @@ - - Named Unicode Characters +Named Unicode Characters - + - - - + + + @@ -27,12 +24,12 @@

    - When using Unicode aware regular expressions - (with the u32regex type), + When using Unicode aware regular expressions + (with the u32regex type), all the normal symbolic names for Unicode characters (those given in Unidata.txt) are recognised. So for example:

    @@ -43,10 +40,11 @@
    - +

    +

    diff --git a/doc/html/boost_regex/syntax/collating_names/posix_symbolic_names.html b/doc/html/boost_regex/syntax/collating_names/posix_symbolic_names.html index 91f5931b..fddfa5ac 100644 --- a/doc/html/boost_regex/syntax/collating_names/posix_symbolic_names.html +++ b/doc/html/boost_regex/syntax/collating_names/posix_symbolic_names.html @@ -1,15 +1,13 @@ - - POSIX Symbolic Names +POSIX Symbolic Names - + - - - + + + @@ -26,9 +24,9 @@

    The following symbolic names are recognised as valid collating element names, in addition to any single character, this allows you to write for @@ -973,10 +971,11 @@

    - +

    +

    diff --git a/doc/html/boost_regex/syntax/leftmost_longest_rule.html b/doc/html/boost_regex/syntax/leftmost_longest_rule.html index 27d5a838..f64d70c0 100644 --- a/doc/html/boost_regex/syntax/leftmost_longest_rule.html +++ b/doc/html/boost_regex/syntax/leftmost_longest_rule.html @@ -1,15 +1,13 @@ - The Leftmost - Longest Rule +The Leftmost Longest Rule - + - - - + + + @@ -26,9 +24,9 @@

    Often there is more than one way of matching a regular expression at a particular location, for POSIX basic and extended regular expressions, the "best" @@ -67,10 +65,11 @@

    - +

    +

    diff --git a/doc/html/boost_regex/syntax/perl_syntax.html b/doc/html/boost_regex/syntax/perl_syntax.html index dc98edba..1de10b79 100644 --- a/doc/html/boost_regex/syntax/perl_syntax.html +++ b/doc/html/boost_regex/syntax/perl_syntax.html @@ -1,15 +1,13 @@ - Perl Regular Expression - Syntax +Perl Regular Expression Syntax - + - - - + + + @@ -26,156 +24,150 @@ +

    + Synopsis -

    +

    The Perl regular expression syntax is based on that used by the programming language Perl . Perl regular expressions are the default behavior in Boost.Regex - or you can pass the flag perl - to the basic_regex + or you can pass the flag perl + to the basic_regex constructor, for example:

    -
    -// e1 is a case sensitive Perl regular expression: 
    +
    // e1 is a case sensitive Perl regular expression: 
     // since Perl is the default option there's no need to explicitly specify the syntax used here:
     boost::regex e1(my_expression);
     // e2 a case insensitive Perl regular expression:
     boost::regex e2(my_expression, boost::regex::perl|boost::regex::icase);
     
    -

    - +

    + Perl Regular Expression Syntax -

    +

    In Perl regular expressions, all characters match themselves except for the following special characters:

    .[{()\*+?|^$
    -

    - +

    + Wildcard -
    +

    The single character '.' when used outside of a character set will match any single character except:

    -

    - +

    + Anchors -
    +

    A '^' character shall match the start of a line.

    A '$' character shall match the end of a line.

    -

    - +

    + Marked sub-expressions -
    +

    - A section beginning ( and ending - ) acts as a marked sub-expression. + A section beginning ( and ending + ) acts as a marked sub-expression. Whatever matched the sub-expression is split out in a separate field by the matching algorithms. Marked sub-expressions can also repeated, or referred to by a back-reference.

    -

    - +

    + Non-marking grouping -
    +

    A marked sub-expression is useful to lexically group part of a regular expression, but has the side-effect of spitting out an extra field in the result. As an alternative you can lexically group part of a regular expression, without - generating a marked sub-expression by using (?: - and ) , for example (?:ab)+ - will repeat ab without splitting + generating a marked sub-expression by using (?: + and ) , for example (?:ab)+ + will repeat ab without splitting out any separate sub-expressions.

    -

    - +

    + Repeats -
    +

    Any atom (a single character, a marked sub-expression, or a character class) - can be repeated with the *, - +, ?, - and {} operators. + can be repeated with the *, + +, ?, + and {} operators.

    - The * operator will match the - preceding atom zero or more times, for example the expression a*b + The * operator will match the + preceding atom zero or more times, for example the expression a*b will match any of the following:

    -
    -b
    +
    b
     ab
     aaaaaaaab
     

    - The + operator will match the - preceding atom one or more times, for example the expression a+b + The + operator will match the + preceding atom one or more times, for example the expression a+b will match any of the following:

    -
    -ab
    +
    ab
     aaaaaaaab
     

    But will not match:

    -
    -b
    +
    b
     

    - The ? operator will match the + The ? operator will match the preceding atom zero or one times, for example the expression ca?b will match any of the following:

    -
    -cb
    +
    cb
     cab
     

    But will not match:

    -
    -caab
    +
    caab
     

    An atom can also be repeated with a bounded repeat:

    - a{n} Matches + a{n} Matches 'a' repeated exactly n times.

    - a{n,} Matches + a{n,} Matches 'a' repeated n or more times.

    - a{n, m} Matches 'a' repeated between n and m times + a{n, m} Matches 'a' repeated between n and m times inclusive.

    @@ -185,63 +177,60 @@

    Will match either of:

    -
    -aa
    +
    aa
     aaa
     

    But neither of:

    -
    -a
    +
    a
     aaaa
     

    It is an error to use a repeat operator, if the preceding construct can not be repeated, for example:

    -
    -a(*)
    +
    a(*)
     

    - Will raise an error, as there is nothing for the * + Will raise an error, as there is nothing for the * operator to be applied to.

    -

    - +

    + Non greedy repeats -
    +

    The normal repeat operators are "greedy", that is to say they will consume as much input as possible. There are non-greedy versions available that will consume as little input as possible while still producing a match.

    - *? Matches the previous atom + *? Matches the previous atom zero or more times, while consuming as little input as possible.

    - +? Matches the previous atom + +? Matches the previous atom one or more times, while consuming as little input as possible.

    - ?? Matches the previous atom + ?? Matches the previous atom zero or one times, while consuming as little input as possible.

    - {n,}? Matches the previous atom n or more times, + {n,}? Matches the previous atom n or more times, while consuming as little input as possible.

    - {n,m}? + {n,m}? Matches the previous atom between n and m times, while consuming as little input as possible.

    -

    - +

    + Back references -
    +

    An escape character followed by a digit n, where n is in the range 1-9, matches the same string that was matched by sub-expression @@ -251,165 +240,160 @@

    Will match the string:

    -
    -aaabbaaa
    +
    aaabbaaa
     

    But not the string:

    -
    -aaabba
    +
    aaabba
     
    -

    - +

    + Alternation -
    +

    - The | operator will match either - of its arguments, so for example: abc|def will + The | operator will match either + of its arguments, so for example: abc|def will match either "abc" or "def".

    - Parenthesis can be used to group alternations, for example: ab(d|ef) + Parenthesis can be used to group alternations, for example: ab(d|ef) will match either of "abd" or "abef".

    Empty alternatives are not allowed (these are almost always a mistake), but - if you really want an empty alternative use (?:) + if you really want an empty alternative use (?:) as a placeholder, for example:

    - |abc + |abc is not a valid expression, but

    - (?:)|abc + (?:)|abc is and is equivalent, also the expression:

    - (?:abc)?? has exactly the same effect. + (?:abc)?? has exactly the same effect.

    -

    - +

    + Character sets -
    +

    - A character set is a bracket-expression starting with [ - and ending with ], it defines + A character set is a bracket-expression starting with [ + and ending with ], it defines a set of characters, and matches any single character that is a member of that set.

    A bracket expression may contain any combination of the following:

    -
    - +
    + Single characters -
    +

    - For example [abc], will match any of the characters 'a', 'b', + For example [abc], will match any of the characters 'a', 'b', or 'c'.

    -
    - +
    + Character ranges -
    +

    - For example [a-c] + For example [a-c] will match any single character in the range 'a' to 'c'. By default, for Perl regular expressions, a character x is within the range y to z, if the code point of the character lies within the codepoints of the endpoints of - the range. Alternatively, if you set the collate flag when constructing the + the range. Alternatively, if you set the collate flag when constructing the regular expression, then ranges are locale sensitive.

    -
    - +
    + 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 - range a-c. + complement of the characters it contains, for example [^a-c] matches any character that is not in the + range a-c.

    -
    - +
    + Character classes -
    +

    - An expression of the form [[:name:]] - matches the named character class "name", for example [[:lower:]] matches any lower case character. See - character class names. + An expression of the form [[:name:]] + matches the named character class "name", for example [[:lower:]] matches any lower case character. See + character class names.

    -
    - +
    + Collating Elements -
    +

    - An expression of the form [[.col.] matches + An expression of the form [[.col.] matches the collating element col. A collating element is any single character, or any sequence of characters that collates as a single unit. Collating elements may also be used as the end point of a range, for - example: [[.ae.]-c] + example: [[.ae.]-c] matches the character sequence "ae", plus any single character in the range "ae"-c, assuming that "ae" is treated as a single collating element in the current locale.

    - As an extension, a collating element may also be specified via it's symbolic name, for example: + As an extension, a collating element may also be specified via it's symbolic name, for example:

    -
    -[[.NUL.]]
    +
    [[.NUL.]]
     

    - matches a \0 + matches a \0 character.

    -
    - +
    + Equivalence classes -
    +

    - An expression of the form [[=col=]], + An expression of the form [[=col=]], matches any character or collating element whose primary sort key is the same as that for collating element col, as with collating - elements the name col may be a symbolic + elements the name col may be a symbolic name. A primary sort key is one that ignores case, accentation, or - locale-specific tailorings; so for example [[=a=]] matches + locale-specific tailorings; so for example [[=a=]] matches any of the characters: a, À, Á, Â, Ã, Ä, Å, A, à, á, â, ã, ä and å. Unfortunately implementation of this is reliant on the platform's collation and localisation support; this feature can not be relied upon to work portably across all platforms, or even all locales on one platform.

    -
    - +
    + Escaped Characters -
    +

    All the escape sequences that match a single character, or a single character - class are permitted within a character class definition. For example [\[\]] would match either of [ or ] - while [\W\d] + class are permitted within a character class definition. For example [\[\]] would match either of [ or ] + while [\W\d] would match any character that is either a "digit", or is not a "word" character.

    -
    - +
    + Combinations -
    +

    All of the above can be combined in one character set declaration, for example: - [[:digit:]a-c[.NUL.]]. + [[:digit:]a-c[.NUL.]].

    -

    - +

    + Escapes -
    +

    Any special character preceded by an escape shall match itself.

    @@ -437,97 +421,97 @@
    @@ -535,7 +519,7 @@

    - \a + \a

    - \a + \a

    - \e + \e

    - 0x1B + 0x1B

    - \f + \f

    - \f + \f

    - \n + \n

    - \n + \n

    - \r + \r

    - \r + \r

    - \t + \t

    - \t + \t

    - \v - + \v +

    - \v + \v

    - \b + \b

    - \b + \b (but only inside a character class declaration).

    - \cX + \cX

    @@ -548,7 +532,7 @@

    - \xdd + \xdd

    @@ -561,7 +545,7 @@

    - \x{dddd} + \x{dddd}

    @@ -574,7 +558,7 @@

    - \0ddd + \0ddd

    @@ -587,23 +571,23 @@

    - \N{name} + \N{name}

    - Matches the single character which has the symbolic - name name. For example \N{newline} matches the single character \n. + Matches the single character which has the symbolic + name name. For example \N{newline} matches the single character \n.

    -
    - +
    + "Single character" character classes: -
    +

    Any escaped character x, if x is the name of a character class shall match any character that is a member @@ -634,134 +618,133 @@

    - \d + \d

    - [[:digit:]] + [[:digit:]]

    - \l + \l

    - [[:lower:]] + [[:lower:]]

    - \s + \s

    - [[:space:]] + [[:space:]]

    - \u + \u

    - [[:upper:]] + [[:upper:]]

    - \w + \w

    - [[:word:]] + [[:word:]]

    - \D + \D

    - [^[:digit:]] + [^[:digit:]]

    - \L + \L

    - [^[:lower:]] + [^[:lower:]]

    - \S + \S

    - [^[:space:]] + [^[:space:]]

    - \U + \U

    - [^[:upper:]] + [^[:upper:]]

    - \W + \W

    - [^[:word:]] + [^[:word:]]

    -
    - +
    + Character Properties -
    +

    The character property names in the following table are all equivalent to - the names used in character + the names used in character classes.

    @@ -791,7 +774,7 @@

    - \pX + \pX

    @@ -801,14 +784,14 @@

    - [[:X:]] + [[:X:]]

    - \p{Name} + \p{Name}

    @@ -818,14 +801,14 @@

    - [[:Name:]] + [[:Name:]]

    - \PX + \PX

    @@ -835,14 +818,14 @@

    - [^[:X:]] + [^[:X:]]

    - \P{Name} + \P{Name}

    @@ -852,42 +835,42 @@

    - [^[:Name:]] + [^[:Name:]]

    - For example \pd - matches any "digit" character, as does \p{digit}. + For example \pd + matches any "digit" character, as does \p{digit}.

    -
    - +
    + Word Boundaries -
    +

    The following escape sequences match the boundaries of words:

    - \< Matches the start of a + \< Matches the start of a word.

    - \> Matches the end of a word. + \> Matches the end of a word.

    - \b + \b Matches a word boundary (the start or end of a word).

    - \B + \B Matches only when not at a word boundary.

    -
    - +
    + Buffer boundaries -
    +

    The following match only at buffer boundaries: a "buffer" in this context is the whole of the input text that is being matched against (note @@ -907,106 +890,105 @@

    \Z Matches an optional sequence of newlines at the end of a buffer: equivalent - to the regular expression \n*\z + to the regular expression \n*\z

    -
    - +
    + Continuation Escape -
    +

    - The sequence \G + The sequence \G matches only at the end of the last match found, or at the start of the text being matched if no previous match was found. This escape useful if you're iterating over the matches contained within a text, and you want each subsequence match to start where the last one ended.

    -
    - +
    + Quoting escape -
    +

    - The escape sequence \Q + The escape sequence \Q begins a "quoted sequence": all the subsequent characters are treated as literals, until either the end of the regular expression or \E is found. - For example the expression: \Q\*+\Ea+ would match either of: + For example the expression: \Q\*+\Ea+ would match either of:

    -
    -\*+a
    +
    \*+a
     \*+aaa
     
    -
    - +
    + Unicode escapes -
    +

    - \C + \C Matches a single code point: in Boost regex this has exactly the same effect - as a "." operator. \X Matches a combining character sequence: + as a "." operator. \X Matches a combining character sequence: that is any non-combining character followed by a sequence of zero or more combining characters.

    -
    - +
    + Any other escape -
    +

    Any other escape sequence matches the character that is escaped, for example \@ matches a literal '@'.

    -

    - +

    + Perl Extended Patterns -
    +

    Perl-specific extensions to the regular expression syntax all start with - (?. + (?.

    -
    - +
    + Comments -
    +

    - (?# ... - ) is treated as a comment, it's contents + (?# ... + ) is treated as a comment, it's contents are ignored.

    -
    - +
    + Modifiers -
    +

    - (?imsx-imsx ... ) alters + (?imsx-imsx ... ) alters which of the perl modifiers are in effect within the pattern, changes take effect from the point that the block is first seen and extend to any enclosing - ). Letters before a '-' turn + ). Letters before a '-' turn that perl modifier on, letters afterward, turn it off.

    - (?imsx-imsx:pattern) + (?imsx-imsx:pattern) applies the specified modifiers to pattern only.

    -
    - +
    + Non-marking groups -
    +

    - (?:pattern) lexically groups pattern, without generating + (?:pattern) lexically groups pattern, without generating an additional sub-expression.

    -
    - +
    + Lookahead -
    +

    - (?=pattern) consumes zero characters, only if pattern + (?=pattern) consumes zero characters, only if pattern matches.

    - (?!pattern) consumes zero characters, only if pattern + (?!pattern) consumes zero characters, only if pattern does not match.

    @@ -1015,51 +997,50 @@ letter, a punctuation symbol, and be at least 6 characters long, then the expression:

    -
    -(?=.*[[:lower:]])(?=.*[[:upper:]])(?=.*[[:punct:]]).{6,}
    +
    (?=.*[[:lower:]])(?=.*[[:upper:]])(?=.*[[:punct:]]).{6,}
     

    could be used to validate the password.

    -
    - +
    + Lookbehind -
    +

    - (?<=pattern) consumes zero characters, only if pattern + (?<=pattern) consumes zero characters, only if pattern could be matched against the characters preceding the current position (pattern must be of fixed length).

    - (?<!pattern) consumes zero characters, only if pattern + (?<!pattern) consumes zero characters, only if pattern could not be matched against the characters preceding the current position (pattern must be of fixed length).

    -
    - +
    + Independent sub-expressions -
    +

    - (?>pattern) pattern is matched + (?>pattern) pattern is matched independently of the surrounding patterns, the expression will never backtrack into pattern. Independent sub-expressions are typically used to improve performance; only the best possible match for pattern will be considered, if this doesn't allow the expression as a whole to match then no match is found at all.

    -
    - +
    + Conditional Expressions -
    +

    - (?(condition)yes-pattern|no-pattern) attempts to match yes-pattern + (?(condition)yes-pattern|no-pattern) attempts to match yes-pattern if the condition is true, otherwise attempts to match no-pattern.

    - (?(condition)yes-pattern) + (?(condition)yes-pattern) attempts to match yes-pattern if the condition is true, otherwise fails.

    @@ -1068,31 +1049,31 @@ or the index of a marked sub-expression (the condition becomes true if the sub-expression has been matched).

    -

    - +

    + Operator precedence -
    +

    The order of precedence for of operators is as follows:

    1. - Collation-related bracket symbols [==] - [::] [..] + Collation-related bracket symbols [==] + [::] [..]
    2. - Escaped characters \ + Escaped characters \
    3. - Character set (bracket expression) [] + Character set (bracket expression) []
    4. - Grouping () + Grouping ()
    5. - Single-character-ERE duplication * - + ? {m,n} + Single-character-ERE duplication * + + ? {m,n}
    6. Concatenation @@ -1104,11 +1085,11 @@ Alternation |
    -

    - +

    + What gets matched -

    +

    If you view the regular expression as a directed (possibly cyclic) graph, then the best match found is the first match found by a depth-first-search @@ -1118,8 +1099,7 @@ Alternatively:

    - The best match found is the leftmost + The best match found is the leftmost match, with individual elements matched as follows;

    @@ -1143,7 +1123,7 @@ @@ -1223,16 +1203,16 @@ @@ -1240,7 +1220,7 @@

    - AtomA AtomB + AtomA AtomB

    @@ -1156,8 +1136,8 @@

    - Expression1 | - Expression2 + Expression1 | + Expression2

    @@ -1170,7 +1150,7 @@

    - S{N} + S{N}

    @@ -1182,7 +1162,7 @@

    - S{N,M} + S{N,M}

    @@ -1194,7 +1174,7 @@

    - S{N,M}? + S{N,M}?

    @@ -1206,16 +1186,16 @@

    - S?, + S?, S*, - S+ + S+

    - The same as S{0,1}, - S{0,UINT_MAX}, - S{1,UINT_MAX} + The same as S{0,1}, + S{0,UINT_MAX}, + S{1,UINT_MAX} respectively.

    - S??, + S??, S*?, - S+? + S+?

    - The same as S{0,1}?, - S{0,UINT_MAX}?, - S{1,UINT_MAX}? + The same as S{0,1}?, + S{0,UINT_MAX}?, + S{1,UINT_MAX}? respectively.

    - (?>S) + (?>S)

    @@ -1252,7 +1232,7 @@

    - (?=S), (?<=S) + (?=S), (?<=S)

    @@ -1265,7 +1245,7 @@

    - (?!S), (?<!S) + (?!S), (?<!S)

    @@ -1277,8 +1257,8 @@

    - (?(condition)yes-pattern - | no-pattern) + (?(condition)yes-pattern + | no-pattern)

    @@ -1290,57 +1270,55 @@
    -

    - +

    + Variations -

    +

    - The options - normal, ECMAScript, - JavaScript and JScript are all synonyms for perl. + The options + normal, ECMAScript, + JavaScript and JScript are all synonyms for perl.

    -

    - +

    + Options -

    +

    - There are a variety - of flags that may be combined with the perl + There are a variety + of flags that may be combined with the perl option when constructing the regular expression, in particular note that - the newline_alt option alters - the syntax, while the collate, - nosubs and icase options modify how the case and locale + the newline_alt option alters + the syntax, while the collate, + nosubs and icase options modify how the case and locale sensitivity are to be applied.

    -

    - +

    + Pattern Modifiers -

    +

    - The perl smix modifiers can - either be applied using a (?smix-smix) prefix to the regular expression, or with - one of the regex-compile - time flags no_mod_m, mod_x, mod_s, - and no_mod_s. + The perl smix modifiers can + either be applied using a (?smix-smix) prefix to the regular expression, or with + one of the regex-compile + time flags no_mod_m, mod_x, mod_s, + and no_mod_s.

    -

    - +

    + References -

    +

    Perl 5.8.

    - +

    +

    diff --git a/doc/html/boost_regex/unicode.html b/doc/html/boost_regex/unicode.html index 0c0fdc7f..57d6f025 100644 --- a/doc/html/boost_regex/unicode.html +++ b/doc/html/boost_regex/unicode.html @@ -1,15 +1,13 @@ - Unicode and Boost.Regex +Unicode and Boost.Regex - + - - + + @@ -26,57 +24,58 @@

    There are two ways to use Boost.Regex with Unicode strings:

    -

    - +

    + Rely on wchar_t -
    +

    - If your platform's wchar_t type + If your platform's wchar_t type can hold Unicode strings, and your platform's C/C++ runtime correctly handles - wide character constants (when passed to std::iswspace - std::iswlower etc), then you can use boost::wregex + wide character constants (when passed to std::iswspace + std::iswlower etc), then you can use boost::wregex to process Unicode. However, there are several disadvantages to this approach:

    • - It's not portable: there's no guarantee on the width of wchar_t, + It's not portable: there's no guarantee on the width of wchar_t, or even whether the runtime treats wide characters as Unicode at all, most Windows compilers do so, but many Unix systems do not.
    • - There's no support for Unicode-specific character classes: [[:Nd:]], - [[:Po:]] etc. + There's no support for Unicode-specific character classes: [[:Nd:]], + [[:Po:]] etc.
    • You can only search strings that are encoded as sequences of wide characters, it is not possible to search UTF-8, or even UTF-16 on many platforms.
    -

    - +

    + Use a Unicode Aware Regular Expression Type. -
    +

    If you have the ICU library, then Boost.Regex can be configured to make use of it, and provide a distinct regular expression type (boost::u32regex), that supports both Unicode specific character properties, and the searching - of text that is encoded in either UTF-8, UTF-16, or UTF-32. See: ICU + of text that is encoded in either UTF-8, UTF-16, or UTF-32. See: ICU string class support.

    - +

    +

    diff --git a/doc/html/index.html b/doc/html/index.html index cfe70342..9ad88fd8 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,9 +3,9 @@ Boost.Regex - + - + @@ -26,9 +26,9 @@

    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)

    @@ -155,7 +155,7 @@
    Traits Class Requirements
    Iterator - Rrequirements
    + Requirements
    Deprecated Interfaces
    @@ -190,20 +190,10 @@
    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    - - + +

    Last revised: November 07, 2007 at 02:57:53 GMT

    Last revised: December 14, 2007 at 10:05:07 GMT


    Next
    diff --git a/doc/regex.qbk b/doc/regex.qbk index 855fce22..7cbe4df5 100644 --- a/doc/regex.qbk +++ b/doc/regex.qbk @@ -1,7 +1,7 @@ [article Boost.Regex [quickbook 1.3] - [copyright 2007 John Maddock] + [copyright 1998-2007 John Maddock] [purpose Regular Expressions] [license Distributed under the Boost Software License, Version 1.0. diff --git a/doc/regex_traits.qbk b/doc/regex_traits.qbk index 08175dec..7faae830 100644 --- a/doc/regex_traits.qbk +++ b/doc/regex_traits.qbk @@ -20,10 +20,10 @@ struct c_regex_traits; template - struct cpp_regex_traits; + class cpp_regex_traits; template - struct w32_regex_traits; + class w32_regex_traits; } // namespace boost