Hello, @meтe-ялчынкая and All,
Very easy with regular expressions or bookmarks !
A) With bookmarks :
Open the Mark dialog ( Ctrl + M )
SEARCH #
Untick all the options
Tick the Bookmark line option
Tick the Wrap around option
Click on the Mark All button
Then, run the menu option Search > Bookmark > Remove Bookmarked Lines
B) With regular expressions ( faster ! )
Open the Replace dialog ( Ctrl + H )
SEARCH (?-s)^.*#.*\R
REPLACE Leave EMPTY
Untick all the options
Tick the Wrap around option
Click on the Replace All button
The search regex searches, from beginning of line ( ^ ) for any range of standard characters, even none ( .* ), followed with a # char, and again, with any range of standard characters, even none( .* ), till the EOL characters of current line ( \R )
Best regards
guy038