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

closed as off-topic by random Aug 26 '16 at 3:39

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – random
If this question can be reworded to fit the rules in the help center, please edit the question.

  • IIRC, BeyondCompare3 (and probably other diff tools as well) can diff folders/files and ignore comment and whitespace diffs. – yhw42 Oct 15 '10 at 15:01
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/

  • 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 Oct 15 '10 at 15:05
  • 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 Oct 16 '10 at 21:28
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.

  • 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 Oct 15 '10 at 15:07
  • It appears to be blocks of text. – Nick Oct 26 '10 at 16:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.