Notice
Recent Posts
Recent Comments
- Today
- Total
Phantom
Egrep Metacharacter Summary 본문
반응형
정규식과 관련된 기본적인 메타케릭터 설명이다. Egrep을 기준으로 작성된거지만 대부분의 표준 정규식에서 지원된다.
Metachracter | Matches | |
. | dot | Matches any one character |
[…] | character class | Matches any one character listed |
[^…] | negated character class | Matches any one character not listed |
\char | escape character | When char is a metacharacter,or the escaped combination is not otherwise special, matches the literal character |
Items Appended to Provide "Counting" :The Quantifers
Metachracter | Matches | |
? | question | One allowed, but it is optional |
* | start | Any number allowed, but all are optional |
+ | plus | At least one required; additional are optional |
{min,max} | specified range | Min required, max allowed |
Items That Match a Position
Metachracter | Matches | |
^ | caret | Matches the position at the start of the line |
$ | dollar | Matches the position at the end of the line |
\< | word boundary* | Matches the position at the start of a word |
\> | word boundary* | Matches the position at the end of a word |
Other
Metachracter | Matches | |
| | alternation | Matches either expression it separates |
(…) | parentheses | Limits scope of alternation, provides grouping for the quantifiers, and "captures" for backreferences |
\1,\2.. | backreference* | Matches text previously matched within first, second, etc., set of parentheses. |
O'Reilly - Mastering Regular Expressions 2nd Edition
반응형
'프로그래밍에 대한 정보들' 카테고리의 다른 글
기초명령어 (0) | 2013.04.25 |
---|---|
컴퓨터 구조론 질문?! (0) | 2013.04.21 |
세미콜론(;)과 파이프(|)의 차이점?! (0) | 2013.04.16 |
스왑을 주는 이유? (0) | 2013.04.16 |
What is FHS? (0) | 2013.04.14 |
Comments