Namespaces
Variants

std::basic_regex<CharT,Traits>:: assign

From cppreference.net
Regular expressions library
Classes
(C++11)
Algorithms
Iterators
Exceptions
Traits
Constants
(C++11)
Regex Grammar
basic_regex & assign ( const basic_regex & other ) ;
(1) (C++11부터)
basic_regex & assign ( basic_regex && other ) noexcept ;
(2) (C++11부터)
basic_regex & assign ( const CharT * s,
flag_type f = std:: regex_constants :: ECMAScript ) ;
(3) (C++11부터)
basic_regex & assign ( const CharT * ptr, std:: size_t count,
flag_type f = std:: regex_constants :: ECMAScript ) ;
(4) (C++11부터)
template < class ST, class SA >

basic_regex & assign ( const std:: basic_string < CharT,ST,SA > & str,

flag_type f = std:: regex_constants :: ECMAScript ) ;
(5) (C++11부터)
template < class InputIt >

basic_regex & assign ( InputIt first, InputIt last,

flag_type f = std:: regex_constants :: ECMAScript ) ;
(6) (C++11부터)
basic_regex & assign ( std:: initializer_list < CharT > ilist,
flag_type f = std:: regex_constants :: ECMAScript ) ;
(7) (C++11부터)

정규 표현식에 내용을 할당합니다.

1) other 의 내용을 할당합니다. flags() mark_count() 는 호출 후 other. flags ( ) other. mark_count ( ) 의 값과 동일합니다.
2) other 의 내용을 이동 시맨틱스를 사용하여 할당합니다. flags() mark_count() 는 할당 전 other. flags ( ) other. mark_count ( ) 의 값과 동일합니다. 호출 후 other 는 유효하지만 지정되지 않은 상태입니다.
3-7) 정규 표현식에 문자 시퀀스를 할당합니다. 구문 플래그는 f 로 설정됩니다. mark_count() 호출 후 결과적인 하위 표현식 내에서 표시된 하위 표현식의 수를 반환합니다.
3) s 가 가리키는 널 종료 문자열을 할당합니다.
4) count 개의 문자 시퀀스를 할당하며, 이는 s 가 가리키는 위치에서 시작합니다.
5) 문자열 str 을 할당합니다.
6) [ first , last ) 범위 내의 문자들을 할당합니다.
7) 초기화 리스트 ilist 에 있는 문자들을 할당합니다.

목차

매개변수

other - 할당할 다른 정규 표현식
s - 할당할 문자 시퀀스에 대한 포인터
str - 할당할 문자열
first, last - 할당할 문자 범위
ilist - 할당할 문자들을 포함하는 초기화 리스트
타입 요구사항
-
InputIt LegacyInputIterator 요구사항을 충족해야 합니다.

반환값

* this

예외

1) 구현 정의 예외를 발생시킬 수 있습니다.
3-7) std::regex_error 제공된 정규 표현식이 유효하지 않은 경우. 이 경우 객체는 수정되지 않습니다.

예제

참고 항목

내용을 할당합니다
(public member function)