<?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[How to delete blocks of simmilar text which doesn&#x27;t contain a specific word?]]></title><description><![CDATA[<p dir="auto">Fellow Notepad++ Users,</p>
<p dir="auto">Could you please help me with the following search-and-replace problem I am having?</p>
<p dir="auto">I have a large txt file which contains blocks of very similar text (blocks begin and end with same words), and I would like to delete those blocks that doesn’t contain a specific word. Or select and then copy into a new file those blocks which contain the desired word.</p>
<p dir="auto">I dont know how to make notepad++ recognize these blocks of similar text as separate entities in the same file.<br />
Is it possible to do?</p>
<p dir="auto">I am using the latest version of this software.</p>
<p dir="auto">Thanks a lot</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/24716/how-to-delete-blocks-of-simmilar-text-which-doesn-t-contain-a-specific-word</link><generator>RSS for Node</generator><lastBuildDate>Wed, 17 Jun 2026 00:21:32 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/24716.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 16 Jul 2023 01:43:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to delete blocks of simmilar text which doesn&#x27;t contain a specific word? on Wed, 08 Nov 2023 13:15:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> said :</p>
<blockquote>
<p dir="auto">SEARCH <code>(?s-i)^\h*BEGIN_BOUNDARY((?!ABSENT_WORD).)+?END_BOUNDARY.*?$\R</code></p>
</blockquote>
<p dir="auto">Maybe this is better without capturing into group1?, i.e. :</p>
<p dir="auto">SEARCH <code>(?s-i)^\h*BEGIN_BOUNDARY(?:(?!ABSENT_WORD).)+?END_BOUNDARY.*?$\R</code></p>
<p dir="auto">Also, OP said nothing about what comes before the word that begins the block nor what comes after the word that ends the block (assumption is the begin-word and the end-word are <em>different</em>) so thus maybe this is an even better expression:</p>
<p dir="auto">SEARCH <code>(?s-i)BEGIN_BOUNDARY(?:(?!ABSENT_WORD).)+?END_BOUNDARY</code></p>
<p dir="auto">It’s a pity the OP never returned to either provide more specifics (and sample data) or to say whether or not the originally proposed solution was successful.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90337</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90337</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 08 Nov 2023 13:15:57 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete blocks of simmilar text which doesn&#x27;t contain a specific word? on Sun, 16 Jul 2023 14:12:34 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/veruc-w" aria-label="Profile: veruc-w">@<bdi>veruc-w</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/lycan-thrope" aria-label="Profile: lycan-thrope">@<bdi>lycan-thrope</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">In addition to <a class="plugin-mentions-user plugin-mentions-a" href="/user/lycan-thrope" aria-label="Profile: lycan-thrope">@<bdi>lycan-thrope</bdi></a>’s <strong>advice</strong>, just one <strong>hint</strong> to begin with.</p>
<p dir="auto">Simply <strong>replace</strong> the zones <strong><code>BEGIN_BOUNDARY</code></strong> and <strong><code>END_BOUNDARY</code></strong> with your <strong>current</strong> boundaries and the string <strong><code>ABSENT_WORD</code></strong> with the <strong>word</strong> which must <strong>not</strong> be <strong>included</strong> into the blocks to <strong>delete</strong></p>
<p dir="auto">Then, follow the <strong>steps</strong> below :</p>
<hr />
<ul>
<li>
<p dir="auto"><strong>Start</strong> <strong><code>N++</code></strong> and <strong>select</strong> the tab or <strong>open</strong> your file</p>
</li>
<li>
<p dir="auto">Open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</p>
</li>
<li>
<p dir="auto"><strong>Untick</strong> all <strong>box</strong> options</p>
</li>
<li>
<p dir="auto">SEARCH <strong><code>(?s-i)^\h*BEGIN_BOUNDARY((?!ABSENT_WORD).)+?END_BOUNDARY.*?$\R</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
</li>
<li>
<p dir="auto"><strong>Check</strong> the <strong><code>Wrap around</code></strong> box option</p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search <strong>mode</strong></p>
</li>
<li>
<p dir="auto">Click, <strong>once</strong> only, on the <strong><code>Replace All</code></strong> button</p>
</li>
</ul>
<p dir="auto">Here you are !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/87959</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/87959</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 16 Jul 2023 14:12:34 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete blocks of simmilar text which doesn&#x27;t contain a specific word? on Sun, 16 Jul 2023 06:09:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/veruc-w" aria-label="Profile: veruc-w">@<bdi>veruc-w</bdi></a> ,</p>
<p dir="auto">Start off by reading the FAQ’s about how to use these forums and the markup language to describe and show your problem, and then read the FAQ on how to use Regex and the Search and Replace capability of Notepad++.  This isn’t a mind reading forum, nor is this a one stop answering service for your vague descriptions. We are users helping users, not doing their work for them.  Start here by reading the <a href="https://npp-user-manual.org/" rel="nofollow ugc">Online User Manual</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/87954</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/87954</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Sun, 16 Jul 2023 06:09:06 GMT</pubDate></item></channel></rss>