|
Boost.Regexmatch_flag_type |
|
The type match_flag_type
is an implementation
defined bitmask type (17.3.2.1.2) that controls how a regular
expression is matched against a character sequence.
namespace std{ namespace regex_constants{ typedef bitmask_type match_flag_type; static const match_flag_type match_default = 0; static const match_flag_type match_not_bob; static const match_flag_type match_not_eob; static const match_flag_type match_not_bol; static const match_flag_type match_not_eol; static const match_flag_type match_not_bow; static const match_flag_type match_not_eow; static const match_flag_type match_any; static const match_flag_type match_not_null; static const match_flag_type match_continuous; static const match_flag_type match_partial; static const match_flag_type match_prev_avail; static const match_flag_type match_not_dot_newline; static const match_flag_type match_not_dot_null; static const match_flag_type format_default = 0; static const match_flag_type format_sed; static const match_flag_type format_perl; static const match_flag_type format_no_copy; static const match_flag_type format_first_only; static const match_flag_type format_all; } // namespace regex_constants } // namespace std
The type match_flag_type
is an implementation
defined bitmask type (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:
Element |
Effect if set |
match_default |
Specifies that matching of regular expressions proceeds without any modification of the normal rules used in ECMA-262, ECMAScript Language Specification, Chapter 15 part 10, RegExp (Regular Expression) Objects (FWD.1) |
match_not_bob | Specifies that the expression "\A" should not match against the sub-sequence [first,first). |
match_not_eob | Specifies that the expressions "\z" and "\Z" should not match against the sub-sequence [last,last). |
match_not_bol |
Specifies that the expression "^" should not be matched against the sub-sequence [first,first). |
match_not_eol |
Specifies that the expression "$" should not be matched against the sub-sequence [last,last). |
match_not_bow |
Specifies that the expression "\b" should not be matched against the sub-sequence [first,first). |
match_not_eow |
Specifies that the expression "\b" should not be matched against the sub-sequence [last,last). |
match_any |
Specifies that if more than one match is possible then any match is an acceptable result. |
match_not_null |
Specifies that the expression can not be matched against an empty sequence. |
match_continuous |
Specifies that the expression must match a sub-sequence that begins at first. |
match_partial |
Specifies that if no match can be found, then it is acceptable to return a match [from, last) where from!=last, if there exists some sequence of characters [from,to) of which [from,last) is a prefix, and which would result in a full match. |
match_prev_avail |
Specifies that |
match_not_dot_newline | Specifies that the expression "." does not match a newline character. |
match_not_dot_null | Specified that the expression "." does not match a character null '\0'. |
format_default |
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 ECMAScript replace function in ECMA-262, ECMAScript Language Specification, Chapter 15 part 5.4.11 String.prototype.replace. (FWD.1). In addition during search and replace operations then all non-overlapping occurrences of the regular expression are located and replaced, and sections of the input that did not match the expression, are copied unchanged to the output string. |
format_sed |
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.. |
format_perl |
Specifies that when a regular expression match is to be replaced by a new string, that the new string is constructed using an implementation defined superset of the rules used by the ECMAScript replace function in ECMA-262, ECMAScript Language Specification, Chapter 15 part 5.4.11 String.prototype.replace (FWD.1). |
format_all | Specifies that all syntax extensions are enabled, including conditional (?ddexpression1:expression2) replacements. |
format_no_copy |
When specified during a search and replace operation, then sections of the character container sequence being searched that do match the regular expression, are not copied to the output string. |
format_first_only |
When specified during a search and replace operation, then only the first occurrence of the regular expression is replaced. |
Revised 17 May 2003
© Copyright John Maddock 1998- 2003
Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Dr John Maddock makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.