How do I delete specific lines in Notepad++?

前端 未结 8 1406
太阳男子
太阳男子 2020-11-28 19:52

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

相关标签:
8条回答
  • 2020-11-28 20:43

    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.

    0 讨论(0)
  • 2020-11-28 20:45

    Investigate what is your EOL, \n or \r\n. Then replace .*#region.*\r\n with nothing in regexpr mode.

    0 讨论(0)
提交回复
热议问题