转载:http://blog.youkuaiyun.com/sjf331/article/details/2637428 :%s/xxx//gn关键是最后的n,代表只报告匹配的个数,而不进行实际的替换。