forked from boostorg/regex
Apply patch from https://svn.boost.org/trac/boost/ticket/10682
This commit is contained in:
@ -25,7 +25,7 @@ this gets bumped up from v4 to v5.
|
|||||||
* Fixed documentation typos from [@https://svn.boost.org/trac/boost/ticket/9283 #9283].
|
* Fixed documentation typos from [@https://svn.boost.org/trac/boost/ticket/9283 #9283].
|
||||||
* Fixed bug in collation code that failed if the locale generated collation strings with embedded nul's,
|
* Fixed bug in collation code that failed if the locale generated collation strings with embedded nul's,
|
||||||
see [@https://svn.boost.org/trac/boost/ticket/9451 #9451].
|
see [@https://svn.boost.org/trac/boost/ticket/9451 #9451].
|
||||||
* Apply patch for unusual thread usage (no statically initiallized mutexes), see [@https://svn.boost.org/trac/boost/ticket/9461 #9461].
|
* Apply patch for unusual thread usage (no statically initialized mutexes), see [@https://svn.boost.org/trac/boost/ticket/9461 #9461].
|
||||||
* Added better checks for invalid UTF-8 sequences, see [@https://svn.boost.org/trac/boost/ticket/9473 #9473].
|
* Added better checks for invalid UTF-8 sequences, see [@https://svn.boost.org/trac/boost/ticket/9473 #9473].
|
||||||
|
|
||||||
[h4 Boost-1.54]
|
[h4 Boost-1.54]
|
||||||
@ -153,7 +153,7 @@ and
|
|||||||
* Breaking Change: POSIX-extended and POSIX-basic regular expressions now enforce the letter of the POSIX standard much more closely than before.
|
* Breaking Change: POSIX-extended and POSIX-basic regular expressions now enforce the letter of the POSIX standard much more closely than before.
|
||||||
* Added support for (?imsx-imsx) constructs.
|
* Added support for (?imsx-imsx) constructs.
|
||||||
* Added support for lookbehind expressions (?<=positive-lookbehind) and (?<!negative-lookbehind).
|
* Added support for lookbehind expressions (?<=positive-lookbehind) and (?<!negative-lookbehind).
|
||||||
* Added support for conditional expressions (?(assertion)true-expresion|false-expression).
|
* Added support for conditional expressions (?(assertion)true-expression|false-expression).
|
||||||
* Added MFC/ATL string wrappers.
|
* Added MFC/ATL string wrappers.
|
||||||
* Added Unicode support; based on ICU.
|
* Added Unicode support; based on ICU.
|
||||||
* Changed newline support to recognise \\f as a line separator (all character types), and \\x85 as a line separator for wide characters / Unicode only.
|
* Changed newline support to recognise \\f as a line separator (all character types), and \\x85 as a line separator for wide characters / Unicode only.
|
||||||
|
@ -43,7 +43,7 @@ this:
|
|||||||
|
|
||||||
- has_icu builds : yes
|
- has_icu builds : yes
|
||||||
|
|
||||||
Whick means that ICU has been found, and support for it will be enabled
|
Which means that ICU has been found, and support for it will be enabled
|
||||||
in the library build.
|
in the library build.
|
||||||
|
|
||||||
[tip If you don't want the regex library to use ICU then build with the
|
[tip If you don't want the regex library to use ICU then build with the
|
||||||
|
@ -69,7 +69,7 @@ Note how we had to add some extra escapes to the expression: remember that
|
|||||||
the escape is seen once by the C++ compiler, before it gets to be seen by
|
the escape is seen once by the C++ compiler, before it gets to be seen by
|
||||||
the regular expression engine, consequently escapes in regular expressions
|
the regular expression engine, consequently escapes in regular expressions
|
||||||
have to be doubled up when embedding them in C/C++ code. Also note that
|
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
|
all the examples assume that your compiler supports argument-dependent
|
||||||
lookup, if yours doesn't (for example VC6), then you will have to add some
|
lookup, 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.
|
`boost::` prefixes to some of the function calls in the examples.
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ catalogue. The messages and their id's are as follows:
|
|||||||
[[150][The character which when preceded by an escape character represents any single character.]["C" ]]
|
[[150][The character which when preceded by an escape character represents any single character.]["C" ]]
|
||||||
[[151][The character which when preceded by an escape character represents end of buffer operator.]["Z" ]]
|
[[151][The character which when preceded by an escape character represents end of buffer operator.]["Z" ]]
|
||||||
[[152][The character which when preceded by an escape character represents the continuation assertion.]["G" ]]
|
[[152][The character which when preceded by an escape character represents the continuation assertion.]["G" ]]
|
||||||
[[153][The character which when preceeded by (? indicates a zero width negated forward lookahead assert.][! ]]
|
[[153][The character which when preceded by (? indicates a zero width negated forward lookahead assert.][! ]]
|
||||||
]
|
]
|
||||||
|
|
||||||
Custom error messages are loaded as follows:
|
Custom error messages are loaded as follows:
|
||||||
|
@ -17,7 +17,7 @@ Certainly any string type that provides access to it's internal buffer, along
|
|||||||
with it's length, can be converted into a pair of pointers (which can be
|
with it's length, can be converted into a pair of pointers (which can be
|
||||||
used as iterators).
|
used as iterators).
|
||||||
|
|
||||||
Some non-standard string types are sufficiently common that wappers have been
|
Some non-standard string types are sufficiently common that wrappers have been
|
||||||
provided for them already: currently this includes the ICU and MFC string class
|
provided for them already: currently this includes the ICU and MFC string class
|
||||||
types.
|
types.
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ Member functions for class RegEx are defined as follows:
|
|||||||
`SetExpression(p, false)`. Throws [bad_expression] on failure. ]]
|
`SetExpression(p, false)`. Throws [bad_expression] on failure. ]]
|
||||||
[[`RegEx& operator=(const std::string& s);`][Assignment operator, equivalent to
|
[[`RegEx& operator=(const std::string& s);`][Assignment operator, equivalent to
|
||||||
calling `SetExpression(s, false)`. Throws [bad_expression] on failure. ]]
|
calling `SetExpression(s, false)`. Throws [bad_expression] on failure. ]]
|
||||||
[[`unsigned int SetExpression(constchar* p, bool icase = false);`][Sets the
|
[[`unsigned int SetExpression(const char* p, bool icase = false);`][Sets the
|
||||||
current expression to /p/, if /icase/ is true then matching is
|
current expression to /p/, if /icase/ is true then matching is
|
||||||
insensitive to case, otherwise it is sensitive to case.
|
insensitive to case, otherwise it is sensitive to case.
|
||||||
Throws [bad_expression] on failure. ]]
|
Throws [bad_expression] on failure. ]]
|
||||||
@ -165,7 +165,7 @@ Member functions for class RegEx are defined as follows:
|
|||||||
[match_flag_type] /flags/. For each match pushes the starting index of what
|
[match_flag_type] /flags/. For each match pushes the starting index of what
|
||||||
matched onto /v/. Returns the number of matches found. ]]
|
matched onto /v/. Returns the number of matches found. ]]
|
||||||
[[`unsigned int GrepFiles(GrepFileCallback cb, const char* files, bool recurse = false, boost::match_flag_type flags = match_default);`]
|
[[`unsigned int GrepFiles(GrepFileCallback cb, const char* files, bool recurse = false, boost::match_flag_type flags = match_default);`]
|
||||||
[Finds all matches of the current expression in the files files using
|
[Finds all matches of the current expression in the files /files/ using
|
||||||
the [match_flag_type] /flags/. For each match calls the call-back function cb.
|
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
|
If the call-back returns false then the algorithm returns without
|
||||||
considering further matches in the current file, or any further files.
|
considering further matches in the current file, or any further files.
|
||||||
@ -178,7 +178,7 @@ Member functions for class RegEx are defined as follows:
|
|||||||
|
|
||||||
May throw an exception derived from `std::runtime_error` if file io fails.]]
|
May throw an exception derived from `std::runtime_error` if file io fails.]]
|
||||||
[[`unsigned int GrepFiles(GrepFileCallback cb, const std::string& files, bool recurse = false, boost::match_flag_type flags = match_default);`]
|
[[`unsigned int GrepFiles(GrepFileCallback cb, const std::string& files, bool recurse = false, boost::match_flag_type flags = match_default);`]
|
||||||
[Finds all matches of the current expression in the files files using the
|
[Finds all matches of the current expression in the files /files/ using the
|
||||||
[match_flag_type] /flags/. For each match calls the call-back function cb.
|
[match_flag_type] /flags/. For each match calls the call-back function cb.
|
||||||
|
|
||||||
If the call-back returns false then the algorithm returns without
|
If the call-back returns false then the algorithm returns without
|
||||||
@ -229,7 +229,7 @@ Member functions for class RegEx are defined as follows:
|
|||||||
to determine what gets matched, and how the format string should be
|
to determine what gets matched, and how the format string should be
|
||||||
treated. If /copy/ is true then all unmatched sections of input are
|
treated. If /copy/ is true then all unmatched sections of input are
|
||||||
copied unchanged to output, if the flag /format_first_only/ is set then
|
copied unchanged to output, if the flag /format_first_only/ is set then
|
||||||
only the first occurance of the pattern found is replaced.
|
only the first occurrence of the pattern found is replaced.
|
||||||
Returns the new string. See also
|
Returns the new string. See also
|
||||||
[link boost_regex.format format string syntax], and [match_flag_type].]]
|
[link boost_regex.format format string syntax], and [match_flag_type].]]
|
||||||
[[`std::string Merge(const char* in, const char* fmt, bool copy = true, boost::match_flag_type flags = match_default);`]
|
[[`std::string Merge(const char* in, const char* fmt, bool copy = true, boost::match_flag_type flags = match_default);`]
|
||||||
@ -239,7 +239,7 @@ Member functions for class RegEx are defined as follows:
|
|||||||
what gets matched, and how the format string should be treated.
|
what gets matched, and how the format string should be treated.
|
||||||
If /copy/ is true then all unmatched sections of input are copied
|
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
|
unchanged to output, if the flag /format_first_only/ is set then only
|
||||||
the first occurance of the pattern found is replaced. Returns
|
the first occurrence of the pattern found is replaced. Returns
|
||||||
the new string. See also [link boost_regex.format format string syntax], and [match_flag_type].]]
|
the new string. See also [link boost_regex.format format string syntax], and [match_flag_type].]]
|
||||||
[[`unsigned Split(std::vector<std::string>& v, std::string& s, boost::match_flag_type flags = match_default, unsigned max_count = ~0);`]
|
[[`unsigned Split(std::vector<std::string>& v, std::string& s, boost::match_flag_type flags = match_default, unsigned max_count = ~0);`]
|
||||||
[Splits the input string and pushes each one onto the vector.
|
[Splits the input string and pushes each one onto the vector.
|
||||||
|
@ -87,7 +87,7 @@ from a html file, and print them out to cout:
|
|||||||
char c;
|
char c;
|
||||||
while(is.get(c))
|
while(is.get(c))
|
||||||
{
|
{
|
||||||
// use logarithmic growth stategy, in case
|
// use logarithmic growth strategy, in case
|
||||||
// in_avail (above) returned zero:
|
// in_avail (above) returned zero:
|
||||||
if(s.capacity() == s.size())
|
if(s.capacity() == s.size())
|
||||||
s.reserve(s.capacity() * 3);
|
s.reserve(s.capacity() * 3);
|
||||||
|
@ -156,7 +156,7 @@ An expression of the form `[[.col.]` matches the collating element /col/.
|
|||||||
A collating element is any single character, or any sequence of
|
A collating element is any single character, or any sequence of
|
||||||
characters that collates as a single unit. Collating elements may also
|
characters that collates as a single unit. Collating elements may also
|
||||||
be used as the end point of a range, for example: `[[.ae.]-c]` matches
|
be used as the end point of a range, for example: `[[.ae.]-c]` matches
|
||||||
the character sequence "ae", plus any single character in the rangle "ae"-c,
|
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.
|
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
|
Collating elements may be used in place of escapes (which are not
|
||||||
|
@ -71,7 +71,7 @@ using std::distance;
|
|||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* Fix broken broken namespace support:
|
* Fix broken namespace support:
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user