tmp/tmp85195u8l/{from.md → to.md}
RENAMED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
## Namespace `std::regex_constants` <a id="re.const">[[re.const]]</a>
|
| 2 |
|
|
|
|
|
|
|
| 3 |
The namespace `std::regex_constants` holds symbolic constants used by
|
| 4 |
the regular expression library. This namespace provides three types,
|
| 5 |
`syntax_option_type`, `match_flag_type`, and `error_type`, along with
|
| 6 |
several constants of these types.
|
| 7 |
|
|
@@ -36,18 +38,18 @@ grammar is `ECMAScript`.
|
|
| 36 |
| Element | Effect(s) if set |
|
| 37 |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| 38 |
| % `icase` | Specifies that matching of regular expressions against a character container sequence shall be performed without regard to case. \indexlibrarymember{syntax_option_type}{icase}% |
|
| 39 |
| % `nosubs` | Specifies that no sub-expressions shall be considered to be marked, so that when a regular expression is matched against a character container sequence, no sub-expression matches shall be stored in the supplied `match_results` object. \indexlibrarymember{syntax_option_type}{nosubs}% |
|
| 40 |
| % `optimize` | Specifies that the regular expression engine should pay more attention to the speed with which regular expressions are matched, and less to the speed with which regular expression objects are constructed. Otherwise it has no detectable effect on the program output. \indexlibrarymember{syntax_option_type}{optimize}% |
|
| 41 |
-
| % `collate` | Specifies that character ranges of the form `"[a-b]"` shall be locale sensitive. \indexlibrarymember{syntax_option_type}{collate}% \indextext{locale}%
|
| 42 |
| % `ECMAScript` | Specifies that the grammar recognized by the regular expression engine shall be that used by ECMAScript in ECMA-262, as modified in~ [[re.grammar]]. \xref ECMA-262 15.10 \indextext{ECMAScript}% \indexlibrarymember{syntax_option_type}{ECMAScript}% |
|
| 43 |
| % `basic` | Specifies that the grammar recognized by the regular expression engine shall be that used by basic regular expressions in POSIX. \xref POSIX, Base Definitions and Headers, Section 9.3 \indextext{POSIX!regular expressions}% \indexlibrarymember{syntax_option_type}{basic}% |
|
| 44 |
| % `extended` | Specifies that the grammar recognized by the regular expression engine shall be that used by extended regular expressions in POSIX. \xref POSIX, Base Definitions and Headers, Section 9.4 \indextext{POSIX!extended regular expressions}% \indexlibrarymember{syntax_option_type}{extended}% |
|
| 45 |
-
| % `awk` | Specifies that the grammar recognized by the regular expression engine shall be that used by the utility awk in POSIX. \
|
| 46 |
-
| % `grep` | Specifies that the grammar recognized by the regular expression engine shall be that used by the utility grep in POSIX. \
|
| 47 |
-
| % `egrep` | Specifies that the grammar recognized by the regular expression engine shall be that used by the utility grep when given the -E option in POSIX. \
|
| 48 |
-
| % `multiline` | Specifies that `^` shall match the beginning of a line and `$` shall match the end of a line, if the `ECMAScript` engine is selected. \
|
| 49 |
|
| 50 |
|
| 51 |
### Bitmask type `match_flag_type` <a id="re.matchflag">[[re.matchflag]]</a>
|
| 52 |
|
| 53 |
``` cpp
|
|
@@ -123,21 +125,21 @@ The type `error_type` is an *implementation-defined* enumerated type
|
|
| 123 |
conditions described in [[re.err]]:
|
| 124 |
|
| 125 |
**Table: `error_type` values in the C locale** <a id="re.err">[re.err]</a>
|
| 126 |
|
| 127 |
| Value | Error condition |
|
| 128 |
-
| -------------------- | ------------------------------------------------------------------------------------------------------------------
|
| 129 |
-
| `error_collate` | The expression
|
| 130 |
-
| % `error_ctype` | The expression
|
| 131 |
-
| % `error_escape` | The expression
|
| 132 |
-
| % `error_backref` | The expression
|
| 133 |
-
| % `error_brack` | The expression
|
| 134 |
-
| % `error_paren` | The expression
|
| 135 |
-
| % `error_brace` | The expression
|
| 136 |
-
| % `error_badbrace` | The expression
|
| 137 |
-
| % `error_range` | The expression
|
| 138 |
-
| % `error_space` | There
|
| 139 |
-
| % `error_badrepeat` | One of \verb|*?+{|
|
| 140 |
-
| % `error_complexity` | The complexity of an attempted match against a regular expression
|
| 141 |
-
| % `error_stack` | There
|
| 142 |
|
| 143 |
|
|
|
|
| 1 |
## Namespace `std::regex_constants` <a id="re.const">[[re.const]]</a>
|
| 2 |
|
| 3 |
+
### General <a id="re.const.general">[[re.const.general]]</a>
|
| 4 |
+
|
| 5 |
The namespace `std::regex_constants` holds symbolic constants used by
|
| 6 |
the regular expression library. This namespace provides three types,
|
| 7 |
`syntax_option_type`, `match_flag_type`, and `error_type`, along with
|
| 8 |
several constants of these types.
|
| 9 |
|
|
|
|
| 38 |
| Element | Effect(s) if set |
|
| 39 |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| 40 |
| % `icase` | Specifies that matching of regular expressions against a character container sequence shall be performed without regard to case. \indexlibrarymember{syntax_option_type}{icase}% |
|
| 41 |
| % `nosubs` | Specifies that no sub-expressions shall be considered to be marked, so that when a regular expression is matched against a character container sequence, no sub-expression matches shall be stored in the supplied `match_results` object. \indexlibrarymember{syntax_option_type}{nosubs}% |
|
| 42 |
| % `optimize` | Specifies that the regular expression engine should pay more attention to the speed with which regular expressions are matched, and less to the speed with which regular expression objects are constructed. Otherwise it has no detectable effect on the program output. \indexlibrarymember{syntax_option_type}{optimize}% |
|
| 43 |
+
| % `collate` | Specifies that character ranges of the form `"[a-b]"` shall be locale sensitive.% \indexlibrarymember{syntax_option_type}{collate}% \indextext{locale}% |
|
| 44 |
| % `ECMAScript` | Specifies that the grammar recognized by the regular expression engine shall be that used by ECMAScript in ECMA-262, as modified in~ [[re.grammar]]. \xref ECMA-262 15.10 \indextext{ECMAScript}% \indexlibrarymember{syntax_option_type}{ECMAScript}% |
|
| 45 |
| % `basic` | Specifies that the grammar recognized by the regular expression engine shall be that used by basic regular expressions in POSIX. \xref POSIX, Base Definitions and Headers, Section 9.3 \indextext{POSIX!regular expressions}% \indexlibrarymember{syntax_option_type}{basic}% |
|
| 46 |
| % `extended` | Specifies that the grammar recognized by the regular expression engine shall be that used by extended regular expressions in POSIX. \xref POSIX, Base Definitions and Headers, Section 9.4 \indextext{POSIX!extended regular expressions}% \indexlibrarymember{syntax_option_type}{extended}% |
|
| 47 |
+
| % `awk` | Specifies that the grammar recognized by the regular expression engine shall be that used by the utility awk in POSIX. \indexlibrarymember{syntax_option_type}{awk}% |
|
| 48 |
+
| % `grep` | Specifies that the grammar recognized by the regular expression engine shall be that used by the utility grep in POSIX. \indexlibrarymember{syntax_option_type}{grep}% |
|
| 49 |
+
| % `egrep` | Specifies that the grammar recognized by the regular expression engine shall be that used by the utility grep when given the -E option in POSIX. \indexlibrarymember{syntax_option_type}{egrep}% |
|
| 50 |
+
| % `multiline` | Specifies that `^` shall match the beginning of a line and `$` shall match the end of a line, if the `ECMAScript` engine is selected. \indexlibrarymember{syntax_option_type}{multiline}% |
|
| 51 |
|
| 52 |
|
| 53 |
### Bitmask type `match_flag_type` <a id="re.matchflag">[[re.matchflag]]</a>
|
| 54 |
|
| 55 |
``` cpp
|
|
|
|
| 125 |
conditions described in [[re.err]]:
|
| 126 |
|
| 127 |
**Table: `error_type` values in the C locale** <a id="re.err">[re.err]</a>
|
| 128 |
|
| 129 |
| Value | Error condition |
|
| 130 |
+
| -------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
| 131 |
+
| `error_collate` | The expression contains an invalid collating element name. |
|
| 132 |
+
| % `error_ctype` | The expression contains an invalid character class name. |
|
| 133 |
+
| % `error_escape` | The expression contains an invalid escaped character, or a trailing escape. |
|
| 134 |
+
| % `error_backref` | The expression contains an invalid back reference. |
|
| 135 |
+
| % `error_brack` | The expression contains mismatched \verb|[| and \verb|]|. |
|
| 136 |
+
| % `error_paren` | The expression contains mismatched \verb|(| and \verb|)|. |
|
| 137 |
+
| % `error_brace` | The expression contains mismatched \verb|{| and \verb|}| |
|
| 138 |
+
| % `error_badbrace` | The expression contains an invalid range in a \verb|{}| expression. |
|
| 139 |
+
| % `error_range` | The expression contains an invalid character range, such as \verb|[b-a]| in most encodings. |
|
| 140 |
+
| % `error_space` | There is insufficient memory to convert the expression into a finite state machine. |
|
| 141 |
+
| % `error_badrepeat` | One of \verb|*?+{| is not preceded by a valid regular expression. |
|
| 142 |
+
| % `error_complexity` | The complexity of an attempted match against a regular expression exceeds a pre-set level. |
|
| 143 |
+
| % `error_stack` | There is insufficient memory to determine whether the regular expression matches the specified character sequence. |
|
| 144 |
|
| 145 |
|