일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 정규표현식
- MongoDB
- NoSQL
- whitespace characters
- Regular Expressions
- Terminal
- mongo
- sensitive
- 꺽쇠
- databases
- Regexp
- dollar sign
- Homebrew
- whitespace
- Regex
- 대소문자 구별
- matches any character
- runserver
- square brackets
- backslash
- Case sensitive
- bitbucket
- GIT
- MySQL
- point
- New Line
- MAC
- literal
- 딸라표시
Archives
- Today
- Total
Creaticalmind
07 square brackets "[]" 본문
Page 7
Inside square brackets "[]" a list of characters can be provided. The expression matches if any of these characters is found. The order of characters is insignificant.(Case 3)
Source
How do you do? |
Case 1
Regular Expression: | [oyu] |
---|---|
First match: | How do you do? |
All matches: | How do you do? |
Case 2
Regular Expression: | [dH]. |
---|---|
First match: | How do you do? |
All matches: | How do you do? |
Case 3
Regular Expression: | [owy][yow] |
---|---|
First match: | How do you do? |
All matches: | How do you do? |
Case 1 [oyu]가 나타내는 것은 'o' or 'y' or 'u' 의 의미 이다. 그래서 3가지 중 하나의 문자에 대한 검색을 한다. 문자는 3개가 있지만, 하나의 문자를 검색하는 의미이다. All matches에서 you 를 보면,[y][o][u]를 하나씩 검색을 하는 것이다.
Case 2 [dH].는 [d or H][.] 을 나타내는 것이다. d나 H 그리고 문자 와일드카드 ' . '를 나타내는 것이다.
Case 3 [owy][yow]는 ['o' or 'w' or 'y']['y' or 'o' or 'w']를 나타내는 것이다.
oy oo ow wy wo ww yy yo yw
http://zvon.org/comp/r/tut-Regexp.html#Pages~Page_7
'Regular expressions' 카테고리의 다른 글
06 The point must be escaped if literal meaning is required. (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