[re.synopt]

# 28 Text processing library [[text]](./#text)

## 28.6 Regular expressions library [[re]](re#synopt)

### 28.6.4 Namespace std​::​regex_constants [[re.const]](re.const#re.synopt)

#### 28.6.4.2 Bitmask type syntax_option_type [re.synopt]

[ð](#lib:syntax_option_type)

namespace std::regex_constants {using syntax_option_type = *T1*; inline constexpr syntax_option_type icase = *unspecified*; inline constexpr syntax_option_type nosubs = *unspecified*; inline constexpr syntax_option_type optimize = *unspecified*; inline constexpr syntax_option_type collate = *unspecified*; inline constexpr syntax_option_type ECMAScript = *unspecified*; inline constexpr syntax_option_type basic = *unspecified*; inline constexpr syntax_option_type extended = *unspecified*; inline constexpr syntax_option_type awk = *unspecified*; inline constexpr syntax_option_type grep = *unspecified*; inline constexpr syntax_option_type egrep = *unspecified*; inline constexpr syntax_option_type multiline = *unspecified*;}

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L9623)

The type syntax_option_type is an implementation-defined bitmask
type ([[bitmask.types]](bitmask.types "16.3.3.3.3 Bitmask types"))[.](#1.sentence-1)

Setting its elements has the effects listed in
Table [118](#tab:re.synopt "Table 118: syntax_­option_­type effects")[.](#1.sentence-2)

A valid value of typesyntax_option_type shall have at most one of the grammar elementsECMAScript, basic, extended, awk, grep, egrep, set[.](#1.sentence-3)

If no grammar element is set, the default grammar is ECMAScript[.](#1.sentence-4)

Table [118](#tab:re.synopt) — syntax_option_type effects [[tab:re.synopt]](./tab:re.synopt)  

| [ð](#tab:re.synopt-row-1)<br>**Element** | **Effect(s) if set** |
| --- | --- |
| [ð](#tab:re.synopt-row-2)<br>icase | Specifies that matching of regular expressions against a character container sequence shall be performed without regard to case[.](#tab:re.synopt-row-2-column-2-sentence-1) |
| [ð](#tab:re.synopt-row-3)<br>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[.](#tab:re.synopt-row-3-column-2-sentence-1) |
| [ð](#tab:re.synopt-row-4)<br>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[.](#tab:re.synopt-row-4-column-2-sentence-1)<br>Otherwise it has no detectable effect on the program output[.](#tab:re.synopt-row-4-column-2-sentence-2) |
| [ð](#tab:re.synopt-row-5)<br>collate | Specifies that character ranges of the form "[a-b]" shall be locale sensitive[.](#tab:re.synopt-row-5-column-2-sentence-1) |
| [ð](#tab:re.synopt-row-6)<br>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]](re.grammar "28.6.12 Modified ECMAScript regular expression grammar")[.](#tab:re.synopt-row-6-column-2-sentence-1)<br>   See also: ECMA-262 15.10 |
| [ð](#tab:re.synopt-row-7)<br>basic | Specifies that the grammar recognized by the regular expression engine shall be that used by basic regular expressions in POSIX[.](#tab:re.synopt-row-7-column-2-sentence-1)   See also: POSIX, Base Definitions and Headers, Section 9.3 |
| [ð](#tab:re.synopt-row-8)<br>extended | Specifies that the grammar recognized by the regular expression engine shall be that used by extended regular expressions in POSIX[.](#tab:re.synopt-row-8-column-2-sentence-1)   See also: POSIX, Base Definitions and Headers, Section 9.4 |
| [ð](#tab:re.synopt-row-9)<br>awk | Specifies that the grammar recognized by the regular expression engine shall be that used by the utility awk in POSIX[.](#tab:re.synopt-row-9-column-2-sentence-1) |
| [ð](#tab:re.synopt-row-10)<br>grep | Specifies that the grammar recognized by the regular expression engine shall be that used by the utility grep in POSIX[.](#tab:re.synopt-row-10-column-2-sentence-1) |
| [ð](#tab:re.synopt-row-11)<br>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[.](#tab:re.synopt-row-11-column-2-sentence-1) |
| [ð](#tab:re.synopt-row-12)<br>multiline | Specifies that ^ shall match the beginning of a line and $ shall match the end of a line, if the ECMAScript engine is selected[.](#tab:re.synopt-row-12-column-2-sentence-1) |
