How to Delete a Line in a Text File if It Contains the Search Query?

This is where I have reached till now:

This line that contains the name of the macro (%ExecutingMacro%), also have some details about the macro. I want to delete the name as well as the details. All of these are in a single line.

How to achieve that?

Post your macro along with an example of the kind of text you're intending to process.