일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- escaped
- NoSQL
- point
- 꺽쇠
- MongoDB
- Case sensitive
- mongo
- Homebrew
- MySQL
- matches any character
- Regexp
- 대소문자 구별
- Terminal
- whitespace characters
- runserver
- New Line
- MAC
- square brackets
- 정규표현식
- whitespace
- literal
- GIT
- bitbucket
- Regular Expressions
- sensitive
- databases
- dollar sign
- backslash
- Regex
- 딸라표시
Archives
- Today
- Total
Creaticalmind
06 The point must be escaped if literal meaning is required. 본문
Regular expressions
06 The point must be escaped if literal meaning is required.
TigerBJ 2018. 4. 12. 15:22Page 6
The point must be escaped if literal meaning is required.
Source
O.K. |
Case 1
Regular Expression: | . |
---|---|
First match: | O.K. |
All matches: | O.K. |
Case 2
Regular Expression: | \. |
---|---|
First match: | O.K. |
All matches: | O.K. |
Case 3
Regular Expression: | \..\. |
---|---|
First match: | O.K. |
All matches: | O.K. |
Case 1 문자를 와일드 카드로 검색하는 방식이다. > 05 Point . matches any character. <- 참조
Case 2 > 04 escaped with a backslash 이스케이프문자, 백슬래쉬 <- 참조
\.으로 검색을 하면 ' . ' 의 쓰임새는 문자열의 와일드 카드가 아닌, Point ' . ' 을 나타내는 것이다.
Case 3 Case 1, Case 2 의 검색 방식을 혼합해서 사용. [ \. ][ . ][ \. ]으로 보면 이해가 빠르다. 첫번째 [ \. ]은 Point ' . '을 찾는 것, 두번째 [ . ]은 문자열의 와일드 카드, 세번째 [ \. ]은 첫번째와 마찬가지로 Point ' . '을 찾는 것이다.
http://zvon.org/comp/r/tut-Regexp.html#Pages~Page_6
'Regular expressions' 카테고리의 다른 글
07 square brackets "[]" (0) | 2018.04.12 |
---|---|
05 Point . matches any character. (0) | 2018.04.12 |
04 escaped with a backslash 이스케이프문자, 백슬래쉬 (0) | 2017.12.16 |
03 Caret ^ / dollar sign $ 캐럿, 꺽쇠 / 달러 (딸라표시) (0) | 2017.12.16 |
02 whitespace characters (space, tab, new line) (0) | 2017.12.16 |
Comments