2008-01-25
学习shell咯4
关键字: shell regex
vi,grep,sed和awk是Unix/Linux下处理文本的最重要的工具,而它们都与正则表达式密不可分
Regular Expression Metacharacters
Regular Expression Metacharacters
^ Beginning-of-line anchor
$ End-of-line anchor
. Matches one character
* Matches zero or more of the preceding characters
[] Matches one in the set
[x-y] Matches one character within a range in the set
[^] Matches one character not in the set
\ Used to escape a metacharacter
\< Beginning-of-word-anchor
\> End-of-word anchor
\(..\) Tags match characters to be used later
x\{m\} Repetition of character x, m times
x\{m,\} Repetition of character x, at least m times
x\{m,n\} Repetition of character x, at least m and not more than n times.
发表评论
- 浏览: 681930 次
- 性别:

- 来自: BJ

- 详细资料
搜索本博客
我的相册
screenshot
共 1 张
共 1 张
最近加入圈子
最新评论
-
Mnesia用户手册:三,构建 ...
要想创建disc_copies和disc_only_copies类型的表有两个前 ...
-- by hideto -
翻译www.djangobook.com之 ...
有个问题问一下: 我先配置了一个urlpatterns是这样的: r'^myd ...
-- by lyhapple -
Why OO sucks
gigix 写道lyl0035 写道为啥就没人想想,其实在面向对象的代码中也流露 ...
-- by hurd -
Why OO sucks
貌似又回到当年java vs c的年代。两种方式,不管是OO还是FP,仅是人处理 ...
-- by python -
大家可以抛弃Java踹死Djan ...
to phoenixup:1,你还别说,你举的什么Struts,Tapestry ...
-- by hideto






评论排行榜