I\'m cleaning up some code files (C#) and want to remove the regions. And I would like to delete all the lines that have the string \'#region\'. That\'s just an example, and
You can use menu Search -> Replace... (Ctrl + H).
It has a regular expression feature for replacing. You can use a regex that matches #region as well as whatever else is on the line, and replace it with empty space.
Investigate what is your EOL, \n or \r\n. Then replace .*#region.*\r\n
with nothing in regexpr mode.