<?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 remove duplicates words?]]></title><description><![CDATA[<p dir="auto"><strong>example:</strong></p>
<pre><code>[Math+ Biology+ Chemistry+ History+ Chemistry+ Math+ Math]
</code></pre>
<p dir="auto"><strong>Output:</strong></p>
<pre><code>[Math+ Biology+ Chemistry+ History]
</code></pre>
<p dir="auto">there are multiple different words, It’s hard to delete the duplicates manually</p>
<p dir="auto"><strong>Also I tried this:</strong></p>
<pre><code>(\b\S+\b)(?=.*\b\1\b)
</code></pre>
<p dir="auto"><em>- But it’s keeping the plus symbol “+”</em></p>
]]></description><link>https://community.notepad-plus-plus.org/topic/24176/how-to-remove-duplicates-words</link><generator>RSS for Node</generator><lastBuildDate>Sun, 17 May 2026 18:44:58 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/24176.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 24 Feb 2023 12:46:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to remove duplicates words? on Sat, 25 Feb 2023 13:21:53 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">I’ve found out an <strong>interesting</strong> thing about posts which contains a <strong>literal</strong> <strong><code>[</code></strong> character in search <strong>regexes</strong> :</p>
<pre><code class="language-diff">\\[
</code></pre>
<p dir="auto">If you <strong>must</strong> edit one of these posts in order to change any <strong>other</strong> part, you’ll need to <strong>repeat</strong> the special <strong>modifications</strong>, regarding the <strong>regexes</strong>, by using, again, the syntax :</p>
<pre><code class="language-diff">\\\[
</code></pre>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/84419</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84419</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sat, 25 Feb 2023 13:21:53 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove duplicates words? on Sat, 25 Feb 2023 13:06:00 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 in <a href="/post/84417">How to remove duplicates words?</a>:</p>
<blockquote>
<p dir="auto">So, Alan, you can delete the EDIT  part of your last post !</p>
</blockquote>
<p dir="auto">It <em>ALREADY</em> never happened! :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/84418</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84418</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 25 Feb 2023 13:06:00 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove duplicates words? on Sat, 25 Feb 2023 13:03:55 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> and <strong>All</strong>,</p>
<p dir="auto"><strong>Sorry</strong> for the confusion !</p>
<p dir="auto">Thus, I replaced my search regex in its <strong>initial</strong> state</p>
<p dir="auto">And here is the <strong>right</strong> syntax that should be used :</p>
<ul>
<li>SEARCH <strong><code>(?xi-s) (?: \\[ | \+ ) \x20* ( [^+\r\n]+ ) (?= \x20* \+ .+ \1 )</code></strong><br />
BR</li>
</ul>
<p dir="auto">guy038</p>
<p dir="auto">So, <strong>Alan</strong>, you can delete the <strong>EDIT</strong>  part of your <strong>last</strong> post !</p>
]]></description><link>https://community.notepad-plus-plus.org/post/84417</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84417</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sat, 25 Feb 2023 13:03:55 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove duplicates words? on Sat, 25 Feb 2023 12:53:26 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 (?xi-s) (?: [ | + ) \x20* ( [^+\r\n]+ ) (?= \x20* + .+ \1 )</p>
</blockquote>
<p dir="auto">It looks suspiciously like the first <code>[</code> is a victim of this site losing the leading escape??</p>
]]></description><link>https://community.notepad-plus-plus.org/post/84415</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84415</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 25 Feb 2023 12:53:26 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove duplicates words? on Sat, 25 Feb 2023 12:44:31 GMT]]></title><description><![CDATA[<p dir="auto">Hello, @Bahaa-Eddin-ツ, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">@Bahaa-Eddin-ツ, I suppose that you were already <strong>successful</strong> with the <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> solution !</p>
<p dir="auto">However, here is a solution which just needs <strong>one</strong> <strong><code>Replace All</code></strong> action !</p>
<ul>
<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>(?xi-s) (?: \[ | \+ ) \x20* ( [^+\r\n]+ ) (?= \x20* \+ .+ \1 )</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
</li>
<li>
<p dir="auto">Check the <strong><code>Wrap around</code></strong> 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 ( or <strong>several</strong> times on the <strong><code>Replace</code></strong> button )</p>
</li>
</ul>
<hr />
<p dir="auto">So, for instance, from the <em>INPUT</em> text :</p>
<pre><code class="language-diff">[math part1+ Biology part1+ biology part3+ History part1+ Test N°1+ math part1+ Biology part3+ history part1+ Biology part3+ Biology part1+ test number 2+ math part1+ History part1]
</code></pre>
<p dir="auto">You should get this <em>OUTPUT</em> text :</p>
<pre><code class="language-diff">+ Test N°1+ Biology part3+ Biology part1+ test number 2+ math part1+ History part1]
</code></pre>
<hr />
<p dir="auto">Finally, just change the <strong>beginning</strong> of <strong>each</strong> section with this <strong>obvious</strong> regex S/R :</p>
<p dir="auto">SEARCH <strong><code>(?x) ^ \+ \x20*</code></strong></p>
<p dir="auto">REPLACE <strong><code>[</code></strong></p>
<p dir="auto">Best Regards</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/84414</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84414</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sat, 25 Feb 2023 12:44:31 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove duplicates words? on Fri, 24 Feb 2023 14:27:30 GMT]]></title><description><![CDATA[<p dir="auto">@Bahaa-Eddin-ツ</p>
<p dir="auto">I’d say, start from my kickstart attempt, and go from there.  Good luck.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/84403</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84403</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 24 Feb 2023 14:27:30 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove duplicates words? on Fri, 24 Feb 2023 14:23:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a><br />
I guess it’s not work as I wanted…<br />
because I didn’t add the right example</p>
<p dir="auto">this is what I want:<br />
example:</p>
<pre><code>[math part1 +Bilology part1+ biology part3+ History part1+ math part1+ Biology part3+ history part1]
</code></pre>
<p dir="auto">output:</p>
<pre><code>[Bilology part1+ History part1+ math part1+ Biology part3]
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/84402</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84402</guid><dc:creator><![CDATA[Bahaa0013]]></dc:creator><pubDate>Fri, 24 Feb 2023 14:23:05 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove duplicates words? on Fri, 24 Feb 2023 13:51:31 GMT]]></title><description><![CDATA[<p dir="auto">@Bahaa-Eddin-ツ said in <a href="/post/84397">How to remove duplicates words?</a>:</p>
<blockquote>
<p dir="auto">Thank you I guess it’s work…</p>
</blockquote>
<p dir="auto">Don’t guess…be sure…your data is important.</p>
<blockquote>
<p dir="auto">I have to run it at least 500 times to remove all the duplicated words xD</p>
</blockquote>
<p dir="auto">Hold down the keyboard accelerator for <em>Replace All</em> until the <em>Replace</em> window’s status bar indicates no more replacements were made?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/84399</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84399</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 24 Feb 2023 13:51:31 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove duplicates words? on Fri, 24 Feb 2023 13:49:52 GMT]]></title><description><![CDATA[<p dir="auto">@Bahaa-Eddin-ツ said in <a href="/post/84397">How to remove duplicates words?</a>:</p>
<blockquote>
<p dir="auto">I guess I have to run it at least 500 times</p>
</blockquote>
<p dir="auto">Record the search/replace as a macro, then use <strong>Macros &gt; Run a Macro Multiple Times</strong> to run it 500 (or whatever is necessary).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/84398</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84398</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 24 Feb 2023 13:49:52 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove duplicates words? on Fri, 24 Feb 2023 13:47:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a><br />
Thank you I guess it’s work…<br />
But I guess I have to run it at least 500 times to remove all the duplicated words xD</p>
<p dir="auto">but no problem I will use, it much easier, Thanks</p>
]]></description><link>https://community.notepad-plus-plus.org/post/84397</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84397</guid><dc:creator><![CDATA[Bahaa0013]]></dc:creator><pubDate>Fri, 24 Feb 2023 13:47:45 GMT</pubDate></item><item><title><![CDATA[Reply to How to remove duplicates words? on Fri, 24 Feb 2023 13:21:12 GMT]]></title><description><![CDATA[<p dir="auto">@Bahaa-Eddin-ツ</p>
<p dir="auto">It’s a bit of a tough one.<br />
Perhaps as a starting point, try fiddling with this:</p>
<p dir="auto">Find: <code>(?-s)^(.*?\b(\w+)\b.+?) \2\+?</code><br />
Replace: <code>${1}</code><br />
Search mode: Regular expression</p>
<p dir="auto">You’d have to run it several times, until no more replacements are made.</p>
<p dir="auto">And I just tried it quickly, so I’m sure some holes can be shot into it. :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/84396</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84396</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 24 Feb 2023 13:21:12 GMT</pubDate></item></channel></rss>