<?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 display only rows that contain the number &quot;300000&quot;]]></title><description><![CDATA[<p dir="auto">How to display only rows that contain the number “300000” and delete the remaining rows.</p>
<p dir="auto">I have lot of rows wit some information and it`s ended some number example ;3876219<br />
How to display only rows that contain the number “300000”</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/14892/how-to-display-only-rows-that-contain-the-number-300000</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 02:21:45 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/14892.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 09 Dec 2017 09:41:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to display only rows that contain the number &quot;300000&quot; on Sun, 10 Dec 2017 09:42:44 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/10409">@djmcg</a>, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/374">@scott-sumner</a> and <strong>All</strong>,</p>
<p dir="auto">I said, in that other post, below, that finding all files, which <strong>do not</strong> contain a <strong>specific</strong> string, was <strong>not</strong> easy, with our <strong>Boost regex</strong> engine and that we need to use a work-around to get the <strong>right</strong> results. However, we can easily build a regex which <strong>find</strong> all lines of files, which <strong>do not</strong> contain a <strong>specific</strong> string ! And, then, <strong>delete</strong> them, as and when :-))</p>
<p dir="auto"><a href="https://notepad-plus-plus.org/community/topic/14870/regex-find-all-files-that-do-not-contain-some-words/2" rel="nofollow ugc">https://notepad-plus-plus.org/community/topic/14870/regex-find-all-files-that-do-not-contain-some-words/2</a></p>
<hr />
<p dir="auto">In your example, this <strong>specific</strong> string seems to be the number <strong>300000</strong>, preceded by a <strong>semicolon</strong></p>
<p dir="auto">So, the <strong>regex</strong> S/R, below, should keep <strong>only</strong> lines containing the string <strong>;300000</strong> :</p>
<p dir="auto">SEARCH <strong><code>(?-s)(?!.*;300000)^.*\R</code></strong></p>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
<p dir="auto">OPTIONS <strong><code>Regular expression</code></strong> and <strong>Wrap around</strong> checked</p>
<p dir="auto">=&gt; It remains, only lines that contain the string <strong>;300000</strong>. Et voilà !</p>
<hr />
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">The <strong>first</strong> part <strong><code>(?-s)</code></strong> <strong>modifier</strong> means that <strong>dot</strong> will match any <strong>standard</strong> character, only and <strong>NOT</strong> the line breaks</p>
</li>
<li>
<p dir="auto">The <strong>last</strong> part <strong><code>^.*\R</code></strong> is the range of characters to search for, that is to say, <strong>all</strong> characters of a line, even <strong>empty</strong>, along with its <strong>End of Line</strong> character(s)</p>
</li>
<li>
<p dir="auto">And, thanks to the <strong>middle</strong> part <strong><code>(?!.*;300000)</code></strong>, which is a <strong>negative look-ahead</strong>, this search will be <strong>true</strong>, ONLY IF the string <strong>;300000</strong> <strong>cannot</strong> be found, from <strong>beginning</strong> of line, in the <strong>current</strong> line scanned</p>
</li>
<li>
<p dir="auto">And, as the <strong>Replacement</strong> part is <strong><code>empty</code></strong>, these lines are simply <strong>deleted</strong></p>
</li>
</ul>
<hr />
<p dir="auto">As you see, you’ve got <strong>4</strong> solutions, to get the job done :</p>
<ul>
<li>
<p dir="auto">With the <strong>LineFilter2</strong> plugin</p>
</li>
<li>
<p dir="auto">With <strong>bookmarks</strong></p>
</li>
<li>
<p dir="auto">With the <strong>Find result</strong> panel</p>
</li>
<li>
<p dir="auto">With <strong>regex S/R</strong></p>
</li>
</ul>
<p dir="auto">Enjoy N++ !!</p>
<p dir="auto">Cheers,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/28567</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/28567</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 10 Dec 2017 09:42:44 GMT</pubDate></item><item><title><![CDATA[Reply to How to display only rows that contain the number &quot;300000&quot; on Sat, 09 Dec 2017 12:48:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/10409">@djmcg</a> said:</p>
<blockquote>
<p dir="auto">display only rows</p>
</blockquote>
<p dir="auto">As far as displaying only those lines goes, you are probably out of luck.  Deleting lines that don’t contain a certain thing can be accomplished, but in a roundabout way:</p>
<p dir="auto">You can do it with standard Notepad++ but for this task I might recommend the <strong>LineFilter2</strong> plugin…</p>
<p dir="auto">The easiest way to do it in Notepad++ itself is probably to mark the lines that contain 300000 and then copy them to a new tab.  Invoke the <strong>Search</strong> (menu) -&gt; <strong>Mark…</strong> dialog and set up the fields.  Make sure to tick <strong>Bookmark line</strong>.  Run it and all of the lines that match your desired text will get “bookmarked” with a round blue ball in the left margin. Next invoke <strong>Search</strong> (menu) -&gt; <strong>Bookmark</strong> -&gt; <strong>Copy Bookmarked Lines</strong>.  Then paste the clipboard contents (containing only lines with your desired data) somewhere else (e.g., a new tab).</p>
<p dir="auto">There are other ways but that may be the simplest to explain and execute…but wait, maybe this is even easier:</p>
<p dir="auto">Do a <strong>FInd All in Current Document</strong> for your data.  The right-click in the <strong>Find result</strong> panel’s whitespace area and choose <strong>Select All</strong>.  Again right-click and choose <strong>Copy</strong>.  Then paste the clipboard contents (containing only lines with your desired data) somewhere else (e.g., a new tab).</p>
<p dir="auto">You’ve got options! :-D</p>
]]></description><link>https://community.notepad-plus-plus.org/post/28543</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/28543</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Sat, 09 Dec 2017 12:48:03 GMT</pubDate></item></channel></rss>