regex_match_flag_type
regex_match_flag_type (일치 플래그 타입)
std::regex_constants::match_flag_type은 정규식 일치와 대체 함수의 동작을 제어하는 플래그를 설명하는 타입이에요. C++11부터 사용할 수 있어요.
출처: cppreference
본문
<regex> 헤더에 정의되어 있고, 시그니처는 다음과 같아요.
using match_flag_type = /* implementation-defined */;
(1) (since C++11)
constexpr match_flag_type match_default = {};
constexpr match_flag_type match_not_bol = /* unspecified */;
constexpr match_flag_type match_not_eol = /* unspecified */;
constexpr match_flag_type match_not_bow = /* unspecified */;
constexpr match_flag_type match_not_eow = /* unspecified */;
constexpr match_flag_type match_any = /* unspecified */;
constexpr match_flag_type match_not_null = /* unspecified */;
constexpr match_flag_type match_continuous = /* unspecified */;
constexpr match_flag_type match_prev_avail = /* unspecified */;
constexpr match_flag_type format_default = {};
constexpr match_flag_type format_sed = /* unspecified */;
constexpr match_flag_type format_no_copy = /* unspecified */;
constexpr match_flag_type format_first_only = /* unspecified */;
(2) (since C++11) (inline since C++17)
-
- match_flag_type은 정규식 일치와 대체 함수의 동작을 제어하는 타입이에요.
플래그 상수 (Flag constants)
| 상수 | 의미 |
|---|---|
| match_default | 기본 일치 규칙 |
| match_not_bol | (첫 번째 일치에서) 첫 번째 문자를 라인 시작으로 취급하지 않음 |
| match_not_eol | (첫 번째 일치에서) 마지막 문자를 라인 끝으로 취급하지 않음 |
| match_not_bow | (첫 번째 일치에서) 단어 경계를 라인 시작으로 취급하지 않음 |
| match_not_eow | (첫 번째 일치에서) 단어 경계를 라인 끝으로 취급하지 않음 |
| match_any | *와 ?가 새 줄을 포함해 일치할 수 있음 |
| match_not_null | 빈 시퀀스를 일치시키지 않음 |
| match_continuous | 첫 번째 문자에서 시작하는 부분만 일치 |
| match_prev_avail | 첫 번째 일치 객체에 first에 대한 이전 문자가 있음 |
| format_default | ECMAScript 규칙으로 대체 문자열 구성 |
| format_sed | POSIX sed 규칙으로 대체 문자열 구성 |
| format_no_copy | 일치하지 않는 부분을 출력에 복사하지 않음 |
| format_first_only | 첫 번째 일치만 대체 |