2009年1月3日星期六

Unix.Power.Tools: 26. Regular Expressions (Pattern Matching)

shell, find, cpio的文件名匹配模式不是正则表达式。元字符(metacharacters)在shell将参数提交给程序之前被展开。如果要防止正则表达式被错误展开,请加单引号'。

^A\{4, 8\}B 匹配以4-8个A加上一个B开头的行

没有评论:

发表评论