I am looking for a gratis, Windows-based, text search and replace application which will allow me to make the following kinds of replacement, allowing me to specify file extensions and giving the option to process a directory tree.
Let’s say I have lots of PHP code which says, on two consecutive lines:
echo(“Some message”);
Die();
and I would like to replace all such occurrences with a single line call to a new function:
EchoMessageAndDie(“Some message”);
Is that clear enough? Please feel free to ask me to explain. It seems like some sort of templating would be necessary to define the various parts of the search/replace strings.
Multiple lines would be a bonus, rather than just two, if possible. Standard search/replace options such as case sensitivity, whole words, etc would also be welcome. In fact, the more features the better, so long as it is gratis, for Windows and can make replacements such as the example given.
[Update] my bad. I forgot to state that I need this to operate on all files in a given directory tree.