Text editor on Windows to delete large block of copyright text in multiple source files?

1

Optional Background Information:

[ The author of a Java open source project I am using has changed the copyright notice in every file in the project. As a result, I can no longer diff between the older version of the project and the newer version, since every file is marked as different because of the new copyright notice. In order to do a diff with this new version of the project, I first need to remove the copyright notice from every file in the new project and the old project and then perform a new baseline diff from which to move forward. ]

Q: Is there a text editor on Windows that would find and remove this block of text from all of the source code files in the project:

/*
 *  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/>.
 */

marc

Posted 2010-10-15T14:39:47.697

Reputation: 19

Question was closed 2016-08-26T03:39:17.070

IIRC, BeyondCompare3 (and probably other diff tools as well) can diff folders/files and ignore comment and whitespace diffs.

– yhw42 – 2010-10-15T15:01:24.443

Answers

1

A couple of options: Eclipse, Notepad++, Dreamweaver. Notepad++ might be the easiest, cheapest approach. Here's a nice article showing Notepad++:

http://www.makeuseof.com/tag/how-to-find-and-replace-words-in-multiple-files/

Joshua

Posted 2010-10-15T14:39:47.697

Reputation: 4 290

I'm using Notepad++ at the moment but it only offers the ability replace a limited number of words - not a large block of text - as far as I have been able to tell. Your link also suggests as much. – marc – 2010-10-15T15:05:59.403

1@marc, you are incorrect. The text box where you enter text is small, but it will support as much as you can copy/paste into it. Poor UI but it does work. – Joshua – 2010-10-16T21:28:57.993

0

Ulta Edit has a replace in files. You could use that to remove the copy right. Also BeyondCompare is able to detect comments and ignore them when it does compares.

Nick

Posted 2010-10-15T14:39:47.697

Reputation: 365

Is the "replace in files" in UltraEdit for words or does it allow blocks of text? As I mentioned to Josh above, I'm using Notepad++ and it has this limiation. – marc – 2010-10-15T15:07:06.773

It appears to be blocks of text. – Nick – 2010-10-26T16:14:35.387