Reputation: 781
Using Pycharm, I want to delete all lines that have a specific word. Does someone know how we can do that?
Upvotes: 2
Views: 957
Reputation: 1
Search the particular word (Ctrl+F) and Ctrl+Alt+Shift+J select the whole line using arrow then delete.
Upvotes: 0
Reputation: 8610
Use replace feature with regex (e.g. ^.*hello.*$\n
) to match the whole line (and \n
) containing a word and replace it with nothing:
Upvotes: 4