Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2540579
  • 博文数量: 271
  • 博客积分: 6659
  • 博客等级: 准将
  • 技术积分: 3141
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-17 10:24
文章分类

全部博文(271)

文章存档

2016年(2)

2015年(12)

2014年(7)

2013年(19)

2012年(22)

2011年(81)

2010年(128)

分类: LINUX

2010-10-16 13:08:54

       r{n}
       r{n,}
       r{n,m}    
One  or  two  numbers  inside  braces  denote an interval expression.  If there is one number in thebraces, the preceding regular expression r is repeated n times.  If there are two numbers  separated by  a  comma,  r  is  repeated  n to m times.  If there is one number followed by a comma, then r is repeated at least n times.
Interval expressions are only available if either --posix or --re-interval is specified on the  com-mand line.
 
 
 
[root@localhost ]# echo love-qq007-9w | awk '/love-qq[0-9][0-9][0-9]-[0-9]w/'
love-qq007-9w
[root@localhost ]# echo love-qq007-9w | awk  --posix '/love-qq[0-9]{3}-[0-9]w/'    
love-qq007-9w
阅读(1681) | 评论(0) | 转发(0) |
0

上一篇:mail

下一篇:误删除mysql数据库 mysql库

给主人留下些什么吧!~~