当前位置: > shell编程 >

有关awk正则表达式中{}的使用方法

时间:2014-09-10 21:44来源:linux.it.net.cn 作者:it

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.

 
(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容