Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a FREE utility out there for replacing blocks of text?

Something like notepad++'s find in files works for simple lines but in my case it's unusable since I need to target the entire block to avoid replacing the wrong thing and I also need to replace it with another block.

I've searched for similar questions but all seem to deal with line replacing not block replacing. :)

share|improve this question

closed as not a real question by Nifle, ChrisF, soandos, Synetech, HackToHell Nov 18 '12 at 14:53

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Can you give us a little more info? What type of files; text, Word, HTML? How many files are you talking about? –  CharlieRB Feb 27 '12 at 13:35
    
@CharlieRB typical source file, complex copyright notice and other metadata, number of files I'd say hundreds –  srcspider Feb 27 '12 at 13:38
1  
There is an answer to this here. Please read the comments to get the explanation for notepad++ ability to do this. This is the same for replacing text. –  CharlieRB Feb 27 '12 at 13:42
    
@CharlieRB that won't work, I need block replace and while notepad++ can get some sort of block replace though regular expression converting the actual block to a regular expression is a pain in the ass and on top of that notepad++ doesn't have support for the actual replacement text being a block; I've tryied several ways of doing it with it, doesn't work. Both the replaced and the new text are BLOCKS. –  srcspider Feb 27 '12 at 13:51
    
Can you define what a "Block" of text is to you? To me, a block of text is just a group of sequential lines (and line-breaks). You may just have to sit down and write that "pain in the ass" RegEx. :) –  techie007 Feb 27 '12 at 13:54
show 6 more comments

2 Answers

A google search for "replace in files" lead me to a couple good looking solutions

http://www.emurasoft.com/replall/ http://www.ultraedit.com/support/tutorials_power_tips/ultraedit/find_replace.html

I also recall windows grep doing this - http://www.wingrep.com/ though I don't have it installed at the moment.

share|improve this answer
    
replall is "per line" not "per block" wingrep is "per line" as well; pretty sure ultraedit was too –  srcspider Feb 27 '12 at 13:22
    
I know wingrep will do multiline, and I'm pretty sure ultraedit will too. You should be able to copy paste into the box. Worst case scenario you can use \n's to represent newlines. –  Jody Feb 27 '12 at 14:38
    
managed to get it working from the discussion in the comments on the question. But thanks anyway! :) –  srcspider Feb 27 '12 at 18:15
add comment

Try EditPad Lite. It has multiple line functionality.

share|improve this answer
    
-1 he said MULTIPLE FILES. (not just multiple lines) Powergrep(also by JGsoft) would do it. I'm pretty sure that Editpad won't. Editpad is for individual files.. and is fantastic for it. Powergrep would do multiple. I doubt powergrep has a free version though. –  barlop Feb 22 at 20:17
add comment

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