<?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[&quot;Whole Word Only&quot; Option in Combination with Non-Alphanumeric Characters]]></title><description><![CDATA[<p dir="auto">When searching for the string “Notepad++” with the "<strong>Match whole word only"</strong> option in a CSV file, there are inconsistencies in the search results based on the placement of non-alphanumeric characters.</p>
<p dir="auto"><strong>Examples and Outcomes:</strong></p>
<ol>
<li>
<p dir="auto"><strong>Search Term</strong>: <code>Notepad++</code><br />
<strong>Text</strong>: <code>Notepad,Notepad++,Notepad</code><br />
<strong>Result</strong>: No match found.<br />
<em>Explanation</em>: There is no match even though “Notepad++” is present, because the + sign is hitting the comma.</p>
</li>
<li>
<p dir="auto"><strong>Search Term</strong>: <code>Notepad++</code><br />
<strong>Text</strong>: <code>Notepad,Notepad++ ,Notepad</code><br />
<strong>Result</strong>: Match in the 2nd column.<br />
<em>Explanation</em>: A match occurs here because there is a space after “Notepad++”, which seems to affect the search behavior.</p>
</li>
<li>
<p dir="auto"><strong>Search Term</strong>: <code>Notepad</code><br />
<strong>Text</strong>: <code>Notepad,Notepad,Notepad</code><br />
<strong>Result</strong>: Hits in all columns.<br />
<em>Explanation</em>: Searches without non-alphanumeric characters at the ends behave as expected.</p>
</li>
</ol>
<p dir="auto">It appears that the placement of non-alphanumeric characters at the beginning or end of the search string affects the outcome. This might be initially perceived as a bug.</p>
<p dir="auto">Is it possible to adjust the behavior in the Scintilla component for <code>SCI_SEARCHINTARGET</code> to handle search terms uniformly regardless of surrounding characters? I’m looking into this for the MultiReplace Plugin and would appreciate any insights or suggestions.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/25863/whole-word-only-option-in-combination-with-non-alphanumeric-characters</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Jul 2026 09:25:43 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/25863.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 06 Jun 2024 15:47:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to &quot;Whole Word Only&quot; Option in Combination with Non-Alphanumeric Characters on Fri, 07 Jun 2024 18:35:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/coises" aria-label="Profile: Coises">@<bdi>Coises</bdi></a> said in <a href="/post/95296">"Whole Word Only" Option in Combination with Non-Alphanumeric Characters</a>:</p>
<blockquote>
<p dir="auto">that modifying Scintilla would be “off limits” for the Notepad++ project</p>
</blockquote>
<p dir="auto">It mostly is.<br />
But I think in some areas it was judged to be something that “had to be done”.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95299</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95299</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 07 Jun 2024 18:35:44 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Whole Word Only&quot; Option in Combination with Non-Alphanumeric Characters on Fri, 07 Jun 2024 17:02:07 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/95281">"Whole Word Only" Option in Combination with Non-Alphanumeric Characters</a>:</p>
<blockquote>
<p dir="auto">I agree that Scintilla’s description doesn’t cover the edge cases, though it probably should.</p>
</blockquote>
<p dir="auto">Having just discovered — to some horror — that Notepad++ uses a modified version of Scintilla (<a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/15242#issuecomment-2155107063" rel="nofollow ugc">context here</a>) I am no longer inclined to “blame” Scintilla for anything without first doing a lot of investigation.</p>
<p dir="auto">I somehow just assumed that modifying Scintilla would be “off limits” for the Notepad++ project.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95296</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95296</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Fri, 07 Jun 2024 17:02:07 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Whole Word Only&quot; Option in Combination with Non-Alphanumeric Characters on Fri, 07 Jun 2024 11:14:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/thomas-knoefel" aria-label="Profile: Thomas-Knoefel">@<bdi>Thomas-Knoefel</bdi></a></p>
<p dir="auto">Interesting idea.  If you’re a scripter, maybe mockup some demo with a script and show it here?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95291</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95291</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 07 Jun 2024 11:14:22 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Whole Word Only&quot; Option in Combination with Non-Alphanumeric Characters on Fri, 07 Jun 2024 11:03:43 GMT]]></title><description><![CDATA[<p dir="auto">I’ve been thinking about how the “Match Whole Word Only” search option might function:</p>
<ol>
<li>Text Segmentation: The entire text is divided into chunks by separating at non-word characters, ensuring symbols like ‘+’ are not included in these chunks.</li>
<li>Search Within Chunks: The search then strictly focuses on these separated chunks.</li>
</ol>
<p dir="auto">Interestingly, spaces seem to act as primary separators, overruling other non-word characters if they are next to these characters and including adjacent non-word characters into the chunks.</p>
<p dir="auto">This chunk preparation, which happens without analyzing the search string, likely makes the search process faster, especially if the text is pre-prepared. Finally the search will only focus on these seperated chunks.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95290</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95290</guid><dc:creator><![CDATA[Thomas Knoefel]]></dc:creator><pubDate>Fri, 07 Jun 2024 11:03:43 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Whole Word Only&quot; Option in Combination with Non-Alphanumeric Characters on Thu, 06 Jun 2024 21:11:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/coises" aria-label="Profile: Coises">@<bdi>Coises</bdi></a> said in <a href="/post/95279">"Whole Word Only" Option in Combination with Non-Alphanumeric Characters</a>:</p>
<blockquote>
<p dir="auto">The documentation I looked at was the Scintilla documentation</p>
</blockquote>
<p dir="auto">Ah, okay, I misunderstood which “documentation” you were referring to.  I agree that Scintilla’s description doesn’t cover the edge cases, though it probably should.  (Who knows if they’ve even bothered to learn their own edge cases; I get the feeling that Notepad++ and it’s associated plugin authors push Scintilla in ways that the Scintilla developers never expected; though presumably other apps that use Scintilla push things in different directions than we do.)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95281</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95281</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 06 Jun 2024 21:11:16 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Whole Word Only&quot; Option in Combination with Non-Alphanumeric Characters on Thu, 06 Jun 2024 20:52:31 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/95278">"Whole Word Only" Option in Combination with Non-Alphanumeric Characters</a>:</p>
<blockquote>
<p dir="auto">The Whole Word search for Notepad++ in the string Notepad,Notepad++,Notepad is behaving as described in both the comments of the source code and in the User Manual.</p>
</blockquote>
<p dir="auto">Indeed, it does.</p>
<p dir="auto">The documentation I looked at was the <a href="https://www.scintilla.org/ScintillaDoc.html#searchFlags" rel="nofollow ugc">Scintilla documentation for the search flags</a>. (Probably because I was thinking more as a plugin developer than as an end user.)</p>
<p dir="auto">The <a href="https://npp-user-manual.org/docs/searching/#find--replace-tabs" rel="nofollow ugc">Notepad++ User Manual documentation</a> describes the actual behavior correctly.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95279</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95279</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Thu, 06 Jun 2024 20:52:31 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Whole Word Only&quot; Option in Combination with Non-Alphanumeric Characters on Thu, 06 Jun 2024 20:40:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/coises" aria-label="Profile: Coises">@<bdi>Coises</bdi></a> ,</p>
<p dir="auto">I respectfully disagree.</p>
<p dir="auto">With text <code>Notepad,Notepad++,Notepad</code>, search for <code>Notepad++</code> with Whole Word checkmarked.  It won’t be found, because there is no character-class difference between the <code>+</code> at the end of the word and the comma (<code>,</code>) after it that’s not part of the search string.   Thus, the “Check that the given range is has transitions between character classes at both” comment that was in the source-code link is <em>not</em> fulfilled (<code>+</code> to <code>,</code> is <em>not</em> a character class transition).</p>
<p dir="auto">And the manual says, “If the left of your search string is a word character and the right is not (or vice versa), then the characters to the left and right must be of the opposite type, or be spaces, or be the beginning/ending of a line.”  The left of the search string is <code>N</code>, so a word character; the right is <code>+</code> so punctuation; thus, it would have to be non-word to the left of the <code>N</code> (it is) and word or space to the right of the + (it is a comma, so punctuation, which is neither), thus the Manual correctly describes that Whole Word will <em>not</em> match for that.</p>
<p dir="auto">The Whole Word search for <code>Notepad++</code> in the string <code>Notepad,Notepad++,Notepad</code> is behaving as described in both the comments of the source code and in the User Manual.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95278</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95278</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 06 Jun 2024 20:40:07 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Whole Word Only&quot; Option in Combination with Non-Alphanumeric Characters on Thu, 06 Jun 2024 20:21:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/thomas-knoefel" aria-label="Profile: Thomas-Knoefel">@<bdi>Thomas-Knoefel</bdi></a></p>
<p dir="auto">Based on the Scintilla documentation:</p>
<p dir="auto"><a href="https://www.scintilla.org/ScintillaDoc.html#searchFlags" rel="nofollow ugc">https://www.scintilla.org/ScintillaDoc.html#searchFlags</a></p>
<p dir="auto">the plain text search with whole word enabled <em>should be</em> equivalent to:</p>
<p dir="auto"><strong><code>(?&lt;!\w)\QNotepad++\E(?!\w)</code></strong></p>
<p dir="auto">The implementation says otherwise:</p>
<p dir="auto"><a href="https://github.com/notepad-plus-plus/notepad-plus-plus/blob/7a401cfacef20a962bdd0cb1cdc47f8a96c0b85a/scintilla/src/Document.cxx#L2063" rel="nofollow ugc">https://github.com/notepad-plus-plus/notepad-plus-plus/blob/7a401cfacef20a962bdd0cb1cdc47f8a96c0b85a/scintilla/src/Document.cxx#L2063</a></p>
<p dir="auto">“Whole word” effectively implies a word <em>boundary</em>; so it behaves like <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a>’s suggestion:</p>
<p dir="auto"><strong><code>\b\QNotepad++\E\b</code></strong></p>
<p dir="auto">and not like the documentation indicates.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95277</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95277</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Thu, 06 Jun 2024 20:21:18 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Whole Word Only&quot; Option in Combination with Non-Alphanumeric Characters on Thu, 06 Jun 2024 19:46:11 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><br />
I was just curious about this when I first recognized it in the plugin and thought it was a bug. However, after realizing that this behavior is normal, I found it a bit odd. Since this behavior cannot be changed, so it’s just part of the feature set of the plugin then.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95276</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95276</guid><dc:creator><![CDATA[Thomas Knoefel]]></dc:creator><pubDate>Thu, 06 Jun 2024 19:46:11 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Whole Word Only&quot; Option in Combination with Non-Alphanumeric Characters on Thu, 06 Jun 2024 16:54:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/thomas-knoefel" aria-label="Profile: Thomas-Knoefel">@<bdi>Thomas-Knoefel</bdi></a></p>
<p dir="auto">I don’t know if searching in regex mode works “better” or not:</p>
<p dir="auto">e.g. <code>\b\QNotepad++\E\b</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/95271</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95271</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 06 Jun 2024 16:54:19 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Whole Word Only&quot; Option in Combination with Non-Alphanumeric Characters on Thu, 06 Jun 2024 16:17:33 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><br />
Thanks for the hint. I checked the help documentation, and it seems this behavior is normal and something I’ll need to get used to.</p>
<p dir="auto"><a href="https://npp-user-manual.org/docs/searching/" rel="nofollow ugc">https://npp-user-manual.org/docs/searching/</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/95270</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95270</guid><dc:creator><![CDATA[Thomas Knoefel]]></dc:creator><pubDate>Thu, 06 Jun 2024 16:17:33 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Whole Word Only&quot; Option in Combination with Non-Alphanumeric Characters on Thu, 06 Jun 2024 15:54:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/thomas-knoefel" aria-label="Profile: Thomas-Knoefel">@<bdi>Thomas-Knoefel</bdi></a></p>
<p dir="auto">Have you read the fine user manual about <code>Match whole word only</code> ?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95268</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95268</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 06 Jun 2024 15:54:18 GMT</pubDate></item></channel></rss>