Chinaunix首页 | 论坛 | 博客
  • 博客访问: 906504
  • 博文数量: 75
  • 博客积分: 1216
  • 博客等级: 少尉
  • 技术积分: 1998
  • 用 户 组: 普通用户
  • 注册时间: 2012-08-11 16:20
个人简介

优秀是一种习惯

文章分类

全部博文(75)

文章存档

2014年(1)

2013年(29)

2012年(45)

分类: Python/Ruby

2013-01-11 15:03:34

    很多人问我awk正则表达式{}该怎么使用,总是不生效,其实看看man文档就知道了,需要加--posix参数就可以了。
    下面是man文档中的解释:
r{n,m} One or two numbers inside braces denote an interval expres- sion. If there is one number in the braces, 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 command line.
 

阅读(1422) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~