theoryla.blogg.se

Notepad++ regex loop
Notepad++ regex loop












Now, to match all complete non-empty lines which do NOT contain the expression, possibly preceded by some blank characters, with that exact case, use the regex : Remark : Of course, for correct testing of these regexes, just copy the text provided, in that way : TEST : I love you. | Lines Scanned | Regex A | Regex B | Regex C | Regex D | Regex E | In the table, below, the lines matched are noted with a X and therefore, will be deleted, if the Replace zone is empty Regex E : (?-is)^(?!^.+TEXT.+$).+\R matches any line which does NOT contain the string TEXT, NOT at line boundaries Regex D : (?-is)^(?!^TEXT|.*TEXT$).+\R matches any line which does NOT contain the string TEXT, at beginning OR at end of line

notepad++ regex loop

Regex C : (?-is)^(?!.*TEXT$).+\R matches any line which does NOT contain the string TEXT, at end of line Regex B : (?-is)^(?!^TEXT).+\R matches any line which does NOT contain the string TEXT, at beginning of line Regex A : (?-is)^(?!.*TEXT).+\R matches any line which does NOT contain the string TEXT

notepad++ regex loop

In order to match complete non-empty lines which do NOT contain a specific string, let’s say, the word TEXT, with that exact case, here are, below, 5 regexes :














Notepad++ regex loop