可选的背景信息:
[ 我正在使用的 Java 开源项目的作者更改了项目中每个文件的版权声明。因此,我无法再对项目的旧版本和新版本进行差异比较,因为每个文件都因新的版权声明而被标记为不同。为了对这个项目的新版本进行差异比较,我首先需要从新项目和旧项目中的每个文件中删除版权声明,然后执行新的基准差异比较,以此为基础继续进行。 ]
问:Windows 上是否有一个文本编辑器可以从项目的所有源代码文件中找到并删除以下文本块:
/*
* Copyright (C) 2010 Franklin Pierce
*
* This file is part of mexxaco.
*
* mexxaco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* mexxaco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with mexxaco. If not, see <http://www.gnu.org/licenses/>.
*/
答案1
有几个选项:Eclipse、Notepad++、Dreamweaver。Notepad++ 可能是最简单、最便宜的方法。这里有一篇介绍 Notepad++ 的好文章:
http://www.makeuseof.com/tag/how-to-find-and-replace-words-in-multiple-files/