regex – Regular expression negative lookbehind for two strings getting looped continuously

I was trying to use Notepad++ to skip two strings before a particular string using the regular expression negative lookbehind for two strings for this block but failed to:-


some text here

some text here

some text here

some text here

some text here

Then, the Regular expression ((?:

]*?color: black.*?>[\S\s\n]*?<\/p>\s*]*>)|(?:]*?color: black.*?>[\S\s\n]*? helped find what I wanted (after skipping some strings), in the opened, current file but not in all the files of a folder, probably because it is getting into a continuous loop. How to avoid it from getting into a loop?
I get an, "Invalid Regular expression" error if I try to find this or replace this in multiple files of a folder; then on clicking the [...] icon next to it, I am getting this message: "The complexity of matching the regular expression exceeded predefined bounds. Try refactoring the regular expression to make each choice made by the state machine unambiguous. This exception is thrown to prevent eternal matches that take an indefinite period time to locate."

Read more here: Source link