전체 글
-
[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_search 함수카테고리 없음 2023. 1. 20. 13:52
1.함수 헤더 파일 #include 2.함수 원형 template bool regex_search( BidIt first, Bidit last, match_results& match, const basic_regex& re, match_flag_type flags = match_default); template bool regex_search( BidIt first, Bidit last, const basic_regex& re, match_flag_type flags = match_default); template bool regex_search( const Elem* ptr, match_results& match, const basic_regex& re, match_flag_type flags = ma..
-
[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 정규식..
-
[CS] 정규 표현식 Regular Expression, RegexComputer Science/CS 2023. 1. 19. 23:13
Regular Expression 정규식은 특정한 규칙을 가진 문자열의 집합을 표현하는 데 사용하는 형식 언어입니다. 정규 표현식은 많은 텍스트 편집기와 프로그래밍 언어에서 문자열의 검색과 치환을 위해 지원하고 있습니다. 기본 개념 패턴(pattern)으로 부르는 정규 표현식은 특정 목적을 위해 필요한 문자열 집합을 지정하기 위해 쓰이는 식입니다. | 여러 항목 중 선택, A | B 는 "A" or "B" 와 일치한다는 의미. () 괄호를 사용하여 연산자의 범위와 우선권 정의. gr(a|e)y 는 "gray" or "grey" 집합을 둘 다 기술하는 동일 패턴 ? 0번 or 1차례까지의 발생을 의미. colou?r 는 "color"와 "colour"를 둘 다 일치 시킴 * 별표는 0번 이상의 발생을 의미..