<?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[Find only the duplicate value]]></title><description><![CDATA[<p dir="auto">Hey. I want to find the duplicate value and to copy those duplicate values.</p>
<p dir="auto">Eg:<br />
Input:<br />
New York<br />
Dubai<br />
Japan<br />
France<br />
New York<br />
Qatar<br />
Japan</p>
<p dir="auto">Output:<br />
New York<br />
Japan</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/16669/find-only-the-duplicate-value</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Nov 2026 01:14:26 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/16669.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 21 Nov 2018 11:19:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Find only the duplicate value on Thu, 22 Nov 2018 21:41:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/antonsta" aria-label="Profile: Antonsta">@<bdi>Antonsta</bdi></a><br />
Unfortunately, even when the data is sorted, as you found out the regex still caused the same issue. That’s because it’s still trying to search forward over multiple line.</p>
<p dir="auto">When the data is sorted this isn’t necessary anymore as duplicates will appear on consecutive lines.</p>
<p dir="auto">Thus the regex can be changed to:<br />
<code>(?-is)^(.+)\R\K(\1$)</code></p>
<p dir="auto">So this will ONLY look for 2 lines together with the same data. The use of the \K is to forget the first line so the line that gets marked is the duplicate line ONLY.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> gave a detailed rundown on this issue and ways to circumvent it. Have a look at:<br />
<a href="https://notepad-plus-plus.org/community/topic/16489/delete-both-duplicates-regexp-macro/15?page=1" rel="nofollow ugc">https://notepad-plus-plus.org/community/topic/16489/delete-both-duplicates-regexp-macro/15?page=1</a></p>
<p dir="auto">Cheers<br />
Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/36708</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/36708</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Thu, 22 Nov 2018 21:41:09 GMT</pubDate></item><item><title><![CDATA[Reply to Find only the duplicate value on Wed, 21 Nov 2018 15:19:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a> said:</p>
<blockquote>
<p dir="auto">What if you try sorting your data first?</p>
</blockquote>
<p dir="auto">Yes, Sorted it and tried again. Still, it’s marking the entire document :(<br />
Is there any plugins that can do this? :((</p>
]]></description><link>https://community.notepad-plus-plus.org/post/36654</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/36654</guid><dc:creator><![CDATA[Antonsta]]></dc:creator><pubDate>Wed, 21 Nov 2018 15:19:46 GMT</pubDate></item><item><title><![CDATA[Reply to Find only the duplicate value on Wed, 21 Nov 2018 15:10:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/antonsta" aria-label="Profile: Antonsta">@<bdi>Antonsta</bdi></a> said:</p>
<blockquote>
<p dir="auto">It’s marking the entire document</p>
</blockquote>
<p dir="auto">Yea, sometimes with a lot of data (I’m looking at your line numbers) the search/mark engine gets overwhelmed and chokes!  :(</p>
<p dir="auto">What if you try sorting your data first?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/36653</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/36653</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Wed, 21 Nov 2018 15:10:05 GMT</pubDate></item><item><title><![CDATA[Reply to Find only the duplicate value on Wed, 21 Nov 2018 14:32:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a> said:<br />
I think I was misquoted!!! :-D<br />
Yeah, I guessed it :)<br />
But, It’s not working properly? It’s marking the entire document :(<br />
Check out the  <a href="https://prnt.sc/ll64po" rel="nofollow ugc">screenshot</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/36651</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/36651</guid><dc:creator><![CDATA[Antonsta]]></dc:creator><pubDate>Wed, 21 Nov 2018 14:32:56 GMT</pubDate></item><item><title><![CDATA[Reply to Find only the duplicate value on Wed, 21 Nov 2018 14:12:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/antonsta" aria-label="Profile: Antonsta">@<bdi>Antonsta</bdi></a></p>
<p dir="auto">I think I was misquoted!!!  :-D</p>
<p dir="auto">It would be <strong>Bookmark line</strong> in your case…it really seems that you might have guessed that or even tried it before posting.  :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/36648</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/36648</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Wed, 21 Nov 2018 14:12:31 GMT</pubDate></item><item><title><![CDATA[Reply to Find only the duplicate value on Wed, 21 Nov 2018 14:09:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a> said:</p>
<blockquote>
<p dir="auto">Action<br />
Hey,</p>
</blockquote>
<p dir="auto">I’m not having the “Mark line” option. Here’s the  <a href="https://prnt.sc/ll5r7u" rel="nofollow ugc">screenshot</a>. I’m using 7.6 version.</p>
<p dir="auto">Thanks alot for replying</p>
]]></description><link>https://community.notepad-plus-plus.org/post/36647</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/36647</guid><dc:creator><![CDATA[Antonsta]]></dc:creator><pubDate>Wed, 21 Nov 2018 14:09:49 GMT</pubDate></item><item><title><![CDATA[Reply to Find only the duplicate value on Wed, 21 Nov 2018 13:24:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/antonsta" aria-label="Profile: Antonsta">@<bdi>Antonsta</bdi></a></p>
<p dir="auto">Here’s a possible way to do it:</p>
<p dir="auto">Invoke <strong>Mark</strong> dialog (<strong>Search</strong> (menu) -&gt; <strong>Mark…</strong>) &lt;–Suggestion: Tie ctrl+m to this action<br />
<strong>Find what</strong> zone: <code>(?-is)^(.+)(?s)(?=.*?^\1$)</code><br />
<strong>Wrap around</strong> checkbox: ticked<br />
<strong>Mark line</strong> checkbox: ticked<br />
<strong>Match whole word only</strong> checkbox: unticked<br />
Action: Press the <strong>Find All</strong> button</p>
<p dir="auto">Next invoke <strong>Search</strong> (menu) -&gt; <strong>Bookmark</strong> -&gt; <strong>Copy Bookmarked Lines</strong></p>
]]></description><link>https://community.notepad-plus-plus.org/post/36643</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/36643</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Wed, 21 Nov 2018 13:24:32 GMT</pubDate></item></channel></rss>