##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::basic_regex constants

From cppreference.com
< cpp‎ | regex‎ | basic regex

Defined in header `<regex>` |  |
static constexpr std::regex_constants::syntax_option_type icase = std::regex_constants::icase; static constexpr std::regex_constants::syntax_option_type nosubs = std::regex_constants::nosubs; static constexpr std::regex_constants::syntax_option_type optimize = std::regex_constants::optimize; static constexpr std::regex_constants::syntax_option_type collate = std::regex_constants::collate; static constexpr std::regex_constants::syntax_option_type ECMAScript = std::regex_constants::ECMAScript; static constexpr std::regex_constants::syntax_option_type basic = std::regex_constants::basic; static constexpr std::regex_constants::syntax_option_type extended = std::regex_constants::extended; static constexpr std::regex_constants::syntax_option_type awk = std::regex_constants::awk; static constexpr std::regex_constants::syntax_option_type grep = std::regex_constants::grep; static constexpr std::regex_constants::syntax_option_type egrep = std::regex_constants::egrep; |  |

std::basic_regex defines several constants that govern general regex matching syntax.

These constants are duplicated from std::regex_constants:

Value | Effect(s)
`icase` | Character matching should be performed without regard to case.
`nosubs` | When performing matches, no sub-expression matches should be stored in the supplied std::regex_match structure.
`optimize` | Instructs the regular expression engine to make matching faster, with the potential cost of making construction slower. For example, this might mean converting a non-deterministic FSA to a deterministic FSA.
`collate` | Character ranges of the form "[a-b]" will be locale sensitive.
`ECMAScript` | Use the Modified ECMAScript regular expression grammar
`basic` | Use the basic POSIX regular expression grammar (grammar documentation).
`extended` | Use the extended POSIX regular expression grammar (grammar documentation).
`awk` | Use the regular expression grammar used by the awk utility in POSIX (grammar documentation)
`grep` | Use the regular expression grammar used by the grep utility in POSIX. This is effectively the same as the `basic` option with the addition of newline '\n' as an alternation separator.
`egrep` | Use the regular expression grammar used by the grep utility, with the -E option, in POSIX. This is effectively the same as the `extended` option with the addition of newline '\n' as an alternation separator in addtion to '|'.

### [edit] See also

syntax_option_type (C++11) | general options controlling regex behavior (typedef) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/regex/basic_regex/constants&oldid=58819"