<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Subtractive searching.]]></title><description><![CDATA[<p dir="auto">I’m looking for a way to perform the following when using notepad++ to search logs.</p>
<p dir="auto">Lets say I open a log and am searching for the word DELETE, now from those results I wish to exclude any lines with the word SYSTEM. Is there an easy way to do this?</p>
<p dir="auto">My current workaround is to search for the term I want. Copy the results into a new page, search for the term I don’t want, bookmark those lines, then remove the bookmarked lines. While this method works, it’s extremely tedious.</p>
<p dir="auto">I’ve tried looking for ways to do this with regex but I’m terrible at it. Any suggestions would greatly help.</p>
<p dir="auto">Thanks!!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/22162/subtractive-searching</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 16:23:38 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/22162.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 19 Nov 2021 19:31:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Subtractive searching. on Sat, 20 Nov 2021 18:56:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a></p>
<p dir="auto">This is great, thank you very much</p>
]]></description><link>https://community.notepad-plus-plus.org/post/71465</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/71465</guid><dc:creator><![CDATA[Steve Hajdu]]></dc:creator><pubDate>Sat, 20 Nov 2021 18:56:27 GMT</pubDate></item><item><title><![CDATA[Reply to Subtractive searching. on Fri, 19 Nov 2021 19:48:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/steve-hajdu" aria-label="Profile: steve-hajdu">@<bdi>steve-hajdu</bdi></a> ,</p>
<p dir="auto">What you want are <a href="https://npp-user-manual.org/docs/searching/#assertions" rel="nofollow ugc">lookahead expressions</a> – positive for the match, and negative for the do-not-match.</p>
<p dir="auto"><code>(?-s)^(?=.*\bDELETE\b)(?!.*\bSYSTEM\b).*$</code> will match lines that contain DELETE but do not contain SYSTEM, in either order, possibly with text between</p>
<p dir="auto"><img src="/assets/uploads/files/1637351175816-23539891-0df4-4f7c-a937-7ae073f31a1d-image.png" alt="23539891-0df4-4f7c-a937-7ae073f31a1d-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I used a positive lookahead to match anything followed by the whole word <code>DELETE</code>, and a negative lookahead to exclude anything that matches anything followed by the whole word <code>SYSTEM</code>.  I then do the <code>.*$</code> at the end to make it select the whole line that contains DELETE without SYSTEM</p>
]]></description><link>https://community.notepad-plus-plus.org/post/71447</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/71447</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 19 Nov 2021 19:48:31 GMT</pubDate></item></channel></rss>