Total Commander, Notepad2, Notepad++ & regular expression negative lookahead (lookarounds)
I actually wrote this post for myself so that I don’t waste time next time. Occasionally, there’s a need to perform a search using a regular expression and, for example, a negative lookahead. Let’s say you need to find a string where "ID " is not immediately followed by "777" or "888". A regular expression using a negative lookahead would look like this: "ID (?!777|888)" (without quotes). However, neither the TRegExpr library used by the author of Total Commander nor Notepad2, which I use by default as a simple text editor, support lookarounds. In such cases, Notepad++ comes to the rescue, as it does support this functionality.
Comments
Post a Comment