标签:
目标 替换 test.data文件中的
原正则: (\d{4}[^)]*?)
sed不支持 \d 改为0-9
测试 :head test.data| sed -r "s/([0-9]{4}[^)]+)//g"
grep测试: grep -P "(\\d{4}[^)]*?)" test.data
替换: sed -i -r "s/([0-9]{4}[^)]+)//g"
标签:
原文地址:http://www.cnblogs.com/cphmvp/p/4517534.html