Egrep Metacharacter Summary

2012. 11. 16. 09:42
정규식과 관련된 기본적인 메타케릭터 설명이다. Egrep을 기준으로 작성된거지만 대부분의 표준 정규식에서 지원된다.

Items to Match a Single Character

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


Posted by n3015m
:
BLOG main image
'네오이즘'의 보안LAB 블로그입니다........... n3oism@gmail.com by n3015m

카테고리

분류 전체보기 (228)
[ HappyDevTool ] (29)
[ HappyToolRelease ] (4)
[Book] (6)
[ Security Studies ] (0)
- CII (2)
- BigData (2)
- Web Hacking (10)
- SQL Injection (25)
- Mobile Security (9)
- Network (6)
- OperatingSystem (4)
- Malware & Reversing (4)
- Phishing (5)
- Compliance (0)
- Programming (13)
- Tools (13)
- IoT (6)
- etc (21)
[Pentration Testing] (3)
[OS X] (4)
[ Security Trends ] (16)
[ Fixing Guideline ] (7)
My Way, My Life (34)
About Me (2)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

Total :
Today : Yesterday :