정규표현식 (Regular Expression)에 대하여 - 정의와 기본 패턴(1~2)
본 포스팅은 생활코딩님의 정규표현식 토픽을 공부하고 정리한 내용입니다.
본 포스팅의 패턴(Page) 및 설명은 http://zvon.org/comp/r/tut-Regexp.html#Pages~Contents 를 참고했습니다.
정규표현식
정규표현식은 문자열을 처리하는 방법 중 하나로 특정한 조건의 문자를 '검색'하거나 '치환'하는 과정을 매우 간편하게 처리 할 수 있는 수단입니다.
정규표현식 패턴들
Page 1
정규표현식은 대소문자를 구분합니다. 따라서 Case1의 정규표현식은 특정한 문자를 찾아내지만, Case2는 그렇지 못합니다.
Source : Hello world!
Case1
Regular Expression | Hello |
First match | Hello, world! |
All match | Hello, world! |
Case2
Regular Expression | hello |
First match | Hello, world |
All match | Hello, world |
Page 2
정규표현식은 공백을 구별합니다. 따라서 Case1의 정규표현식은 특정한 문자를 찾아내지만, Case2는 그렇지 못합니다.
Source : Hello, world!
Case1
Regular Expression | Hello, world |
First match | Hello, world! |
All match | Hello, world! |
Case2
Regular Expression | Hello, world |
First match | Hello, world |
All match | Hello, world |
출처
Regular Expression and its importance in programming | Geekboots
Regular Expression is the most important part of programming - Geekboots
www.geekboots.com
정규표현식 패턴들 - 생활코딩
본 수업은 zvon의 정규표현식 tutorials를 이용한다. 실제 강의는 동영상을 참고하자. zvon은 아래의 URL을 통해서 접근 할 수 있다. http://zvon.org/comp/r/tut-Regexp.html#Pages~Contents 아래는 인터렉티브하게 정
opentutorials.org
Regular Expressions Tutorial @ZVON.org
zvon.org