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