개발/정규 표현식 수련관(휴업) 5

서브 패턴

서브 패턴 Page 10 - 작은 괄호 안에 파이프로 문자열 or 효과 Source : Monday Tuesday Friday Case 1 Regular Expression : (on|ues|rida) First match: Monday Tuesday Friday All matches : Monday Tuesday Friday Case 2 Regular Expression : (Mon|Tues|Fri)day First match: Monday Tuesday Friday All matches :Monday Tuesday Friday Case 3 Regular Expression : ..(id|esd|nd)ay First match: Monday Tuesday Friday All matches : Monda..

모든 문자

모든 문자 Page 5 - 포인트는 모든 캐릭터를 매칭함! Source : Regular expressions are powerful!! Case 1 Regular Expression : . First match: Regular expressions are powerful!! All matches : Regular expressions are powerful!! Case 2 Regular Expression : ...... First match: Regular expressions are powerful!! All matches : Regula/r expr/ession/s are /powerf/ul!! (6개씩 끊김) Point . matches any character. (일종의 와일드 카드) Page..

위치와 이스케이핑

위치와 이스케이핑 Page 3 - 앵커를 사용해 보자! Source : who is who Case 1 Regular Expression : ^who First match: who is who All matches : who is who Case 2 Regular Expression : who$ First match: who is who All matches : who is who ^(캐럿)이 등장하면 캐럿 뒤의 문자가 소스 상에서 시작 위치에 있을 경우 사용됨 $(달러)는 소스의 끝에 위치하는 대상을 지목할 때 사용함 Character ^ matches the beginning of the line(case 1) while dollar sign$ the end of the line(case 2) Pag..

정규 표현식 패턴 기본

정규 표현식이란? 특정한 규칙을 가진 문자열의 집합을 표현하는 데 사용하는 형식 언어 형식 언어는 특정한 법칙들에 따라 적절하게 구성된 문자열의 집합 정규 표현식의 가장 기본적인 문법 Page 1 - 정규 표현식은 대소문자를 구분하신다~ Source : Hello, world! Case 1 Regular Expression : Hello First match: Hello, world! All matches : Hello, world! Case 2 Regular Expression : hello First match: Hello, world! All matches : Hello, world! Regular expressions are case sensitive Page2 - 공백 포함한 모든 문자, 중요...