Hello there,
I am stuck on a regex problem;
tried looking into regex testers online.
It looks like it should work, but it doesn't? (burnt out
)
Anyways, any/all help would be appreciated y'all π
Problem :
I am trying to replace certain parts
in a (multi-line) string that don't contain the sequence MK.
parts are separated by a string,
for now; lets say it's BBBB
Context :
"sample" text -
some random text
BBBB
abcdefg
*MK*
xyz
BBBB
more text
BBBB
*MK*
xyz
transforms into β
[Removed Text]
abcdefg
*MK*
xyz
[Removed Text]
*MK*
xyz
Attempt/s :
I've attempted using negative lookahead, but to no avail.
"B+(?!MK)[^B]+B*"
"(?!MK)B+.+?B*"
"B+[^B]+B*(?<!MK)"