# std::regex_constants Namespace Reference
[Regular Expressions]

## Detailed Description

ISO C++ 0x entities sub namespace for regex.

## Typedefs

- typedef std::bitset< _S_match_flag_last > match_flag_type
- typedef unsigned int syntax_option_type

## Enumerations

- enum __match_flag {
  _S_not_bol, _S_not_eol, _S_not_bow, _S_not_eow,
  _S_any, _S_not_null, _S_continuous, _S_prev_avail,
  _S_sed, _S_no_copy, _S_first_only, _S_match_flag_last
  }
- enum __syntax_option {
  _S_icase, _S_nosubs, _S_optimize, _S_collate,
  _S_ECMAScript, _S_basic, _S_extended, _S_awk,
  _S_grep, _S_egrep, _S_syntax_last
  }
- enum error_type {
  _S_error_collate, _S_error_ctype, _S_error_escape, _S_error_backref,
  _S_error_brack, _S_error_paren, _S_error_brace, _S_error_badbrace,
  _S_error_range, _S_error_space, _S_error_badrepeat, _S_error_complexity,
  _S_error_stack, _S_error_last
  }

## Functions

- static const error_type error_backref (_S_error_backref)
- static const error_type error_badbrace (_S_error_badbrace)
- static const error_type error_badrepeat (_S_error_badrepeat)
- static const error_type error_brace (_S_error_brace)
- static const error_type error_brack (_S_error_brack)
- static const error_type error_collate (_S_error_collate)
- static const error_type error_complexity (_S_error_complexity)
- static const error_type error_ctype (_S_error_ctype)
- static const error_type error_escape (_S_error_escape)
- static const error_type error_paren (_S_error_paren)
- static const error_type error_range (_S_error_range)
- static const error_type error_space (_S_error_space)
- static const error_type error_stack (_S_error_stack)

## Variables

- static const syntax_option_type awk
- static const syntax_option_type basic
- static const syntax_option_type collate
- static const syntax_option_type ECMAScript
- static const syntax_option_type egrep
- static const syntax_option_type extended
- static const match_flag_type format_default
- static const match_flag_type format_first_only
- static const match_flag_type format_no_copy
- static const match_flag_type format_sed
- static const syntax_option_type grep
- static const syntax_option_type icase
- static const match_flag_type match_any
- static const match_flag_type match_continuous
- static const match_flag_type match_default
- static const match_flag_type match_not_bol
- static const match_flag_type match_not_bow
- static const match_flag_type match_not_eol
- static const match_flag_type match_not_eow
- static const match_flag_type match_not_null
- static const match_flag_type match_prev_avail
- static const syntax_option_type nosubs
- static const syntax_option_type optimize

## Typedef Documentation

typedef std::bitset<_S_match_flag_last> std::regex_constants::match_flag_type

This is a bitmask type indicating regex matching rules.

Matching a regular expression against a sequence of characters [first, last) proceeds according to the rules of the grammar specified for the regular expression object, modified according to the effects listed below for any bitmask elements set.

The `match_flag_type` is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.

Definition at line 167 of file tr1_impl/regex.

typedef unsigned int std::regex_constants::syntax_option_type

This is a bitmask type indicating how to interpret the regex.

The `syntax_option_type` is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.

A valid value of type syntax_option_type shall have exactly one of the elements `ECMAScript`, `basic`, `extended`, `awk`, `grep`, `egrep` set.

Definition at line 75 of file tr1_impl/regex.

## Enumeration Type Documentation

enum std::regex_constants::error_type

[7.5.3] implementation-defined error type

Definition at line 245 of file tr1_impl/regex.

## Function Documentation

static const error_type std::regex_constants::error_backref | ( | _S_error_backref |  | ) | `[static]`

The expression contained an invalid back reference.

static const error_type std::regex_constants::error_badbrace | ( | _S_error_badbrace |  | ) | `[static]`

The expression contained an invalid range in a {} expression.

static const error_type std::regex_constants::error_badrepeat | ( | _S_error_badrepeat |  | ) | `[static]`

One of *?+{ was not preceded by a valid regular expression.

static const error_type std::regex_constants::error_brace | ( | _S_error_brace |  | ) | `[static]`

The expression contained mismatched { and }.

static const error_type std::regex_constants::error_brack | ( | _S_error_brack |  | ) | `[static]`

The expression contained mismatched [ and ].

static const error_type std::regex_constants::error_collate | ( | _S_error_collate |  | ) | `[static]`

The expression contained an invalid collating element name.

static const error_type std::regex_constants::error_complexity | ( | _S_error_complexity |  | ) | `[static]`

exceeded a pre-set level.

static const error_type std::regex_constants::error_ctype | ( | _S_error_ctype |  | ) | `[static]`

The expression contained an invalid character class name.

static const error_type std::regex_constants::error_escape | ( | _S_error_escape |  | ) | `[static]`

escape.

static const error_type std::regex_constants::error_paren | ( | _S_error_paren |  | ) | `[static]`

The expression contained mismatched ( and ).

static const error_type std::regex_constants::error_range | ( | _S_error_range |  | ) | `[static]`

such as [b-a] in most encodings.

static const error_type std::regex_constants::error_space | ( | _S_error_space |  | ) | `[static]`

finite state machine.

static const error_type std::regex_constants::error_stack | ( | _S_error_stack |  | ) | `[static]`

regular expression could match the specified character sequence.

## Variable Documentation

const syntax_option_type std::regex_constants::awk `[static]`

one, two, or three octal digits).

Definition at line 123 of file tr1_impl/regex.

const syntax_option_type std::regex_constants::basic `[static]`

Portable Operating System Interface (POSIX), IEEE Standard 1003.1-2001].

Definition at line 109 of file tr1_impl/regex.

const syntax_option_type std::regex_constants::collate `[static]`

sensitive.

Definition at line 94 of file tr1_impl/regex.

const syntax_option_type std::regex_constants::ECMAScript `[static]`

POSIX regular expression grammar.

Definition at line 102 of file tr1_impl/regex.

const syntax_option_type std::regex_constants::egrep `[static]`

extended, except that newlines are treated as whitespace.

Definition at line 135 of file tr1_impl/regex.

const syntax_option_type std::regex_constants::extended `[static]`

Section 9, Regular Expressions.

Definition at line 115 of file tr1_impl/regex.

const match_flag_type std::regex_constants::format_first_only `[static]`

occurrence of the regular expression shall be replaced.

Definition at line 241 of file tr1_impl/regex.

const match_flag_type std::regex_constants::format_no_copy `[static]`

expression shall not be copied to the output string.

Definition at line 237 of file tr1_impl/regex.

const match_flag_type std::regex_constants::format_sed `[static]`

Operating System Interface (POSIX), IEEE Standard 1003.1-2001].

Definition at line 232 of file tr1_impl/regex.

const syntax_option_type std::regex_constants::grep `[static]`

as whitespace.

Definition at line 129 of file tr1_impl/regex.

const syntax_option_type std::regex_constants::icase `[static]`

sequence shall be performed without regard to case.

Definition at line 79 of file tr1_impl/regex.

const match_flag_type std::regex_constants::match_any `[static]`

result.

Definition at line 191 of file tr1_impl/regex.

const match_flag_type std::regex_constants::match_continuous `[static]`

The expression only matches a sub-sequence that begins at first .

Definition at line 197 of file tr1_impl/regex.

const match_flag_type std::regex_constants::match_not_bol `[static]`

expression shall not match [first, first).

Definition at line 174 of file tr1_impl/regex.

const match_flag_type std::regex_constants::match_not_bow `[static]`

[first,first).

Definition at line 183 of file tr1_impl/regex.

const match_flag_type std::regex_constants::match_not_eol `[static]`

expression shall not match [last, last).

Definition at line 179 of file tr1_impl/regex.

const match_flag_type std::regex_constants::match_not_eow `[static]`

[last,last).

Definition at line 187 of file tr1_impl/regex.

const match_flag_type std::regex_constants::match_not_null `[static]`

The expression does not match an empty sequence.

Definition at line 194 of file tr1_impl/regex.

const match_flag_type std::regex_constants::match_prev_avail `[static]`

expression algorithms 7.11 and iterators 7.12.

Definition at line 202 of file tr1_impl/regex.

const syntax_option_type std::regex_constants::nosubs `[static]`

supplied match_results structure.

Definition at line 84 of file tr1_impl/regex.

const syntax_option_type std::regex_constants::optimize `[static]`

it has no detectable effect on the program output.

Definition at line 90 of file tr1_impl/regex.