<?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[When finding in files is it possible to show more than one line?]]></title><description><![CDATA[<p dir="auto">I looked around through AI and Google and did not see a solution to this. So apologize if this is an old rathole. However when searching using Find In Files. I would like to see more text above and/or below the keyword I am searching for. I am gathering with the default implementation of Notepad++ that is not possible but wondering if there was a plugin to help with this perhaps? Support for multiple keywords would be an additional plus.</p>
<p dir="auto">I was looking at some other off the shelf tools and Notepad++ would be a better place to execute this type of search imo. The file extensions I am looking through are non-standard but do contain searchable text but the tool I looked at did not allow other non standard extensions. So Notepad++ had a leg up there.</p>
<p dir="auto">Now if can get a bigger chunk of text surrounding the keyword returned. Problem is there are thousands of files I need to search through searching for the keyword “error” and I don’t have time to open each one to figure out more details about the error.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/27631/when-finding-in-files-is-it-possible-to-show-more-than-one-line</link><generator>RSS for Node</generator><lastBuildDate>Thu, 27 Aug 2026 08:02:21 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/27631.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 14 Aug 2026 14:39:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to When finding in files is it possible to show more than one line? on Mon, 17 Aug 2026 23:52:54 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">So if I search using</p>
<p dir="auto">(?=.*Error)(?=.*Foobar1)(?=.*Foobar2)</p>
<p dir="auto">With regular expression and newline checked. I do see it boil down to the files I am interested in. My only other need is to see all the lines associated/contained with the AND. …</p>
</blockquote>
<p dir="auto">The first table in the FAQ is just showing the logic for matching all of those terms.  Later down in the FAQ, there is another table which explains how to find the exact line that matches all of those terms.  In your case, the AND would be <code>(?-s)(?:(?=.*Error)(?=.*Foobar1)(?=.*Foobar2))^.*(?:\R|\z)</code></p>
<p dir="auto"><img src="/assets/uploads/files/1787010625218-59c19de8-1eb3-41e3-9fd1-14abdcb43053-image.jpeg" alt="59c19de8-1eb3-41e3-9fd1-14abdcb43053-image.jpeg" class=" img-fluid img-markdown" /></p>
<p dir="auto">or, using the Find Results via Find All in Current Document:<br />
<img src="/assets/uploads/files/1787010757984-6f1d47c5-0787-4257-91c0-22189e1d79fc-image.jpeg" alt="6f1d47c5-0787-4257-91c0-22189e1d79fc-image.jpeg" class=" img-fluid img-markdown" /></p>
<p dir="auto">dummy example file to show it working:</p>
<pre><code>Blah Error Blah Foobar1 blah Foobar2
Blah Warning blah Football1 blah Football2
Blah Foobar2 blah Foobar1 blah Error order doesn't matter
Blah Error blah Foobar1 blah Footbark2 won't match because it doesn't have all three
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/106132</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106132</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 17 Aug 2026 23:52:54 GMT</pubDate></item><item><title><![CDATA[Reply to When finding in files is it possible to show more than one line? on Mon, 17 Aug 2026 14:22:25 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> Ah sorry! I was thinking afterwards there must be an &amp;&amp; and didn’t pay attention to your hyperlink. I checked it out thanks!!! One other question. So if I search using</p>
<p dir="auto">(?=.*Error)(?=.*Foobar1)(?=.*Foobar2)</p>
<p dir="auto">With regular expression and newline checked. I do see it boil down to the files I am interested in. My only other need is to see all the lines associated/contained with the AND. It just shows the chunk of text from the beginning of the file to the first match it finds which in this example is Foobar1. I was more interested in seeing each line (e.g. also Error) that matched. I didn’t see this in the help page. Maybe this is not possible but thought I would ask. Thanks for all your help so far!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/106130</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106130</guid><dc:creator><![CDATA[petey200]]></dc:creator><pubDate>Mon, 17 Aug 2026 14:22:25 GMT</pubDate></item><item><title><![CDATA[Reply to When finding in files is it possible to show more than one line? on Sun, 16 Aug 2026 15:43:01 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/petey200" aria-label="Profile: petey200">@<bdi>petey200</bdi></a> <a href="/post/106126">said</a>:</p>
<p dir="auto">Any keywords to require all the hits</p>
</blockquote>
<p dir="auto">The “logic gates” link I gave you includes how to do “AND” (“requires A and B and C”)</p>
<p dir="auto">With logic, you can create any more complicated rules you want (like “(A AND B) BUT NOT (C OR D)”) by nesting inside the constructs.  Play with the expressions from that “logic gates” page, see what they do; try nesting them; get a feel for how the logic works together.  Soon, you’ll be able to craft the combinations that most help you with your data.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/106128</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106128</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Sun, 16 Aug 2026 15:43:01 GMT</pubDate></item><item><title><![CDATA[Reply to When finding in files is it possible to show more than one line? on Sun, 16 Aug 2026 15:21:25 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> Oh yes, one other question. This might be above and beyond. Any keywords to require all the hits (in your example of 3 hits). Or perhaps to require one of the keywords to gate whether results are shown? So I have a scenario where it is finding the error(s) which is great but I am also getting smaller hits that have to do with the process in the logfile which I don’t care to see in the results if there is also not an error keyword along with it in that file. As I mentioned there are thousands of files I am combing through. Thanks again!!!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/106126</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106126</guid><dc:creator><![CDATA[petey200]]></dc:creator><pubDate>Sun, 16 Aug 2026 15:21:25 GMT</pubDate></item><item><title><![CDATA[Reply to When finding in files is it possible to show more than one line? on Sun, 16 Aug 2026 14:58:36 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> That works too! I like it actually better as the logs are fairly consistent in structure! thanks Peter!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/106127</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106127</guid><dc:creator><![CDATA[petey200]]></dc:creator><pubDate>Sun, 16 Aug 2026 14:58:36 GMT</pubDate></item><item><title><![CDATA[Reply to When finding in files is it possible to show more than one line? on Sat, 15 Aug 2026 11:36:41 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> Without the whale, it’s just Burns and Allen.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/106110</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106110</guid><dc:creator><![CDATA[David Brigden52]]></dc:creator><pubDate>Sat, 15 Aug 2026 11:36:41 GMT</pubDate></item><item><title><![CDATA[Reply to When finding in files is it possible to show more than one line? on Fri, 14 Aug 2026 22:28:04 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">Star Trek IV reference? :-)</p>
</blockquote>
<p dir="auto">It only took <a href="https://community.notepad-plus-plus.org/post/66152">5 years</a> for people to finally understand me correctly.  I guess I made it too obvious this time, with finally adding the third alternative. :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/106105</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106105</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 14 Aug 2026 22:28:04 GMT</pubDate></item><item><title><![CDATA[Reply to When finding in files is it possible to show more than one line? on Fri, 14 Aug 2026 22:12:25 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> <a href="/post/106099">said</a>:</p>
</blockquote>
<blockquote>
<p dir="auto">Find What = \b(George|Gracie|whale)\b</p>
</blockquote>
<p dir="auto">Star Trek IV reference? :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/106104</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106104</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 14 Aug 2026 22:12:25 GMT</pubDate></item><item><title><![CDATA[Reply to When finding in files is it possible to show more than one line? on Fri, 14 Aug 2026 15:48:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/petey200" aria-label="Profile: petey200">@<bdi>petey200</bdi></a> ,</p>
<p dir="auto">The Search Results panel is designed to only show one line per match (even if you do a search expression that matches text that crosses over lines, it will only show the first line of the match).  There isn’t a way to increase context.</p>
<blockquote>
<p dir="auto">Support for multiple keywords would be an additional plus.</p>
</blockquote>
<p dir="auto">The existing regular expression (regex) feature already handles that.</p>
<ul>
<li>Find What = <code>\b(George|Gracie|whale)\b</code>
<ul>
<li>the <code>\b</code> matches “word boundary” so it would match <code>George</code> but not <code>Georgene</code>, etc.</li>
<li>the <code>(...)</code> makes a group - without this logical group, the <code>\b</code> would have to be repeated at the beginning and end of each word, like <code>\bGeorge\b|\bGracie\b|\bwhale\b</code></li>
<li>the <code>|</code> means “OR”</li>
<li>translated to english, this Find What means “match a boundary, then <code>George</code> or <code>Gracie</code> or <code>whale</code>, then another boundary”</li>
</ul>
</li>
<li>Match Case = off</li>
<li>Search Mode = Regular Expression</li>
<li><code>. matches newline</code> = off</li>
</ul>
<p dir="auto"><img src="/assets/uploads/files/1786722146144-7274a6f0-798a-4c00-9466-d487a784e5af-image.jpeg" alt="7274a6f0-798a-4c00-9466-d487a784e5af-image.jpeg" class=" img-fluid img-markdown" /></p>
<p dir="auto">–<br />
From our FAQ section, the Generic Regular Expression formula FAQ links to a post <a href="/topic/22677">Generic Regex: Logic Gates for Regular Expressions</a> which explains how to match lines with AND, OR, Exclusive-OR, and similar logical constructs.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/106099</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106099</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 14 Aug 2026 15:48:24 GMT</pubDate></item></channel></rss>