Programming
-
[c++] basic_regex classProgramming/c++ 2023. 1. 20. 14:58
1. Parameter Elem The type of element to find a match for. RXtraits Traits class for elements. 2. Described 클래스 템플릿은 정규식을 보유하는 개체를 설명합니다. 이 클래스 템플릿의 개체는 템플릿 함수 regex_match, regex_search 및 regex_replace 전달할 수 있습니다. 또한 정규식과 일치하는 텍스트를 검색하기 위해 적절한 텍스트 문자열 인수를 전달합니다. 이 클래식 템플릿에는 char 타입 원소인 regex와 wchar_t 타입 원소인 wregex를 사용하는 두 개의 전문 클래스 템플릿이 있습니다. 3. Member member default public static const flag_typ..
-
[c++] regex swap 함수Programming/c++ 2023. 1. 20. 14:07
1.함수 헤더 파일 #include 2.함수 원형 template void swap( basic_regex& left, basic_regex& right) noexcept; template void swap( match_results& left, match_results& right) noexcept; 3. Parameter Elem The type of element to find a match for. RXtraits The attribute class for the element. 4. Described 템플릿 함수는 일정한 시간 내에 인수의 내용을 교환하고 예외를 발생시키지 않습니다. 4.예제 #include #include int main() { regex rx0("c(a*)|(b)"); reg..
-
[c++] regex_replace 함수Programming/c++ 2023. 1. 20. 13:24
1.함수 헤더 파일 #include 2.함수 원형 template OutIt regex_replace( OutIt out, BidIt first, BidIt last, const basic_regex& re, const basic_string& fmt, match_flag_type flags = match_default); template basic_string regex_replace( const basic_string& str, const basic_regex& re, const basic_string& fmt, match_flag_type flags = match_default); 3. Parameter(매개 변수) OutIt The iterator type for replacement. BidIt..
-
[c++] regex_match 함수Programming/c++ 2023. 1. 20. 12:55
1.함수 헤더 파일 #include 2.함수 원형 regex_match : 정규식이 전체 대상 문자열과 일치하는지 여부를 테스트합니다. // (1) template bool regex_match( BidIt first, Bidit last, match_results& match, const basic_regex& re, match_flag_type flags = match_default); // (2) template bool regex_match( BidIt first, Bidit last, const basic_regex& re, match_flag_type flags = match_default); // (3) template bool regex_match( const Elem *ptr, match..
-
[c++] regex 라이브러리Programming/c++ 2023. 1. 20. 11:43
Regex 라이브러리 #include regex는 regular expression(정규 표현식)으로, 문자열에서 패턴을 찾는데 사용합니다. 특정한 규칙을 가진 문자열의 집합을 표현하는 데 사용하는 형식 언어입니다. 정규 표현식은 많은 텍스트 편집기와 프로그래밍 언어에서 문자열의 검색과 치환을 위해 지원하고 있습니다. 정규 표현식에 관한 자세한 설명은 아래 포스팅을 참고해주세요:) [CS] 정규 표현식 Regular Expression, Regex Regular Expression 정규식은 특정한 규칙을 가진 문자열의 집합을 표현하는 데 사용하는 형식 언어입니다. 정규 표현식은 많은 텍스트 편집기와 프로그래밍 언어에서 문자열의 검색과 치환을 위해 code-space.tistory.com Class 정규식..