<?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[Need a copy of the red marked regions, after a "Mark All" operation]]></title><description><![CDATA[[[topic:post-is-deleted]]]]></description><link>https://community.notepad-plus-plus.org/topic/19189/need-a-copy-of-the-red-marked-regions-after-a-mark-all-operation</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 06:47:32 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/19189.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 09 Apr 2020 17:47:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Need a copy of the red marked regions, after a "Mark All" operation on Thu, 09 Apr 2020 21:40:59 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></p>
<blockquote>
<p dir="auto">in case of overlapping matches</p>
</blockquote>
<p dir="auto">Well, I meant non-overlapping matches of course.  Often while marking data it is simpler to come up with 3 or 4 successive marking operations on <em>different</em> data in order to capture everything you want; coming up with one regex, while perhaps an interesting exercise, would likely be distracting from your at-hand task.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52358</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52358</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 09 Apr 2020 21:40:59 GMT</pubDate></item><item><title><![CDATA[Reply to Need a copy of the red marked regions, after a "Mark All" operation on Thu, 09 Apr 2020 21:26:22 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>, <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">I don"t know if it would be <strong>fair</strong> to go against the <strong>will</strong> of the OP, but but I’ve come up with a <strong>compromise</strong> :</p>
<p dir="auto">I changed the <strong>intial</strong> title <strong><code>Need a copy marked lines feature</code></strong></p>
<p dir="auto">with this <strong>new</strong> title <strong><code>Need a copy of the red marked regions, after a "Mark All" operation</code></strong></p>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52357</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52357</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 09 Apr 2020 21:26:22 GMT</pubDate></item><item><title><![CDATA[Reply to Need a copy of the red marked regions, after a "Mark All" operation on Thu, 09 Apr 2020 21:33:37 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>, <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">I would say that, when running <strong>successive mark</strong> processes, each method has <strong>advantages</strong> and <strong>drawbacks</strong> !</p>
<ul>
<li>
<p dir="auto">The <strong>script</strong> solution keep the natural <strong>order</strong> of lines of the file and will be more <strong>compact</strong>, as a <strong>single</strong> line is created, in case of <strong>overlapping</strong> matches of the different <strong>regexes</strong> !</p>
</li>
<li>
<p dir="auto">The <strong>regex</strong> solution does <strong>not</strong> keep the order of the lines, but <strong>better</strong> distinguishes the matches of <strong>each</strong> regex, in case of <strong>overlapping</strong> matches, as a line is created for <strong>each</strong> match</p>
</li>
</ul>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52356</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52356</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 09 Apr 2020 21:33:37 GMT</pubDate></item><item><title><![CDATA[Reply to Need a copy of the red marked regions, after a "Mark All" operation on Thu, 09 Apr 2020 20:51:44 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> said in <a href="/post/52353">Need a copy marked lines feature</a>:</p>
<blockquote>
<p dir="auto">I see you’re running off in a huff, deleting your post.  That is poor behavior in any forum anywhere.</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> , as an admin, should restore the original post for any future readers/searchers?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52355</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52355</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 09 Apr 2020 20:51:44 GMT</pubDate></item><item><title><![CDATA[Reply to Need a copy of the red marked regions, after a "Mark All" operation on Thu, 09 Apr 2020 20:47:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ryszard-adamus" aria-label="Profile: Ryszard-Adamus">@<bdi>Ryszard-Adamus</bdi></a> said in <a href="/post/52347">Need a copy marked lines feature</a>:</p>
<blockquote>
<p dir="auto">The regexp solution on that thread was for specific case, not universal</p>
</blockquote>
<p dir="auto">You read the wrong post then, or misunderstood the post you did read.  I didn’t say anything about regex, and neither did the post I linked.</p>
<p dir="auto">The post I was referring to is <a href="https://community.notepad-plus-plus.org/post/24733">https://community.notepad-plus-plus.org/post/24733</a>, which as Guy said could also be linked as <a href="https://community.notepad-plus-plus.org/topic/12710/marked-text-manipulation/18">https://community.notepad-plus-plus.org/topic/12710/marked-text-manipulation/18</a>, by <a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a> on<br />
May 31, 2017 at 12:19PM (might be timzone adjusted for you), with the text “So here is <a href="http://RedmarkedTextToClipboard2.py" rel="nofollow ugc">RedmarkedTextToClipboard2.py</a>:”, followed by Python code.</p>
<p dir="auto">The script assumes you have <em>already</em> marked your text from the <strong>Find &gt; Mark</strong> dialog; the script searches the document for all the marked text, and adds all that text into the copy buffer.  That’s exactly the procedure you described.</p>
<p dir="auto">I was about to explain the steps involved in installing PythonScript and running the described script, but …</p>
<h1>How Rude</h1>
<p dir="auto">… but now I see you’re running off in a huff, deleting your post.  That is poor behavior in any forum anywhere.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52353</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52353</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 09 Apr 2020 20:47:25 GMT</pubDate></item><item><title><![CDATA[Reply to Need a copy of the red marked regions, after a "Mark All" operation on Thu, 09 Apr 2020 20:43:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ryszard-adamus" aria-label="Profile: Ryszard-Adamus">@<bdi>Ryszard-Adamus</bdi></a> said in <a href="/post/52347">Need a copy marked lines feature</a>:</p>
<blockquote>
<p dir="auto">The regexp solution on that thread was for specific case, not universal.</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> gives a “universal” solution above.</p>
<blockquote>
<p dir="auto">The python is even worse for me.</p>
</blockquote>
<p dir="auto">Because you don’t want to try it?</p>
<p dir="auto">The Pythonscript may have an advantage in that if you want to redmark a bunch of different regular expression hits, you can do so, and then when you’re all done, you can run the script and copy ALL of the hits that it took you several marking operations to do.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52351</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52351</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 09 Apr 2020 20:43:45 GMT</pubDate></item><item><title><![CDATA[Reply to Need a copy of the red marked regions, after a "Mark All" operation on Thu, 09 Apr 2020 20:21:18 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/ryszard-adamus" aria-label="Profile: ryszard-adamus">@<bdi>ryszard-adamus</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">In order to <strong>only</strong> get the <strong>marked</strong> ranges, with the <strong>red</strong> highlighting, you could either :</p>
<ul>
<li>Use the <strong>Python</strong> <a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: scott-sumner">@<bdi>scott-sumner</bdi></a>’s script    <a href="https://community.notepad-plus-plus.org/topic/12710/marked-text-manipulation/28">https://community.notepad-plus-plus.org/topic/12710/marked-text-manipulation/28</a></li>
</ul>
<p dir="auto">OR</p>
<ul>
<li>
<p dir="auto">Use the following <strong>regex</strong> S/R :</p>
<ul>
<li>
<p dir="auto">SEARCH <strong><code>(?s-i).*?(</code>Your regex<code>)|(?s).*\z</code></strong> ( or <strong><code>(?si).*?(</code>Your regex<code>)|(?s).*\z</code></strong> for <strong>insensitive to case</strong> search )</p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>?1\1\r\n</code></strong></p>
</li>
</ul>
</li>
</ul>
<p dir="auto">This post is an <strong>update</strong> of this <strong>old</strong> post    <a href="https://community.notepad-plus-plus.org/topic/12710/marked-text-manipulation/8">https://community.notepad-plus-plus.org/topic/12710/marked-text-manipulation/8</a></p>
<hr />
<p dir="auto"><strong>IMPORTANT</strong> :</p>
<ul>
<li>
<p dir="auto">Replace the expression <strong>Your regex</strong> by the <strong><code>string</code></strong>, the <strong><code>expression</code></strong> or the <strong><code>regex expression</code></strong> that you would have used, normally, in the <strong><code>Mark</code></strong> dialog</p>
</li>
<li>
<p dir="auto">If you regex contains the <strong>dot</strong> symbol and tries to match text, in a <strong>single</strong> line, only, you <strong>MUST</strong> add the negative modifier <strong><code>(?-s)</code></strong>, <strong>BEFORE</strong> your regex, in order to <strong>stop</strong> the action of the <strong><code>(?s)</code></strong> modifier, located at <strong>beginning</strong> of the <strong>overall</strong> regex !</p>
</li>
</ul>
<hr />
<p dir="auto"><strong>NOTES</strong> :</p>
<ul>
<li>
<p dir="auto">The <strong>first</strong> part <strong><code>(?s-i).*?</code></strong> matches the <strong>shortest</strong> range of characters, even <strong>null</strong> or on <strong>multi</strong>-lines, till the text that <strong>YOUR</strong> regex matches</p>
</li>
<li>
<p dir="auto">The second part <strong><code>(Your regex)</code></strong>, enclosed in <strong>round brackets</strong>, is the range of text, matched by <strong>YOUR</strong> regex, with the <strong>exact</strong> case, which is stored as <strong>group 1</strong></p>
</li>
<li>
<p dir="auto">The <strong>third</strong> and final part <strong><code>|(?s).*\z</code></strong> is a <strong>second</strong> alternative, which matches <strong>all</strong> the <strong>remaining</strong> text, even <strong>null</strong>, till the <strong>very end</strong> of the current file, when the <strong>first</strong> alternative <strong>cannot</strong> be matched, anymore !</p>
</li>
<li>
<p dir="auto">In replacement, if <strong>group 1</strong> exists ( <strong>first</strong> alternative ) this group is <strong>re-written</strong>, followed by a <strong>line break</strong> ( <strong><code>\r\n</code></strong> )</p>
</li>
<li>
<p dir="auto">If <strong>group 1</strong> does <strong>not</strong> exist ( case of the <strong>second</strong> alternative ), nothing occurs. So, as expected, the <strong>remaining</strong> text is, then, <strong>deleted</strong></p>
</li>
</ul>
<hr />
<p dir="auto"><strong>EXAMPLE</strong> :</p>
<ul>
<li>
<p dir="auto">In the <strong>license.txt</strong> file, let suppose that you would like to <strong>extract</strong> all the <strong>longest single</strong>-line strings, matched by the regex <strong><code>(a.*j)</code></strong>, in an <strong>insensitive</strong> way  <strong><code>(?i)</code></strong></p>
</li>
<li>
<p dir="auto">Open the <strong><code>license.txt</code></strong> file</p>
</li>
<li>
<p dir="auto">Iniitially, you would have <strong>marked</strong> these ranges of text with the regex, in the <strong>Mark</strong> dialog :</p>
<ul>
<li>SEARCH <strong><code>(?i-s)a.*j</code></strong></li>
</ul>
</li>
<li>
<p dir="auto">Go back to the <strong>very beginning</strong> of your current file ( <strong>Ctrl + Home</strong> )</p>
</li>
<li>
<p dir="auto">Open the <strong>Replace</strong> dialog ( <strong>Ctrl + H</strong> )</p>
<ul>
<li>
<p dir="auto">SEARCH <strong><code>(?si)^.*?(?-s)(a.*j)|(?s).*\z</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>?1\1\r\n</code></strong></p>
</li>
</ul>
</li>
<li>
<p dir="auto">Select the <strong>Regular expression</strong> search mode</p>
</li>
<li>
<p dir="auto">Click on the <strong>Replace All</strong> button</p>
</li>
</ul>
<p dir="auto">Et voilà !</p>
<hr />
<p dir="auto">Note that the <a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a>’s script and this <strong>regex</strong> S/R does give <strong>exactly</strong> the <strong>same</strong> results ;-))</p>
<p dir="auto">If you prefer, just tell me about the <strong>expression / regex</strong>, that you currently use to get your <strong>marked</strong> ranges and I’ll give your the <strong>exact</strong> syntax to build, from the <strong>generic</strong> regex S/R, above</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
<p dir="auto"><strong>P.S</strong>. :</p>
<p dir="auto">You must be aware about <strong><code>3</code></strong> points :</p>
<ul>
<li>
<p dir="auto">The <strong>regex</strong> S/R solution, above, is a <strong>destructive</strong> solution, in the sense that the <strong>original</strong> contents are <strong>lost</strong> ! Hence the need to <strong>copy</strong> the <strong>input</strong> text to a <strong>new</strong> tab, <strong>first</strong> !</p>
</li>
<li>
<p dir="auto">If your regex, <strong>already</strong>, contains <strong>one</strong> or <strong>several capturing</strong> groups, you MUST <strong>increase</strong> by <strong>ONE</strong> the number of <strong>each capturing</strong> group, used in your <strong>OWN</strong> search regex, as, in my <strong>global</strong> regex, I use <strong>round</strong> brackets to define the <strong>first</strong> group <strong>1</strong> !!</p>
</li>
</ul>
<p dir="auto">For instance, let’s suppose that you’re searching all the <strong>consecutive duplicate</strong> lines, in a <strong>sorted</strong> file, in order to extract them, leading to the common searched regex <strong><code>(?-s)^(.+\R)\1+</code></strong>. Once, inserted in the <strong>overall</strong> regex, the <strong>correct</strong> syntax is, therefore :</p>
<p dir="auto"><strong><code>(?s)^.*?((?-s)^(.+\R)\2+)|(?s).*\z</code></strong> ( and <strong>NOT</strong>  <strong><code>(?s)^.\*?((?-s)^(.+\R)\1+)|(?s).\*\z</code></strong> ! )</p>
<ul>
<li>If your regex matches <strong>complete</strong> lines, with their <strong>EOL</strong> characters, you’ll probably change the global <strong>replacement</strong> to the regex <strong><code>?1\1</code></strong> ( instead of <strong>?1\1\r\n</strong> ), unless you prefer to <strong>space</strong> any matched expression by a <strong>blank line</strong> separator !</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/52349</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52349</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 09 Apr 2020 20:21:18 GMT</pubDate></item><item><title><![CDATA[Reply to Need a copy of the red marked regions, after a "Mark All" operation on Thu, 09 Apr 2020 19:51:33 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> The regexp solution on that thread was for specific case, not universal. I also use regexp to mark the parts i need to check easily but can’t adapt that solution directly to my case. The python is even worse for me.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52347</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52347</guid><dc:creator><![CDATA[Ryszard Adamus]]></dc:creator><pubDate>Thu, 09 Apr 2020 19:51:33 GMT</pubDate></item><item><title><![CDATA[Reply to Need a copy of the red marked regions, after a "Mark All" operation on Thu, 09 Apr 2020 19:17:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ryszard-adamus" aria-label="Profile: Ryszard-Adamus">@<bdi>Ryszard-Adamus</bdi></a> said in <a href="/post/52345">Need a copy marked lines feature</a>:</p>
<blockquote>
<p dir="auto">Requesting or complaining can look very similar</p>
</blockquote>
<p dir="auto">Yes, but requesting right here does you no good so it is complaining by default.<br />
If you really care, you should maybe add to the github discussion and say “YEAH, I really want this feature, too!”</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52346</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52346</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 09 Apr 2020 19:17:09 GMT</pubDate></item><item><title><![CDATA[Reply to Need a copy of the red marked regions, after a "Mark All" operation on Thu, 09 Apr 2020 19:06:55 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> Sorry, I have found other similar request in this section but it was already closed. So i just write new.<br />
There is no solution under link You have provided. Requesting or complaining can look very similar …</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52345</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52345</guid><dc:creator><![CDATA[Ryszard Adamus]]></dc:creator><pubDate>Thu, 09 Apr 2020 19:06:55 GMT</pubDate></item><item><title><![CDATA[Reply to Need a copy of the red marked regions, after a "Mark All" operation on Thu, 09 Apr 2020 18:00:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ryszard-adamus" aria-label="Profile: Ryszard-Adamus">@<bdi>Ryszard-Adamus</bdi></a> ,</p>
<p dir="auto">Hmm… I thought someone else asked this recently.</p>
<p dir="auto">Ah, no, a 3-year-old thread had recent activity, though it wasn’t focused on the copying-of-marked text portion.</p>
<p dir="auto">However, <a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a>’s <a href="https://community.notepad-plus-plus.org/post/24733">PythonScript code</a> from that thread may help.  (He called the marked text “redmarked” to distinguish it from bookmarked text, but I think it will do what you describe, based on the immediate context around that script.)</p>
<p dir="auto">(I thought there was something else similar from more recently, but I’m not immediately finding it)</p>
<p dir="auto">If that’s not sufficient for you, you might be able to explain what’s not enough about that, and someone here might come up with a tweak or alternative.  I was about to point you to the feature-request FAQ, but <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> beat me to it. :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52342</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52342</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 09 Apr 2020 18:00:51 GMT</pubDate></item><item><title><![CDATA[Reply to Need a copy of the red marked regions, after a "Mark All" operation on Thu, 09 Apr 2020 17:57:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ryszard-adamus" aria-label="Profile: Ryszard-Adamus">@<bdi>Ryszard-Adamus</bdi></a></p>
<p dir="auto">So are you looking for a workaround, or just complaining.  I call it complaining because if you are making a feature request you are doing it in the wrong place; it belongs where <a href="https://community.notepad-plus-plus.org/topic/15741/faq-desk-feature-request-or-bug-report">CLICKING HERE</a> will direct you.</p>
<p dir="auto">But someone beat you to it:  <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/6095" rel="nofollow ugc">https://github.com/notepad-plus-plus/notepad-plus-plus/issues/6095</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/52341</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52341</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 09 Apr 2020 17:57:30 GMT</pubDate></item></channel></rss>