Regular expression to delete the entire block containing this word
P粉198814372
P粉198814372 2024-02-26 19:35:26
0
1
325

myzol \s (.*)-[0-9] \s\{[\mrzulf\](.*?)\}
The lines
here is me
you are there
my fav

gvt
hjk hlkjhf c

myzol 123gbhj {
    test
    check myself/mrzulf/.com
}

myzol 123gbhj {
    test
    check myself/mrzulf/.com
}

myzol 1fde3gbhj {
    test
    check myself/check/.com
}

myzol 12ecehj {
    test
    check myself/mrzulf/.com
}

myzol 1evehj {
    test
    check myself/check/.com
}

Here I have to remove the block containing mrzulf I have to replace it with blank.

P粉198814372
P粉198814372

reply all(1)
P粉466909449

There are no - in the example strings, and not all examples end with a number before curling, like the pattern [0-9] \s\{

You can match:

\bmyzol\s [^{]*{[^{}]*\bmrzulf\b[^{}]*}

and replace it with an empty string.

Regular expression demonstration

If there should be spaces and word characters before the starting {, then if you don't want to match newlines before the starting {:

\bmyzol\h \w \h {[^{}]*\bmrzulf\b[^{}]*}

Regular expression demonstration

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template