How to delete a line ( and also the next line) that contains a specific word ?
-
**Let’s say for example we have this text and I want to delete every line that containts" delete me " and also the next line **
a random text here1111
a random text here2222
a random text here delete me3333
a random text here 4444
delete me a random text here5555
a randomtext66666**So after applying what I want , the text is gonna be like this : **
a random text here1111
a random text here2222 -
@Life’s-Hacks.
Something like this could work:
Find-what zone:
(?-s)^.*?delete me.*\R.*\R
Replace-with zone: make sure this is EMPTY
Wrap-around checkbox: ticked
Search-mode:Regular expression
Action: Press Replace All button
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login