This is a known limitation of the search and replace engine of PSPad - multiline search is not really supported. You can try an addon: phReplace - A Multiline Search / Replace for PSPad http://forum.pspad.com/read.php?2,34061#msg-34061 (I haven't tested such huge replacements yet, but hopefully it can be done...)
-- <http://forum.pspad.com/read.php?2,38647,38648> PSPad freeware editor http://www.pspad.com
