<?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[Copy data found in one file to another&#x2F;new file]]></title><description><![CDATA[<p dir="auto">Is there a way to do a find and then copy that found data into another file?  I am going thru logs and want to copy all of the destination IP’s to another txt file if possible.  I have the first part of the equation done.  Here is an example:</p>
<p dir="auto">Each line in the log file looks similar to this:</p>
<p dir="auto">date=2021-03-15 time=17:53:03 logid=0000000011 type=traffic subtype=forward level=warning vd=root srcip=10.198.2.197 srcport=59538 srcintf=“port1” dstip=10.249.10.68 dstport=9997 dstintf=“wan1” poluuid=c717af30-5d04-51e8-905a-d1db557fbc46 sessionid=1573070499 proto=6 action=ip-conn policyid=139 policytype=policy appcat=“unscanned” crscore=5 craction=262144 crlevel=low</p>
<p dir="auto">I want to copy the “dstip=10.249.10.68” (where the IP address can be different for each line) to a new file if possible.  The first part I THINK I already have for the find piece:</p>
<p dir="auto">dstip=(\d+.\d+.\d+.\d+) &lt;-----That piece of the puzzle works fine and it will go line by line, only finding the various destination IP’s (Thank you Alan Kilborn for helping me figure that out in another “Help Wanted” topic)</p>
<p dir="auto">Is there a way to copy that data to a new file?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/20889/copy-data-found-in-one-file-to-another-new-file</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 20:16:22 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/20889.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 15 Mar 2021 23:10:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Copy data found in one file to another&#x2F;new file on Tue, 16 Mar 2021 00:46:02 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/18670">@mike-gill</a>,</p>
<p dir="auto">Yeah, that’s the <strong>right</strong> way ! However, <strong>Mike</strong>, note that, <strong>before</strong> the <strong><code>v7.9.1</code></strong> release, where the <strong><code>Copy Marked Text </code></strong> button was <strong>added</strong>, we were forced to use a <strong>regex</strong> S/R to achieve the <strong>same</strong> goal !</p>
<p dir="auto">But this way <strong>still</strong> works nice with <strong>last</strong> releases ! For instance :</p>
<ul>
<li>
<p dir="auto">Copy the contents of your <strong><code>.log</code></strong> file in a <strong>new</strong> tab</p>
</li>
<li>
<p dir="auto">Open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</p>
<ul>
<li>
<p dir="auto">SEARCH <strong><code>(?s)^.+?(dstip=.+?)(?=\x20)|.+</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>\1\r\n</code></strong></p>
</li>
<li>
<p dir="auto">Tick 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 on the <strong><code>Replace All</code></strong> button</p>
</li>
</ul>
</li>
<li>
<p dir="auto">Save these <strong>modified</strong> contents</p>
</li>
</ul>
<p dir="auto">Et voilà !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63964</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63964</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 16 Mar 2021 00:46:02 GMT</pubDate></item><item><title><![CDATA[Reply to Copy data found in one file to another&#x2F;new file on Mon, 15 Mar 2021 23:22:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/18670">@Mike-Gill</a> Ok I figured this out on my own…LOL!!</p>
<p dir="auto">I started at the top of the file then went to:</p>
<p dir="auto">Search–&gt;Mark</p>
<p dir="auto">Then copied my find formula above into the “Find What” field and clicked on “Mark All” and then clicked on “Copy Marked Text”.  After that I was able to copy ALL of the destination IP’s from that log into a new file.</p>
<p dir="auto">W00T!  :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63961</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63961</guid><dc:creator><![CDATA[Mike Gill]]></dc:creator><pubDate>Mon, 15 Mar 2021 23:22:15 GMT</pubDate></item></channel></rss>