- 论坛徽章:
- 0
|
原帖由 liying_gg 于 2009-11-23 15:00 发表 ![]()
sed '/\([[:alpha:]]\{4\}\)\([[:digit:]]\)/s//\1pass\2/' 1.txt
也不说一声就跑了,都不清楚文的是啥呢。
为什么在[[:alpha:]]\{4\},是4,而不可以是5?
david不是5个alpha吗?
解释:
Termed an interval expression, this matches a range of occurrences of the single character that immediately precedes it. \{n\} matches exactly n occurrences, \{n,\} matches at least n occurrences, and \{n,m\} matches any number of occurrences between n and m. n and m must be between 0 and RE_DUP_MAX (minimum value: 255), inclusive.
[ 本帖最后由 heqingbluesky 于 2009-11-24 14:41 编辑 ] |
|