1
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. :)
Can you give us a little more info? What type of files; text, Word, HTML? How many files are you talking about? – CharlieRB – 2012-02-27T13:35:39.283
@CharlieRB typical source file, complex copyright notice and other metadata, number of files I'd say hundreds – srcspider – 2012-02-27T13:38:16.347
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 – 2012-02-27T13:42:23.223@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 – 2012-02-27T13:51:31.757
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. :) – Ƭᴇcʜιᴇ007 – 2012-02-27T13:54:23.457
@techie007 What do I do for the replacement where I can't insert line breaks? – srcspider – 2012-02-27T13:55:23.767
possible duplicate of Text editor on Windows to delete large block of copyright text in multiple source files?
– Ƭᴇcʜιᴇ007 – 2012-02-27T13:56:20.507Insert them? "^M" "\r\n" etc., depending on what the editor supports. If your question is "How do I insert Line Breaks in Notepad++'s Replace?", that's a different question. :) – Ƭᴇcʜιᴇ007 – 2012-02-27T13:57:42.457
You do realize this is free help, right? Those who choose to help answer your question offer suggestions asking nothing in return. There is no guarantee the answers you get will be proper solution right from the start. You say you've tried several ways. How do I know what you've tried. [Edit] your question with what you've tried and those who read it will not have to ask you. – CharlieRB – 2012-02-27T14:00:06.213
@techie007 I'm not deleting, I'm replacing so it's not a duplicate. I've re-tested with extended and \n and this time it seems to work... dunno what happened last time it didn't replace properly. Thx. – srcspider – 2012-02-27T14:09:12.267
@CharlieRB until retesting it as far as I was aware that was one of the wrong answer (ie. didn't work) so I saw no point in mentioning such things (and still don't). Dunno why you're so angry about it. In any case, resolved. – srcspider – 2012-02-27T14:12:05.163