Is there a way to delete all comments in a file using Notepad++?

后端 未结 9 2065
清歌不尽
清歌不尽 2020-12-13 04:40

Notepad++ obviously recognizes all comments as such. Is there a way to simply delete all?

Edit: Stat-R\'s bookmark method has helped greatly, not on

9条回答
  •  伪装坚强ぢ
    2020-12-13 05:13

    To remove Powershell comments if someone find it handy:

    Removing Comment in a Powershell using Notepad ++ To find just lines beginning with # (and not with # elsewhere in the line).

    1. Notepad++ SEARCH Menu > Find
    2. ‘Mark‘ Tab – fill in as below.
    3. Select ‘Mark All’ (clear all marks if used previously).

    Regex ^[#}

    enter image description here

    1. SEARCH Menu > bookmark > Remove (or do anything on the list with them)
    2. Clear all marks to reset

    You can select no comments just code by doing the following:

    Regex ^[^#}

    enter image description here

提交回复
热议问题