REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
Loading...
Searching...
No Matches
real::compat::regex_constants Namespace Reference

Compatibility constants mirroring std::regex_constants (own values, mapped internally). More...

Typedefs

using error_type = std::regex_constants::error_type
 Error categories. Aliased to std's so regex_error::code() is a true drop-in.
 

Enumerations

enum  syntax_option_type : unsigned {
  ECMAScript = 0 , icase = 1U << 0U , nosubs = 1U << 1U , optimize = 1U << 2U ,
  collate = 1U << 3U , multiline = 1U << 4U , basic = 1U << 5U , extended = 1U << 6U ,
  awk = 1U << 7U , grep = 1U << 8U , egrep = 1U << 9U
}
 Grammar / option flags (own bit values; mapped to real::flags or std at construction). More...
 
enum  match_flag_type : unsigned {
  match_default = 0 , match_not_bol = 1U << 0U , match_not_eol = 1U << 1U , match_not_bow = 1U << 2U ,
  match_not_eow = 1U << 3U , match_any = 1U << 4U , match_not_null = 1U << 5U , match_continuous = 1U << 6U ,
  match_prev_avail = 1U << 7U , format_default = 0 , format_sed = 1U << 8U , format_no_copy = 1U << 9U ,
  format_first_only = 1U << 10U
}
 Match-control flags: the common subset. More...
 

Functions

constexpr syntax_option_type operator| (syntax_option_type a, syntax_option_type b) noexcept
 
constexpr syntax_option_type operator& (syntax_option_type a, syntax_option_type b) noexcept
 
constexpr match_flag_type operator| (match_flag_type a, match_flag_type b) noexcept
 
constexpr match_flag_type operator& (match_flag_type a, match_flag_type b) noexcept
 
constexpr match_flag_type operator~ (match_flag_type a) noexcept
 

Detailed Description

Compatibility constants mirroring std::regex_constants (own values, mapped internally).

Typedef Documentation

◆ error_type

using real::compat::regex_constants::error_type = typedef std::regex_constants::error_type

Error categories. Aliased to std's so regex_error::code() is a true drop-in.

Definition at line 99 of file regex_core.hpp.

Enumeration Type Documentation

◆ match_flag_type

Match-control flags: the common subset.

Enumerator
match_default 
match_not_bol 

^ does not match the start of the sequence.

match_not_eol 

$ does not match the end of the sequence.

match_not_bow 

\b does not match at the start.

match_not_eow 

\b does not match at the end.

match_any 
match_not_null 

Do not match an empty sequence.

match_continuous 

The match must start at the first character.

match_prev_avail 
format_default 
format_sed 

sed/POSIX replacement syntax (routes to std).

format_no_copy 

Do not copy the parts of the text that did not match.

format_first_only 

Replace only the first match.

Definition at line 64 of file regex_core.hpp.

◆ syntax_option_type

Grammar / option flags (own bit values; mapped to real::flags or std at construction).

Enumerator
ECMAScript 

The default grammar.

icase 

Case-insensitive (ASCII).

nosubs 

Do not expose sub-expressions (groups still computed).

optimize 

Hint to favour matching speed; honoured as a no-op.

collate 

Locale-sensitive ranges; forces the std backend.

multiline 

^/$ match at line boundaries.

basic 

POSIX basic — std backend.

extended 

POSIX extended — std backend.

awk 

awk grammar — std backend.

grep 

grep grammar — std backend.

egrep 

egrep grammar — std backend.

Definition at line 36 of file regex_core.hpp.

Function Documentation

◆ operator&() [1/2]

constexpr match_flag_type real::compat::regex_constants::operator& ( match_flag_type  a,
match_flag_type  b 
)
constexprnoexcept

Definition at line 87 of file regex_core.hpp.

◆ operator&() [2/2]

constexpr syntax_option_type real::compat::regex_constants::operator& ( syntax_option_type  a,
syntax_option_type  b 
)
constexprnoexcept

Definition at line 57 of file regex_core.hpp.

◆ operator|() [1/2]

constexpr match_flag_type real::compat::regex_constants::operator| ( match_flag_type  a,
match_flag_type  b 
)
constexprnoexcept

Definition at line 81 of file regex_core.hpp.

◆ operator|() [2/2]

constexpr syntax_option_type real::compat::regex_constants::operator| ( syntax_option_type  a,
syntax_option_type  b 
)
constexprnoexcept

Definition at line 51 of file regex_core.hpp.

◆ operator~()

constexpr match_flag_type real::compat::regex_constants::operator~ ( match_flag_type  a)
constexprnoexcept

Definition at line 93 of file regex_core.hpp.