<?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[Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog]]></title><description><![CDATA[<p dir="auto">Hello, <strong>All</strong>,</p>
<p dir="auto">I suppose that this bug was introduced when the <strong><code>Minimum size for checking "In Selection"</code></strong> value was <strong>added</strong> in <strong><code>Preferences &gt; Searching &gt; When Find Dialog is Invoked</code></strong>, in the <strong><code>v8.5.8</code></strong> release ( point <strong><code>#12</code></strong> )</p>
<ul>
<li>Do a <strong>stream</strong> selection of the <strong>multi-lines</strong> regex below :</li>
</ul>
<pre><code class="language-diff">(?x-i)           # Search SENSIBLE to the CASE
(?&lt;=\x20)        # Preceded with a SPACE char
(?:              # BEGINNING of the NON-CAPTURING group
LETTER         |
CAPITAL        |
SMALL          |
DIGIT          |
FRACTION       |
LIGATURE       |
SUPERSCRIPT    |
SUBSCRIPT      |
CIRCLED        |
PARENTHESIZED  |
MATHEMATICAL   |
FULL[ ]STOP    |
ROMAN          |
EPACT
)               # END of the  NON-CAPTURING group
(?=\x20)        # Followed with a SPACE char
</code></pre>
<ul>
<li>
<p dir="auto">Open the <strong><code>Mark</code></strong> dialog ( <strong><code>Ctrl + M</code></strong> )</p>
</li>
<li>
<p dir="auto">Select the <strong>two</strong> options <strong><code>Purge for each search</code></strong> and <strong><code>Wrap around</code></strong>, only</p>
</li>
<li>
<p dir="auto">Choose the <strong><code>Regular expression</code></strong>  mode</p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Mark All</code></strong> button</p>
</li>
</ul>
<p dir="auto">Against the following text, you get the message  <strong><code>47 matches in entire file</code></strong></p>
<pre><code class="language-diff">|   0030  |  DIGIT ZERO                                                                      |     0
|   0370  |  GREEK CAPITAL LETTER HETA                                                       |     Ͱ
|   0400  |  CYRILLIC CAPITAL LETTER IE WITH GRAVE                                           |     Ѐ
|   0500  |  CYRILLIC CAPITAL LETTER KOMI DE                                                 |     Ԁ
|   10A0  |  GEORGIAN CAPITAL LETTER AN                                                      |     Ⴀ
|   1C80  |  CYRILLIC SMALL LETTER ROUNDED VE                                                |     ᲀ
|   1D00  |  LATIN LETTER SMALL CAPITAL A                                                    |     ᴀ
|   1E00  |  LATIN CAPITAL LETTER A WITH RING BELOW                                          |     Ḁ
|   2070  |  SUPERSCRIPT ZERO                                                                |     ⁰
|   2C60  |  LATIN CAPITAL LETTER L WITH DOUBLE BAR                                          |     Ⱡ
|   2D00  |  GEORGIAN SMALL LETTER AN                                                        |     ⴀ
|   A640  |  CYRILLIC CAPITAL LETTER ZEMLYA                                                  |     Ꙁ
|   A722  |  LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF                                         |     Ꜣ
|   AB30  |  LATIN SMALL LETTER BARRED ALPHA                                                 |     ꬰ
|   FB00  |  LATIN SMALL LIGATURE FF                                                         |     ﬀ
|   FF10  |  FULLWIDTH DIGIT ZERO                                                            |     ０
|  102E1  |  COPTIC EPACT DIGIT ONE                                                          |     𐋡
|  10500  |  ELBASAN LETTER A                                                                |     𐔀
|  10780  |  MODIFIER LETTER SMALL CAPITAL AA                                                |     𐞀
|  1CCD6  |  OUTLINED LATIN CAPITAL LETTER A                                                 |     𜳖
|  1D400  |  MATHEMATICAL BOLD CAPITAL A                                                     |     𝐀
|  1DF00  |  LATIN SMALL LETTER FENG DIGRAPH WITH TRILL                                      |     𝼀
|  1E030  |  MODIFIER LETTER CYRILLIC SMALL A                                                |     𞀰
|  1F100  |  DIGIT ZERO FULL STOP                                                            |     🄀
|  1FBF0  |  SEGMENTED DIGIT ZERO                                                            |     🯰
</code></pre>
<ul>
<li>Again, do a <strong>stream</strong> selection of the <strong>multi-lines</strong> regex, below</li>
</ul>
<pre><code class="language-diff">(?x-i)                  # Search SENSIBLE to CASE
(?&lt;=\x20)               # Preceded with SPACE
(?:                     # Start NON-CAPTURING group
0[0-2][0-9A-F][0-9A-F]  |
03[7-9A-F][0-9A-F]      |
04[0-9A-F][0-9A-F]      |
05[0-8][0-9A-F]         |
10[A-F][0-9A-F]         |
1C[8-B][0-9A-F]         |
1D[0-9AB][0-9A-F]       |
1[EF][0-9A-F][0-9A-F]   |
20[7-C][0-9A-F]         |
21[0-8][0-9A-F]         |
24[6-9A-F][0-9A-F]      |
25[A-F][0-9A-F]         |
27[0-B][0-9A-F]         |
2C[6-9A-F][0-9A-F]      |
2D[012][0-9A-F]         |
A6[4-9][0-9A-F]         |
A7[2-9A-F][0-9A-F]      |
AB[3-6][0-9A-F]         |
FB[01][0-9A-F]          |
FF[0-5E][0-9A-F]        |
102[EF][0-9A-F]         |
105[0-2][0-9A-F]        |
107[89AB][0-9A-F]       |
1CC[DEF][0-9A-F]        |
1D[4-7][0-9A-F][0-9A-F] |
1DF[0-9A-F][0-9A-F]     |
1E0[3-8][0-9A-F]        |
1F1[0-9A-F][0-9A-F]     |
1FB[0-9A-F][0-9A-F]
)                     # End NON-CAPTURING group
(?=\x20)              # Followed with SPACE
# END MULTI-lines Regex
</code></pre>
<p dir="auto">Note, in the <strong>status</strong> bar,  that <strong><code>1,047</code></strong> characters have been <strong>selected</strong></p>
<ul>
<li>Open the <strong><code>Mark</code></strong> dialog ( <strong><code>Ctrl + M</code></strong> )</li>
</ul>
<p dir="auto">Note that the <strong>last</strong> part of the <strong>combo</strong> box does <em>NOT</em> show the text <strong><code># END MULTI-lines Regex</code></strong> but shows the <strong>previous</strong> text <strong><code># Followed with a SPACE char</code></strong></p>
<ul>
<li>
<p dir="auto">Select the <strong>two</strong> options <strong><code>Purge for each search</code></strong> and <strong><code>Wrap around</code></strong>, only</p>
</li>
<li>
<p dir="auto">Choose the <strong><code>Regular expression</code></strong>  mode</p>
</li>
<li>
<p dir="auto"><strong>Uncheck</strong> the <strong><code>In selection</code></strong>  option</p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Mark All</code></strong> button</p>
</li>
</ul>
<p dir="auto">The <strong>previous</strong> search is <em>RE</em>-run and the <strong>same</strong> matches occurred !</p>
<hr />
<p dir="auto">Now, <em>RE</em>-select the <strong>second</strong> multi-lines regex, <strong>without</strong> including the <strong>last</strong> line <strong><code># END MULTI-lines Regex</code></strong></p>
<p dir="auto">Note that, this time, the indication <strong><code>1,022</code></strong> characters, is shown in the <strong>status</strong> bar</p>
<ul>
<li>Open the <strong><code>Mark</code></strong> dialog ( <strong><code>Ctrl + M</code></strong> )</li>
</ul>
<p dir="auto">Note that, this time, the <strong>last</strong> part of the <strong>combo</strong> box  show the text <strong><code># Followed with SPACE</code></strong>  and <em>NOT</em> the previous text <strong><code># Followed with a SPACE char</code></strong>. So, this <strong>second</strong> regex seems <strong>correctly</strong> taken in account !</p>
<ul>
<li>
<p dir="auto">Select the <strong>two</strong> options <strong><code>Purge for each search</code></strong> and <strong><code>Wrap around</code></strong>, only</p>
</li>
<li>
<p dir="auto">Choose the <strong><code>Regular expression</code></strong>  mode</p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Mark All</code></strong> button</p>
</li>
</ul>
<p dir="auto">=&gt; This time, the <strong>marked</strong>  text is, as <strong>expected</strong>, all the <strong>hexadecimal</strong> values beginning <strong>each</strong> line and the message said <strong><code>25 matches in entire file</code></strong> ! The process is <strong>OK</strong> because it’s <strong>under</strong> the limit of <strong><code>1,024</code></strong> bytes.</p>
<p dir="auto">To my mind, It would be best to <strong>increase</strong> the <strong><code>1,024</code></strong> value, to <strong>automatically</strong> check the <strong><code>In selection</code></strong> option, to <strong><code>2,048</code></strong>, which, roughly, corresponds to the <strong>maximum</strong> of characters that the <strong>Find</strong> dialog may contain !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
<p dir="auto"><strong>P.S.</strong> : I came across this <strong>bug</strong> when preparing my post about the <strong>new</strong> <strong><code>Locale Order</code></strong> feature !</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/26875/bug-when-a-multi-lines-regex-is-used-in-the-search-replace-or-mark-dialog</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 20:37:45 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/26875.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 14 May 2025 17:10:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Wed, 23 Jul 2025 16:12:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a> said:</p>
<blockquote>
<p dir="auto">I discovered that the Find field is limited to 2046 characters.</p>
</blockquote>
<p dir="auto">It looks like in the next release of Notepad++ this is going to get bumped up to around 16384 characters.  See <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/pull/16855" rel="nofollow ugc">https://github.com/notepad-plus-plus/notepad-plus-plus/pull/16855</a> for details.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/102661</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/102661</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 23 Jul 2025 16:12:04 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Mon, 23 Jun 2025 15:19:46 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> said:</p>
<blockquote>
<p dir="auto">the site’s ability to highlight any sub-section of the regex in green is really awesome</p>
</blockquote>
<p dir="auto"><a href="https://jmrware.com/articles/2010/dynregexhl/DynamicRegexHighlighter.html" rel="nofollow ugc">https://jmrware.com/articles/2010/dynregexhl/DynamicRegexHighlighter.html</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/102227</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/102227</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Mon, 23 Jun 2025 15:19:46 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Mon, 23 Jun 2025 14:39:53 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">Here is an other example where the search <strong>limits</strong> ( <strong><code>1,024</code></strong> and <strong><code>2,046</code></strong> ) prevent us for correct searching of a <strong>multi</strong>-lines regex !</p>
<p dir="auto">Follow the <strong>link</strong> below and you’ll get the <strong>general</strong> <em>multi</em>-lines regex of an <strong><code>URI</code></strong> ( <em>Uniform Ressource Identifier</em> )</p>
<p dir="auto"><a href="https://jmrware.com/articles/2009/uri_regexp/URI_regex.html#uri-43" rel="nofollow ugc">https://jmrware.com/articles/2009/uri_regexp/URI_regex.html#uri-43</a></p>
<p dir="auto">We get this section :</p>
<pre><code class="language-diff"># RFC-3986 URI component: URI-reference
(?:                                                               # (
  [A-Za-z][A-Za-z0-9+\-.]* :                                      # URI
  (?: //
    (?: (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:]|%[0-9A-Fa-f]{2})* @)?
    (?:
      \[
      (?:
        (?:
          (?:                                                    (?:[0-9A-Fa-f]{1,4}:){6}
          |                                                   :: (?:[0-9A-Fa-f]{1,4}:){5}
          | (?:                            [0-9A-Fa-f]{1,4})? :: (?:[0-9A-Fa-f]{1,4}:){4}
          | (?: (?:[0-9A-Fa-f]{1,4}:){0,1} [0-9A-Fa-f]{1,4})? :: (?:[0-9A-Fa-f]{1,4}:){3}
          | (?: (?:[0-9A-Fa-f]{1,4}:){0,2} [0-9A-Fa-f]{1,4})? :: (?:[0-9A-Fa-f]{1,4}:){2}
          | (?: (?:[0-9A-Fa-f]{1,4}:){0,3} [0-9A-Fa-f]{1,4})? ::    [0-9A-Fa-f]{1,4}:
          | (?: (?:[0-9A-Fa-f]{1,4}:){0,4} [0-9A-Fa-f]{1,4})? ::
          ) (?:
              [0-9A-Fa-f]{1,4} : [0-9A-Fa-f]{1,4}
            | (?: (?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]) \.){3}
                  (?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])
            )
        |   (?: (?:[0-9A-Fa-f]{1,4}:){0,5} [0-9A-Fa-f]{1,4})? ::    [0-9A-Fa-f]{1,4}
        |   (?: (?:[0-9A-Fa-f]{1,4}:){0,6} [0-9A-Fa-f]{1,4})? ::
        )
      | [Vv][0-9A-Fa-f]+\.[A-Za-z0-9\-._~!$&amp;'()*+,;=:]+
      )
      \]
    | (?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}
         (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)
    | (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=]|%[0-9A-Fa-f]{2})*
    )
    (?: : [0-9]* )?
    (?:/ (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})* )*
  | /
    (?:    (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})+
      (?:/ (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})* )*
    )?
  |        (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})+
      (?:/ (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})* )*
  |
  )
  (?:\? (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@/?]|%[0-9A-Fa-f]{2})* )?
  (?:\# (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@/?]|%[0-9A-Fa-f]{2})* )?
| (?: //                                                          # / relative-ref
    (?: (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:]|%[0-9A-Fa-f]{2})* @)?
    (?:
      \[
      (?:
        (?:
          (?:                                                    (?:[0-9A-Fa-f]{1,4}:){6}
          |                                                   :: (?:[0-9A-Fa-f]{1,4}:){5}
          | (?:                            [0-9A-Fa-f]{1,4})? :: (?:[0-9A-Fa-f]{1,4}:){4}
          | (?: (?:[0-9A-Fa-f]{1,4}:){0,1} [0-9A-Fa-f]{1,4})? :: (?:[0-9A-Fa-f]{1,4}:){3}
          | (?: (?:[0-9A-Fa-f]{1,4}:){0,2} [0-9A-Fa-f]{1,4})? :: (?:[0-9A-Fa-f]{1,4}:){2}
          | (?: (?:[0-9A-Fa-f]{1,4}:){0,3} [0-9A-Fa-f]{1,4})? ::    [0-9A-Fa-f]{1,4}:
          | (?: (?:[0-9A-Fa-f]{1,4}:){0,4} [0-9A-Fa-f]{1,4})? ::
          ) (?:
              [0-9A-Fa-f]{1,4} : [0-9A-Fa-f]{1,4}
            | (?: (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?) \.){3}
                  (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)
            )
        |   (?: (?:[0-9A-Fa-f]{1,4}:){0,5} [0-9A-Fa-f]{1,4})? ::    [0-9A-Fa-f]{1,4}
        |   (?: (?:[0-9A-Fa-f]{1,4}:){0,6} [0-9A-Fa-f]{1,4})? ::
        )
      | [Vv][0-9A-Fa-f]+\.[A-Za-z0-9\-._~!$&amp;'()*+,;=:]+
      )
      \]
    | (?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}
         (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)
    | (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=]|%[0-9A-Fa-f]{2})*
    )
    (?: : [0-9]* )?
    (?:/ (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})* )*
  | /
    (?:    (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})+
      (?:/ (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})* )*
    )?
  |        (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=@] |%[0-9A-Fa-f]{2})+
      (?:/ (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})* )*
  |
  )
  (?:\? (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@/?]|%[0-9A-Fa-f]{2})* )?
  (?:\# (?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@/?]|%[0-9A-Fa-f]{2})* )?
)                                                                       # )
</code></pre>
<p dir="auto">which is a very long <strong>multi</strong>-lines regex, of size <strong><code>3,991</code></strong> characters. Thus, <strong>not</strong> searchable with Notepad++ !</p>
<hr />
<p dir="auto">You could say, if this <strong>multi</strong>-lines regex is changed into a <strong>single</strong>-line regex, may be it’ll be OK ?</p>
<p dir="auto">First, let’s find out a way to transform any <em>MULTI</em>-line regex in a <em>SINGLE</em>-line <strong>equivalent</strong> regex :</p>
<ul>
<li>
<p dir="auto">Open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</p>
</li>
<li>
<p dir="auto"><strong>Uncheck</strong> all the <strong>box</strong> options</p>
</li>
<li>
<p dir="auto">Check the <strong><code>In selection</code></strong> option ( <em>IMPORTANT</em> )</p>
</li>
<li>
<p dir="auto">FIND <strong><code>(?x-s) (?: \[ [^\x5B\x5D\r\n]+ \] | \\ [ #] | \\x20 | \\x23 ) (*SKIP) (*F) | \x20* [#] .* (?: \R | \z ) | \x20+ | \R</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search mode</p>
</li>
<li>
<p dir="auto">Now, do a <strong>stream</strong> selection of <strong>all</strong> the lines of the <em>MULTI</em>-lines regex which must be <strong>shortened</strong></p>
</li>
<li>
<p dir="auto">To end, click <strong>once</strong> only, on the <strong><code>Replace All</code></strong> button</p>
</li>
</ul>
<p dir="auto">=&gt; You get the expected <em>SINGLE</em>-line regex, still <strong>selected</strong></p>
<p dir="auto">If we apply the <strong>above</strong> S/R to <strong>our</strong> regex example, it returns the following <strong>single</strong>-line regex :</p>
<pre><code class="language-diff">    (?:[A-Za-z][A-Za-z0-9+\-.]*:(?://(?:(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:]|%[0-9A-Fa-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::)(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]))|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)|[Vv][0-9A-Fa-f]+\.[A-Za-z0-9\-._~!$&amp;'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=]|%[0-9A-Fa-f]{2})*)(?::[0-9]*)?(?:/(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|/(?:(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:/(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)?|(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:/(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|)(?:\?(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?(?:\#(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?|(?://(?:(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:]|%[0-9A-Fa-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::)(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)|[Vv][0-9A-Fa-f]+\.[A-Za-z0-9\-._~!$&amp;'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=]|%[0-9A-Fa-f]{2})*)(?::[0-9]*)?(?:/(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|/(?:(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:/(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)?|(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=@]|%[0-9A-Fa-f]{2})+(?:/(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|)(?:\?(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?(?:\#(?:[A-Za-z0-9\-._~!$&amp;'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?)
</code></pre>
<p dir="auto">Which is <strong>still</strong> a very <strong>long</strong> regex of size <strong><code>2609</code></strong> characters ! So, <strong>no</strong> chance : even with the <strong>contracted</strong> form of the regex, it’s still <strong>over</strong> <strong><code>2,046</code></strong> characters and <strong>not</strong> searchable with Notepad++ :-((</p>
<hr />
<p dir="auto">By the way, the site’s ability to <strong>highlight</strong> any sub-section of the regex in <strong>green</strong> is really <strong>awesome</strong> !</p>
<p dir="auto">Best  Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/102225</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/102225</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 23 Jun 2025 14:39:53 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Tue, 17 Jun 2025 23:31:45 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> said in <a href="/post/102088">Bug when a multi-lines regex is used in the 'Search', 'Replace' or 'Mark' dialog</a>:</p>
<blockquote>
<p dir="auto">It isn’t really a bug, it’s more of a historical vestige. Before the setting existed, 1024 was used for even more purposes. Think of the setting as always-existing, but at an unchangeable value: 1024.</p>
</blockquote>
<p dir="auto">Agreed but it’s not quite that bad at present. There is a constant within the npp source code that defines both the maximum value and default value for the <code>Settings / Preferences / Searching / Minimum Size for Auto-Checking "In selection"</code>. It defaults to 1024. The length of the current selection is visible in the <code>Sel:</code> part of Notepad++'s status line. If the number is 0 to 1,023 and you do <code>Ctrl+F</code>, <code>Ctrl+H</code>, or <code>Ctrl+M</code> to bring up the Find, Replace, or Mark dialog boxes then the <code>In Selection</code> field will not be enabled. If the number is 1024 or larger and you do <code>Ctrl+F</code>, <code>Ctrl+H</code>, or <code>Ctrl+M</code> then <code>In Selection</code> field will be enabled.  You can change this threshold via Settings / Preferences.</p>
<p dir="auto">That works well.</p>
<p dir="auto">The same internal constant that defines the default and/or maximum value for the <code>Minimum Size for Auto-Checking "In selection"</code> thing I just mentioned is also used by the code for the Find, Replace, and Mark dialog boxes to decide if the current selection should auto-populate the <code>Find what</code> field. If the current selection is from 1 to 1024 characters then <code>Find what</code> gets populated with whatever is in the selection. If the current selection is zero or is more than 1024 characters then the selection is ignored and <code>Find what</code> contains whatever was in there before.</p>
<p dir="auto">The preferences setting for <code>Minimum Size for Auto-Checking "In selection"</code> does not control the current selection auto-populates <code>Find what</code> thing. Auto-population is a constant and is 1024.</p>
<p dir="auto">A few weeks ago I wrote up some notes to myself about the name of this internal constant and started teasing out how and where the constant gets used. I can’t find my notes at the moment. My plan at the time was to submit a feature request on github that adds a new constant and showed exactly how and where in the code it should be used so that we can separate out the current selection to <code>In selection</code> vs current selection to <code>Find what</code>.  I’d still like to do that but at the time I realized the npp code is a marvelously tangled ball of yarn and so needed to move carefully with my nip-n-tuck.</p>
<p dir="auto">I also realized I probably should work on being able to compile my own copies if Notepad++.exe as there were areas where the current values of some internal variables are not obvious. I wanted to change the current selection to <code>Find what</code> limit from 1024 to 2047 characters and to do that should also fix whatever causes Notepad++'s 2046 character limit. Nearly all of Notepad++'s code thinks the limit for search patterns is 2047 characters but something in there restricts searches to 2046 characters.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/102130</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/102130</guid><dc:creator><![CDATA[mkupper]]></dc:creator><pubDate>Tue, 17 Jun 2025 23:31:45 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Sun, 15 Jun 2025 12:55:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a> said:</p>
<blockquote>
<p dir="auto">The 1024 character limit comes from the default value for the Minimum size for auto-checking in-selection setting. It’s a Notepad++ bug as that setting is unrelated to the the limit for auto-loading the selection into the Find what field</p>
</blockquote>
<p dir="auto">It isn’t really a bug, it’s more of a historical vestige.  Before the setting existed, 1024 was used for even more purposes.  Think of the setting as always-existing, but at an unchangeable value: 1024.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/102088</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/102088</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 15 Jun 2025 12:55:29 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Wed, 11 Jun 2025 06:45:45 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>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a>, and others</p>
<p dir="auto">Congratulations on discovering that Ctrl+F3 trick to bypass the 1024 character selection to the Find-what field limit.</p>
<p dir="auto">That prompted me to do a test.</p>
<ul>
<li>I created a 5000 character long ruler line with <code>________10________20________30</code> … <code>______4980______4990______5000</code>.</li>
<li>I duplicated that line a few times.</li>
<li>I put the caret on one of the lines and did <code>Ctrl+F3</code>.  Notepad++ immediately jumped to the next line and there’s a bunch of text selected.</li>
<li>I did <code>Ctrl+C</code> to load the selected text into the copy/paste buffer, and pasted to a blank line in the area below my list of 5000 character rulers.</li>
<li>I saw that the new line is 2047 characters long and runs from <code>________10________20________30</code> … <code>______2030______2040______2</code></li>
</ul>
<p dir="auto">My first thought was, “wait, I thought the search limit was 2046 characters. Apparently the quick search thing using <code>Ctrl+F3</code> will search for up to 2047 character patterns.”</p>
<p dir="auto">I verified that a reverse quick search using <code>Ctrl+Shift+F3</code> also allows or up to 2047 character patterns.</p>
<ul>
<li>I moved the caret to a blank line (it can be any blank area) and did <code>Ctrl+F</code> to activate the normal find dialog.</li>
<li>I see that <code>Find what</code> is populated and that it has 2027 characters in the <code>Find what</code> field.</li>
<li>I click <code>[Find Next]</code> which selects some stuff, <code>Esc</code> to close the dialog, <code>Ctrl+C</code> to load the text I found into the copy/paste buffer, and paste that to a new line.</li>
</ul>
<p dir="auto">The search using <code>[Find Next]</code> matched the first 2046 characters that were in the <code>Find-what</code> field.</p>
<p dir="auto">Anyway, that’s excellent that we can have regular expressions that are up to 2046 characters long and to get them into the <code>Find-what</code> field without using copy/paste.  The procedure will be to:</p>
<ul>
<li>Select the long regexp</li>
<li><code>Crtl+F3</code> or <code>Shift+Crtl+F3</code></li>
<li>Move the caret to a blank area so that the caret is not within nor touching a word.</li>
<li><code>Crtl+F</code> and the <code>Find-what</code> field will be populated.</li>
</ul>
<p dir="auto">This will be handy as something I frequently do is to load the replacement string into the copy/paste buffer, select the search pattern, <code>Ctrl+H</code>, tab down to the <code>Replace with</code> field, and <code>Ctrl+V</code> to fill in the replacement pattern.</p>
<p dir="auto">That works for search patterns for up to 1024 characters and now with <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a>’s <code>Ctrl+F3</code> trick I can get around the 1024 character limit and don’t need to use the copy/paste buffer to do that.</p>
<p dir="auto">A few weeks ago I took a look at the Notepad++ source code to better understand the 1024 and 2046 character limits.</p>
<ul>
<li>
<p dir="auto">The 1024 character limit comes from the default value for the <code>Minimum size for auto-checking in-selection</code> setting. It’s a Notepad++ bug as that setting is unrelated to the the limit for auto-loading the selection into the <code>Find what</code> field. Unfortunately, the fix is not easy as the internal constant that has the 1024 is used in several different way.</p>
</li>
<li>
<p dir="auto">The 2046 character limit seems to be either a different Notepad++ bug or a Scintilla limit or bug. The buffers that hold search and replace patters are 2028 16-bit characters long. The pattern is <code>NUL</code> terminated meaning we should be able to have up to 2047 character long patterns. The code has an extra subtraction somewhere that causes 2047 to be 2046. The extra subtract seems to be buried in the Notepad++ logic that’s dealing with Scintilla.</p>
</li>
</ul>
<p dir="auto">While looking at the 2046 character issue I saw that the pattern buffer uses 16-bit wide characters. I verified that you can search for up to 2046 16-bit characters such as <code>⛱⛱⛱...⛱⛱⛱</code> (U+26F1). If you search for an extended Unicode character such as <code>🦎🦎🦎...🦎🦎🦎</code> (U+1F98E or the surrogate pair <code>\x{D83E}\x{DD8E}</code> ) then you will be limited to 1023 characters.</p>
<p dir="auto">I did discover some weirdness with <code>Ctrl+F3</code>.</p>
<ul>
<li>Using <code>Ctrl+F3</code> when the caret is within a short string such as <code>⛱⛱⛱⛱⛱⛱⛱⛱</code> seems to do nothing. The text is not loaded into the <code>Find what</code> field. I suspect that <code>⛱</code> is not a word character.</li>
<li><code>❽</code> (U+277D) is a word character but <code>Ctrl+F3</code> gets confused by <code>❽❽❽...❽❽❽</code> as it seems to be selecting and searching for the entire line. I was able to do 5000 character search matches using long strings of <code>❽❽❽...❽❽❽</code>. As I knew the buffers are 2024 words long I suspected there was a buffer overflow.</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/102036</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/102036</guid><dc:creator><![CDATA[mkupper]]></dc:creator><pubDate>Wed, 11 Jun 2025 06:45:45 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Wed, 04 Jun 2025 14:23:55 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> said:</p>
<blockquote>
<p dir="auto">If I choose the zero value, as auto-checking is disabled, if I select an important amount of text and immediately invoke the Find dialog, it should fill up the Find what field up to 2,046 characters !</p>
</blockquote>
<p dir="auto">I’d say that that sounds reasonable.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101936</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101936</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 04 Jun 2025 14:23:55 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Wed, 04 Jun 2025 14:08:36 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">Sorry, I was out these <strong>last three</strong> hours !</p>
<p dir="auto">When I said :</p>
<blockquote>
<p dir="auto">It’s important to add that, modifying in <strong><code>Preferences... &gt; Searching &gt; When Fin Dialog is Invoked</code></strong> the value <strong><code>1,024</code></strong> to the value <strong><code>0</code></strong>, does <em>NOT</em> change the <strong>global</strong> behavior</p>
</blockquote>
<p dir="auto">I meant that my <strong>three</strong> manipulations produce the <strong>same</strong> results if you previously chose the <strong><code>1,024</code></strong> value or the <strong><code>0</code></strong> value : <em>NO</em> change in behavior.</p>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
<p dir="auto">Thinking about it, I don’t know it this is <strong>judicious</strong>. If I choose the <strong><code>zero</code></strong> value, as auto-checking is <strong>disabled</strong>, if I select an <strong>important</strong> amount of text and immediately invoke the <strong>Find</strong> dialog, it should fill up the <strong><code>Find what</code></strong> field up to <strong><code>2,046</code></strong> characters !</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101933</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101933</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Wed, 04 Jun 2025 14:08:36 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Wed, 04 Jun 2025 11:42:11 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> said:</p>
<blockquote>
<p dir="auto">Second manipulation :<br />
…<br />
…select the contents of the second regex ( 1,802 chars )<br />
…<br />
The In selection option is checked ( Logical, as the amount of chars is greater than 1,024 )<br />
…<br />
Surprisingly, the regex, shown in the search field, is STILL the first regex and not the second expected multi-lines regex !<br />
…<br />
Whatever you decided, if you re-open the Find dialog, the first regex, ending with the string # Followed with SPACE, is STILL present in the search field, although we previously select the second regex ???!!! Why ?</p>
</blockquote>
<p dir="auto">The way it works (I think) is that if <em>In selection</em> is going to become checkmarked due to the N++ code doing it, i.e., if the number of bytes in the selected text is greater-than-or-equal-to¹ the setting “Minimum Size for Auto-Checking ‘In selection’”, then the selected text is NOT supposed to be copied to <em>Find what</em>, regardless of the setting for <em>Fill Find Field with Selected Text</em>.</p>
<p dir="auto">Why not?</p>
<p dir="auto">Well, if the code has determined that you are going to be searching <em>within</em> the selected text, copying the selected text to <em>Find what</em> doesn’t make sense.  You already know how many matches that would generate (exactly one).  So, it is waiting for you to put something different in <em>Find what</em>.</p>
<p dir="auto">¹ : In attempting to verify this before posting, I found out that it has to be greater-than, not greater-than-or-equal-to.  Thus, for the default case of 1024, if 1024 bytes are selected when Ctrl+f is invoked, the checkbox will become checkmarked AND the selected text will be copied to <em>Find what</em>.  This seems wrong to me; it should be as I first stated, greater-than-or-equal-to.</p>
<hr />
<blockquote>
<p dir="auto">Third manipulation :<br />
…<br />
Select, again, the contents of the second regex ( 1,802 chars )<br />
Before opening the Find dialog, just hit the Ctrl + F3 shortcut ( This is the WORK-AROUND ! )</p>
</blockquote>
<p dir="auto">Ctrl+F3 is <em>Select and Find Next</em> which is wholly different from a “select” followed by a <em>Find Next</em>.  It’s not affected by, nor constrained by, the <em>In selection</em> setting.</p>
<hr />
<blockquote>
<p dir="auto">It’s important to add that, modifying in Preferences… &gt; Searching &gt; When Find Dialog is Invoked the value 1,024 to the value 0, does NOT change the global behavior</p>
</blockquote>
<p dir="auto">I’m unclear on what you mean by this.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101927</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101927</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 04 Jun 2025 11:42:11 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Wed, 04 Jun 2025 10:26:20 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">I did some <strong>tests</strong> and I succeeded to find a <strong>work-around</strong> in order to use <strong>multi-lines</strong> regexes of <strong>more</strong> than <strong><code>1,024</code></strong> characters, as long as, of course, the <strong>total</strong> amount of chars does <strong>not</strong> exceed <strong><code>2,047</code></strong> characters. <strong>All</strong> the tests were done with the <strong>last</strong> N++ release <strong><code>v8.8.1</code></strong>.</p>
<p dir="auto">Here my method, to be followed <strong>rigorously</strong>.</p>
<hr />
<p dir="auto">In a <strong>new</strong> tab, paste, successively, the <strong>two</strong> <em>MULTI</em>-lines regexes, below :</p>
<pre><code class="language-diff">(?x-i)                  # Search SENSIBLE to CASE
(?&lt;=\x20)               # Preceded with SPACE
(?:                     # Start NON-CAPTURING group
0[0-2][0-9A-F][0-9A-F]  |
03[7-9A-F][0-9A-F]      |
04[0-9A-F][0-9A-F]      |
05[0-8][0-9A-F]         |
10[A-F][0-9A-F]         |
1C[8-B][0-9A-F]         |
1D[0-9AB][0-9A-F]       |
1[EF][0-9A-F][0-9A-F]   |
20[7-C][0-9A-F]         |
21[0-8][0-9A-F]         |
24[6-9A-F][0-9A-F]      |
25[A-F][0-9A-F]         |
27[0-B][0-9A-F]         |
2C[6-9A-F][0-9A-F]      |
2D[012][0-9A-F]         |
A6[4-9][0-9A-F]         |
A7[2-9A-F][0-9A-F]      |
AB[3-6][0-9A-F]         |
FB[01][0-9A-F]          |
FF[0-5E][0-9A-F]        |
102[EF][0-9A-F]         |
105[0-2][0-9A-F]        |
107[89AB][0-9A-F]       |
1CC[DEF][0-9A-F]        |
1D[4-7][0-9A-F][0-9A-F] |
1DF[0-9A-F][0-9A-F]     |
1E0[3-8][0-9A-F]        |
1F1[0-9A-F][0-9A-F]     |
1FB[0-9A-F][0-9A-F]
)                     # End NON-CAPTURING group
(?=\x20)              # Followed with SPACE
</code></pre>
<p dir="auto">And :</p>
<pre><code class="language-diff">(?x-si)
  (?:
    ^ ~~~ [\h\l]* \R (?s:.+?) ^ ~~~ \h* \R |
    ^ ``` [\h\l]* \R (?s:.+?) ^ ``` \h* \R |

    ^ \h* (?: - \h* )? (?i: FIND | SEARCH | REPLACE ) \x20 .+
  |
    (?&lt;= \s )
    (?:
#        Case *......* / Case **......** / Case `......`

     \*   [^`* \t\r\n] (?: [^*\r\n]* [^`* \t\r\n] )? \*   |
     \*\* [^`* \t\r\n] (?: [^*\r\n]* [^`* \t\r\n] )? \*\* |
     `    [^` \t\r\n]  (?: [^\r\n]*  [^` \t\r\n] )? `     |

#        Case **`......`**

     \*\*                                          ` [^` \t\r\n] (?: [^`\r\n]* [^` \t\r\n] )? `                                        \*\* |
     \*\*                                          ` [^`\r\n]    (?: [^`\r\n]* [^`\r\n]    )? ` (?: [^*`\r\n] [^`\r\n]* )? [^` \t\r\n] \*\* |
     \*\* [^` \t\r\n] (?: [^`\r\n]*   [^*`\r\n] )? ` [^`\r\n]    (?: [^`\r\n]* [^`\r\n]    )? `                                        \*\* |
     \*\* [^` \t\r\n] (?: [^`\r\n]*   [^*`\r\n] )? ` [^`\r\n]    (?: [^`\r\n]* [^`\r\n]    )? ` (?: [^*`\r\n] [^`\r\n]* )? [^` \t\r\n] \*\* |

#        Case *`......`*

     \*                                            ` [^` \t\r\n] (?: [^`\r\n]* [^` \t\r\n] )? `                                          \* |
     \*                                            ` [^`\r\n]    (?: [^`\r\n]* [^`\r\n]    )? ` (?: [^*`\r\n] [^*`\r\n]* )? [^` \t\r\n]  \* |
     \*   [^` \t\r\n] (?: [^*`\r\n]* [^`*\r\n] )?  ` [^`\r\n]    (?: [^`\r\n]* [^`\r\n]    )? `                                          \* |
     \*   [^` \t\r\n] (?: [^*`\r\n]* [^`*\r\n] )?  ` [^`\r\n]    (?: [^`\r\n]* [^`\r\n]    )? ` (?: [^*`\r\n] [^*`\r\n]* )? [^` \t\r\n]  \*
    ){1}+
    (?= [\s,;.-] | 's | \z )
  )
  (*SKIP) (*F)  # CORRECT cases are IGNORED
|
  [*`]+         .+?  [*`]+  |
  [*`]+  \x20*  .+?  \x20+
</code></pre>
<p dir="auto">Note that the <strong>first</strong> regex contains <strong><code>1,022</code></strong> characters and the <strong>second</strong> contains <strong><code>1,802</code></strong> chars, so <strong>one</strong> regex are less than <strong><code>1,024</code></strong> characters and the <strong>other</strong> more than  <strong><code>1,024</code></strong>.</p>
<p dir="auto">Add, in this <strong>new</strong> tab, the <strong>two</strong> lines below ( the <strong>first</strong> line should be matched by the <strong>first</strong> regex and the <strong>second</strong> line should be matched by the <strong>second</strong> regex ).</p>
<pre><code class="language-diff"> 2C63 | LATIN CAPITAL LETTER P WITH STROKE | Ᵽ

*AB D *
</code></pre>
<ul>
<li>To end,  <strong>save</strong> this new tab as <strong><code>Test_RE.txt</code></strong></li>
</ul>
<hr />
<h3>First manipulation :</h3>
<ul>
<li>
<p dir="auto">Switch to the <strong><code>Test_RE.txt</code></strong> file</p>
</li>
<li>
<p dir="auto">Select the contents of the <strong>first</strong> regex ( <strong><code>1,022</code></strong> chars )</p>
</li>
<li>
<p dir="auto">Open the <strong>Find</strong> dialog ( <strong><code>Ctrl + F</code></strong> )</p>
</li>
</ul>
<p dir="auto">=&gt; As you can see, the <strong>end</strong> of this multi-lines regex is visible and you should note the part <strong><code># Followed with SPACE</code></strong></p>
<ul>
<li>
<p dir="auto"><strong>Uncheck</strong> all the <strong>box</strong> options if any ( note that the <strong><code>In selection</code></strong> option was already <strong>not</strong> checked )</p>
</li>
<li>
<p dir="auto">Note that the <strong><code>Wrap around</code></strong> option will stay <strong>uncheched</strong> during <strong>all</strong> the tests</p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search mode</p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Find Next</code></strong> button</p>
</li>
</ul>
<p dir="auto">=&gt; As expected, it matches the <strong><code>2C63</code></strong> string</p>
<ul>
<li>Close the <strong>Find</strong> dialog</li>
</ul>
<hr />
<h3>Second manipulation :</h3>
<ul>
<li>
<p dir="auto">Switch to the <strong><code>Test_RE.txt</code></strong> file</p>
</li>
<li>
<p dir="auto">This time, select the contents of the <strong>second</strong> regex ( <strong><code>1,802</code></strong> chars )</p>
</li>
<li>
<p dir="auto">Open the <strong>Find</strong> dialog ( <strong><code>Ctrl + F</code></strong> )</p>
</li>
</ul>
<p dir="auto">=&gt; You can observe <strong>two</strong> things :</p>
<ul>
<li>
<p dir="auto">The <strong><code>In selection</code></strong> option is <strong>checked</strong> ( Logical, as the amount of chars is greater than <strong><code>1,024</code></strong> )</p>
</li>
<li>
<p dir="auto">Surprisingly, the regex, shown in the <strong>search</strong> field, is <em>STILL</em> the <strong>first</strong> regex and not the <strong>second</strong> expected multi-lines regex !</p>
</li>
<li>
<p dir="auto">Hit the <strong><code>Find Next</code></strong> button : as expected, it returns, again, the <strong><code>2C63</code></strong> string ( Note that the <strong><code>In selection</code></strong> button is <em>NOT</em> concerned when you hit the <strong><code>Find Next</code></strong> button )</p>
</li>
<li>
<p dir="auto">Close the <strong>Find</strong> dialog</p>
</li>
</ul>
<p dir="auto">At this point, you can, either :</p>
<ul>
<li>
<p dir="auto">Re-open the <strong>Find</strong> dialog</p>
</li>
<li>
<p dir="auto">Close and <strong>re-load</strong> the <strong><code>Test_RE.txt</code></strong> file</p>
</li>
<li>
<p dir="auto">Close and <strong>re-start</strong> Notepad++</p>
</li>
</ul>
<p dir="auto"><strong>Whatever</strong> you decided, if you re-open the <strong>Find</strong> dialog, the <strong>first</strong> regex, ending with the string <strong><code># Followed with SPACE</code></strong>, is <em>STILL</em> present in the search field, although we <strong>previously</strong> select  the <strong>second</strong> regex ???!!! Why ?</p>
<hr />
<h3>Third manipulation :</h3>
<ul>
<li>
<p dir="auto">Switch to the <strong><code>Test_RE.txt</code></strong> file</p>
</li>
<li>
<p dir="auto">Select, again, the contents of the <strong>second</strong> regex ( <strong><code>1,802</code></strong> chars )</p>
</li>
<li>
<p dir="auto"><strong>Before</strong> opening the <strong>Find</strong> dialog, just hit the <strong><code>Ctrl + F3</code></strong> shortcut ( This is the <em>WORK-AROUND</em> ! )</p>
</li>
<li>
<p dir="auto">Open the <strong>Find</strong> dialog</p>
</li>
<li>
<p dir="auto">This time, you can verify that the <strong>search</strong> field contains the <strong>correct</strong> regex : the <strong>second</strong> one</p>
</li>
<li>
<p dir="auto">Hit the <strong><code>Find Next</code></strong> button =&gt; This time, it <strong>correctly</strong> matches the <strong><code>*AB D *</code></strong> string</p>
</li>
</ul>
<p dir="auto">Note that sometimes, I needed to <strong>cancel</strong> the selection, right <strong>before</strong> opening the <strong>Find</strong> dialog, in order to get this match !</p>
<hr />
<p dir="auto">It’s important to add that, modifying in <strong><code>Preferences... &gt; Searching &gt; When Fin Dialog is Invoked</code></strong> the value <strong><code>1,024</code></strong> to the value <strong><code>0</code></strong>, does <em>NOT</em> change the <strong>global</strong> behavior</p>
<p dir="auto">As a conclusion, I would say that <strong>all</strong> that logic seems rather <strong>unclear</strong>. Can anyone <strong>reproduce</strong> these steps and see the problem ?</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
<p dir="auto"><strong>P.S.</strong> :</p>
<p dir="auto">Note that <strong>without</strong> this work-around, I should have used the <strong><code>v8.4.9</code></strong> release, which is the <strong>last</strong> version before the <strong>auto-checking</strong> of the <strong><code>In selection</code></strong> option</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101925</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101925</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Wed, 04 Jun 2025 10:26:20 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Fri, 23 May 2025 12:13:12 GMT]]></title><description><![CDATA[<p dir="auto">Instead of Excel, why not use a bit of PythonScript to generate the “ruler” lines?:</p>
<pre><code class="language-py">        accum = ''
        for j in range(1020, 1030 + 1):
            desired_len = j
            des_len_as_str = str(desired_len)
            s = des_len_as_str
            tens_count = 0
            while True:
                if (len(s) + 1) % 10 == 0:
                    if (tens_count + 2) * 10 &lt;= desired_len:
                        s += str((tens_count + 1) * 10)
                        tens_count += 1
                if len(s) &gt;= desired_len: break
                s += '_'
            s = s[:-len(des_len_as_str)] + des_len_as_str
            accum += s + '\r\n'
        editor.copyText(accum)
</code></pre>
<p dir="auto">The example above generates ruler lines of length <code>1020</code> through <code>1030</code>, inclusive.  The ruler data ends up in the clipboard after the script runs.</p>
<p dir="auto">Note that mine might be different from the earlier ruler lines discussed – I chose that the intermediate numbers start in their indicated column, e.g. after you paste the output of the script into a new tab, if you put the caret just to the left of  the <code>8</code> in <code>890</code>, the status bar will indicate <code>Col: 890</code>.</p>
<p dir="auto">To select 890 characters from that same example line, put the caret <em>between</em> the <code>8</code> and the <code>9</code> and then press Shift+Home.</p>
<p dir="auto">Here’s some output from the script:</p>
<pre><code class="language-txt">1020_____10________20________30________40________50________60________70________80________90________100_______110_______120_______130_______140_______150_______160_______170_______180_______190_______200_______210_______220_______230_______240_______250_______260_______270_______280_______290_______300_______310_______320_______330_______340_______350_______360_______370_______380_______390_______400_______410_______420_______430_______440_______450_______460_______470_______480_______490_______500_______510_______520_______530_______540_______550_______560_______570_______580_______590_______600_______610_______620_______630_______640_______650_______660_______670_______680_______690_______700_______710_______720_______730_______740_______750_______760_______770_______780_______790_______800_______810_______820_______830_______840_______850_______860_______870_______880_______890_______900_______910_______920_______930_______940_______950_______960_______970_______980_______990_______1000______1010___1020
1021_____10________20________30________40________50________60________70________80________90________100_______110_______120_______130_______140_______150_______160_______170_______180_______190_______200_______210_______220_______230_______240_______250_______260_______270_______280_______290_______300_______310_______320_______330_______340_______350_______360_______370_______380_______390_______400_______410_______420_______430_______440_______450_______460_______470_______480_______490_______500_______510_______520_______530_______540_______550_______560_______570_______580_______590_______600_______610_______620_______630_______640_______650_______660_______670_______680_______690_______700_______710_______720_______730_______740_______750_______760_______770_______780_______790_______800_______810_______820_______830_______840_______850_______860_______870_______880_______890_______900_______910_______920_______930_______940_______950_______960_______970_______980_______990_______1000______1010____1021
1022_____10________20________30________40________50________60________70________80________90________100_______110_______120_______130_______140_______150_______160_______170_______180_______190_______200_______210_______220_______230_______240_______250_______260_______270_______280_______290_______300_______310_______320_______330_______340_______350_______360_______370_______380_______390_______400_______410_______420_______430_______440_______450_______460_______470_______480_______490_______500_______510_______520_______530_______540_______550_______560_______570_______580_______590_______600_______610_______620_______630_______640_______650_______660_______670_______680_______690_______700_______710_______720_______730_______740_______750_______760_______770_______780_______790_______800_______810_______820_______830_______840_______850_______860_______870_______880_______890_______900_______910_______920_______930_______940_______950_______960_______970_______980_______990_______1000______1010_____1022
1023_____10________20________30________40________50________60________70________80________90________100_______110_______120_______130_______140_______150_______160_______170_______180_______190_______200_______210_______220_______230_______240_______250_______260_______270_______280_______290_______300_______310_______320_______330_______340_______350_______360_______370_______380_______390_______400_______410_______420_______430_______440_______450_______460_______470_______480_______490_______500_______510_______520_______530_______540_______550_______560_______570_______580_______590_______600_______610_______620_______630_______640_______650_______660_______670_______680_______690_______700_______710_______720_______730_______740_______750_______760_______770_______780_______790_______800_______810_______820_______830_______840_______850_______860_______870_______880_______890_______900_______910_______920_______930_______940_______950_______960_______970_______980_______990_______1000______1010______1023
1024_____10________20________30________40________50________60________70________80________90________100_______110_______120_______130_______140_______150_______160_______170_______180_______190_______200_______210_______220_______230_______240_______250_______260_______270_______280_______290_______300_______310_______320_______330_______340_______350_______360_______370_______380_______390_______400_______410_______420_______430_______440_______450_______460_______470_______480_______490_______500_______510_______520_______530_______540_______550_______560_______570_______580_______590_______600_______610_______620_______630_______640_______650_______660_______670_______680_______690_______700_______710_______720_______730_______740_______750_______760_______770_______780_______790_______800_______810_______820_______830_______840_______850_______860_______870_______880_______890_______900_______910_______920_______930_______940_______950_______960_______970_______980_______990_______1000______1010_______1024
1025_____10________20________30________40________50________60________70________80________90________100_______110_______120_______130_______140_______150_______160_______170_______180_______190_______200_______210_______220_______230_______240_______250_______260_______270_______280_______290_______300_______310_______320_______330_______340_______350_______360_______370_______380_______390_______400_______410_______420_______430_______440_______450_______460_______470_______480_______490_______500_______510_______520_______530_______540_______550_______560_______570_______580_______590_______600_______610_______620_______630_______640_______650_______660_______670_______680_______690_______700_______710_______720_______730_______740_______750_______760_______770_______780_______790_______800_______810_______820_______830_______840_______850_______860_______870_______880_______890_______900_______910_______920_______930_______940_______950_______960_______970_______980_______990_______1000______1010________1025
1026_____10________20________30________40________50________60________70________80________90________100_______110_______120_______130_______140_______150_______160_______170_______180_______190_______200_______210_______220_______230_______240_______250_______260_______270_______280_______290_______300_______310_______320_______330_______340_______350_______360_______370_______380_______390_______400_______410_______420_______430_______440_______450_______460_______470_______480_______490_______500_______510_______520_______530_______540_______550_______560_______570_______580_______590_______600_______610_______620_______630_______640_______650_______660_______670_______680_______690_______700_______710_______720_______730_______740_______750_______760_______770_______780_______790_______800_______810_______820_______830_______840_______850_______860_______870_______880_______890_______900_______910_______920_______930_______940_______950_______960_______970_______980_______990_______1000______1010_________1026
1027_____10________20________30________40________50________60________70________80________90________100_______110_______120_______130_______140_______150_______160_______170_______180_______190_______200_______210_______220_______230_______240_______250_______260_______270_______280_______290_______300_______310_______320_______330_______340_______350_______360_______370_______380_______390_______400_______410_______420_______430_______440_______450_______460_______470_______480_______490_______500_______510_______520_______530_______540_______550_______560_______570_______580_______590_______600_______610_______620_______630_______640_______650_______660_______670_______680_______690_______700_______710_______720_______730_______740_______750_______760_______770_______780_______790_______800_______810_______820_______830_______840_______850_______860_______870_______880_______890_______900_______910_______920_______930_______940_______950_______960_______970_______980_______990_______1000______1010__________1027
1028_____10________20________30________40________50________60________70________80________90________100_______110_______120_______130_______140_______150_______160_______170_______180_______190_______200_______210_______220_______230_______240_______250_______260_______270_______280_______290_______300_______310_______320_______330_______340_______350_______360_______370_______380_______390_______400_______410_______420_______430_______440_______450_______460_______470_______480_______490_______500_______510_______520_______530_______540_______550_______560_______570_______580_______590_______600_______610_______620_______630_______640_______650_______660_______670_______680_______690_______700_______710_______720_______730_______740_______750_______760_______770_______780_______790_______800_______810_______820_______830_______840_______850_______860_______870_______880_______890_______900_______910_______920_______930_______940_______950_______960_______970_______980_______990_______1000______1010___________1028
1029_____10________20________30________40________50________60________70________80________90________100_______110_______120_______130_______140_______150_______160_______170_______180_______190_______200_______210_______220_______230_______240_______250_______260_______270_______280_______290_______300_______310_______320_______330_______340_______350_______360_______370_______380_______390_______400_______410_______420_______430_______440_______450_______460_______470_______480_______490_______500_______510_______520_______530_______540_______550_______560_______570_______580_______590_______600_______610_______620_______630_______640_______650_______660_______670_______680_______690_______700_______710_______720_______730_______740_______750_______760_______770_______780_______790_______800_______810_______820_______830_______840_______850_______860_______870_______880_______890_______900_______910_______920_______930_______940_______950_______960_______970_______980_______990_______1000______1010____________1029
1030_____10________20________30________40________50________60________70________80________90________100_______110_______120_______130_______140_______150_______160_______170_______180_______190_______200_______210_______220_______230_______240_______250_______260_______270_______280_______290_______300_______310_______320_______330_______340_______350_______360_______370_______380_______390_______400_______410_______420_______430_______440_______450_______460_______470_______480_______490_______500_______510_______520_______530_______540_______550_______560_______570_______580_______590_______600_______610_______620_______630_______640_______650_______660_______670_______680_______690_______700_______710_______720_______730_______740_______750_______760_______770_______780_______790_______800_______810_______820_______830_______840_______850_______860_______870_______880_______890_______900_______910_______920_______930_______940_______950_______960_______970_______980_______990_______1000______1010______1020___1030
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/101748</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101748</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 23 May 2025 12:13:12 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Fri, 16 May 2025 11:50:39 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">30000 vs. 32767</p>
</blockquote>
<p dir="auto">I’ve no idea where 30000 originates.  A quick search of the Notepad++ source code won’t find it literally.  So… apologies to <a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a> about the “sloppily” thing; I did think you were speaking in “ballpark” terms.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101659</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101659</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 16 May 2025 11:50:39 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Fri, 16 May 2025 11:47:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a> said:</p>
<blockquote>
<p dir="auto">** The 1024 character automatic select and load into Find what limit **<br />
This is the item that started this forum thread.</p>
</blockquote>
<p dir="auto">As this IS what started the thread, I’d like to concentrate on that specific aspect.</p>
<blockquote>
<p dir="auto">While the magic number is 1024 this is apparently unrelated to the magic number 1024 found in Settings / Preferences / Searching (tab) setting for Minimum Size for Auto-Checking “In-selection”.</p>
</blockquote>
<p dir="auto">To evaluate the “apparently unrelated” part, I started changing the value for <em>Minimum Size for Auto-Checking “In-selection”</em>.  And, unless I missed something, it does actually appear related.  For example, creating 1022 and 1023 “ruler” lines and then changing the number in the box to 1023 yields what I’d expect (based on the 1024 behavior):  That is, invoking Ctrl+f with the caret in the 1023 ruler checkmarks <em>In selection</em>, while invoking it with the caret in the 1022 ruler uncheckmarks it.</p>
<p dir="auto">Thus I don’t think that 1024 is a “magic number”; it’s a default setting value, with no magic.</p>
<p dir="auto">But I still feel like I’m missing something about the point <a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a> was trying to make about this.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101658</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101658</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 16 May 2025 11:47:26 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Fri, 16 May 2025 07:03:48 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> and <strong>All</strong>,</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a>, I repeated <strong>all</strong> your process and indeed, your method and explanations were very <strong>instructive</strong> !</p>
<hr />
<p dir="auto">I just do <em>NOT</em> understand <strong>one</strong> point, yet. You said, in a <strong>previous</strong> post :</p>
<blockquote>
<p dir="auto">Hopefully, both the <strong>normal</strong> and <strong>extended</strong> search allow for <strong><code>30,000</code></strong> character searches.</p>
</blockquote>
<p dir="auto">Well, repeating the points 1 to 5 of <strong>The 30000 characters <code>Find what</code> field limit</strong> section, with the <strong>FIND</strong> dialog <strong>pre</strong>-configured in <strong>Normal</strong> or <strong>Extended</strong> mode, it just matches the <strong>first</strong> <strong><code>2,046</code></strong> characters of the <strong>70000___10</strong> string, although the <strong>Find</strong> field do contain the <strong>first</strong> <strong><code>30,000</code></strong> chars of the <strong>70000___10</strong> string ?!</p>
<p dir="auto">Best regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101657</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101657</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Fri, 16 May 2025 07:03:48 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Thu, 15 May 2025 23:06:37 GMT]]></title><description><![CDATA[<p dir="auto">Follow up on the previous post as the forum software did not allow for a 70000 character long ruler style test string. I had used Excel.</p>
<pre><code class="language-txt">10	=REPT("_",10-LEN(A1))&amp;TEXT(A1,"0")
=A1+10	=REPT("_",10-LEN(A2))&amp;TEXT(A2,"0")
=A2+10	=REPT("_",10-LEN(A3))&amp;TEXT(A3,"0")
=A3+10	=REPT("_",10-LEN(A4))&amp;TEXT(A4,"0")
...
</code></pre>
<p dir="auto">repeat that for 7000 rows. Row 7000 has:</p>
<pre><code class="language-txt">=A6999+10	=REPT("_",10-LEN(A7000))&amp;TEXT(A7000,"0")
</code></pre>
<p dir="auto">with the result being:</p>
<pre><code class="language-txt">10	________10
20	________20
30	________30
...
70000	_____70000
</code></pre>
<p dir="auto">I then copy/pasted column B into Notepad++,<br />
verified 7000 lines, and then search/replace<br />
to remove the <code>\R</code> to generate:</p>
<pre><code class="language-txt">________10________20________30 ... _____70000
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/101654</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101654</guid><dc:creator><![CDATA[mkupper]]></dc:creator><pubDate>Thu, 15 May 2025 23:06:37 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Thu, 15 May 2025 23:02:47 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> said in <a href="/post/101640">Bug when a multi-lines regex is used in the 'Search', 'Replace' or 'Mark' dialog</a>:</p>
<blockquote>
<p dir="auto">If you’re speaking slightly sloppily, then this makes sense. I’d guess that the limit is actually 32767, the default Windows value for an edit control, see HERE .</p>
</blockquote>
<p dir="auto">I hope it was not that sloppy.  Here are the repro steps for what I did yesterday though suspect including the repro details makes this a TL;DR style post.</p>
<ol>
<li>
<p dir="auto">I am running v8.8.1 though I don’t think the version matters much as all of this repro also worked in v8.7.9.</p>
</li>
<li>
<p dir="auto">I used Excel and Notepad++ to construct some “rulers” that start with the length and have markers. The rulers are 1024, 1025, and 70000 characters long.</p>
</li>
</ol>
<p dir="auto">I also included a line with the word <code>random</code> which is a word that I use to pre-load the <code>Find what</code> field at times.</p>
<pre><code class="language-txt">
random

1024____10________20________30________40________50________60________70________80________90_______100_______110_______120_______130_______140_______150_______160_______170_______180_______190_______200_______210_______220_______230_______240_______250_______260_______270_______280_______290_______300_______310_______320_______330_______340_______350_______360_______370_______380_______390_______400_______410_______420_______430_______440_______450_______460_______470_______480_______490_______500_______510_______520_______530_______540_______550_______560_______570_______580_______590_______600_______610_______620_______630_______640_______650_______660_______670_______680_______690_______700_______710_______720_______730_______740_______750_______760_______770_______780_______790_______800_______810_______820_______830_______840_______850_______860_______870_______880_______890_______900_______910_______920_______930_______940_______950_______960_______970_______980_______990______1000______1010______10201024
1025____10________20________30________40________50________60________70________80________90_______100_______110_______120_______130_______140_______150_______160_______170_______180_______190_______200_______210_______220_______230_______240_______250_______260_______270_______280_______290_______300_______310_______320_______330_______340_______350_______360_______370_______380_______390_______400_______410_______420_______430_______440_______450_______460_______470_______480_______490_______500_______510_______520_______530_______540_______550_______560_______570_______580_______590_______600_______610_______620_______630_______640_______650_______660_______670_______680_______690_______700_______710_______720_______730_______740_______750_______760_______770_______780_______790_______800_______810_______820_______830_______840_______850_______860_______870_______880_______890_______900_______910_______920_______930_______940_______950_______960_______970_______980_______990______1000______1010______1020_1025
(70000 character test string removed as the forum does not allow for more than 16384 character long posts)

</code></pre>
<p dir="auto">At times I’ll say to preload the random word into the <code>Find what</code> field. By this I mean:</p>
<ol>
<li>Select or put the caret on the word <code>random</code> (or anything of your choosing).</li>
<li><code>Ctrl-F</code> to bring up the Find dialog box.</li>
<li>See that the desired word is in the <code>Find what</code> field</li>
<li>Press <code>Esc</code> to close the Find dialog box.</li>
<li>Move the caret to a blank area of the document. (that’s why I have a blank like above and below the word <code>random</code> in the test data.)</li>
<li>You may do another <code>Ctrl-F</code> to bring up the Find dialog box and <code>Find what</code> field should have the random word in it.</li>
</ol>
<hr />
<p dir="auto">** The 30000 character <code>Find what</code> field limit **</p>
<ol>
<li>Preload the random word into the <code>Find what</code> field.</li>
<li>Load the 70000 character ruler (without the end of line) into the copy/paste buffer.</li>
<li>Move the caret to a blank area so that it’s not sitting on the ruler or some other word.</li>
<li><code>Ctrl+F</code> to bring up the Find dialog box and then <code>Ctrl+V</code> to paste the ruler into the <code>Find what</code> field.</li>
<li>You should see that the <code>Find what</code> field starts with <code>70000___10...</code> and ends with <code>..._____29980_____29990_____30000</code></li>
<li><code>Ctrl+A</code> to select all of the <code>Find what</code> field contents, <code>Ctrl+C</code> to load that into the copy/paste buffer, <code>Esc</code> to close the Find dialog box, and <code>Ctrl+V</code> to paste the results into the Notepad++ document.</li>
<li>You should see a 30000 character long line that starts with <code>70000___10</code> and ends with <code>_____30000</code>.</li>
</ol>
<p dir="auto">** The 1024 character automatic select and load into <code>Find what</code> limit **</p>
<p dir="auto">This is the item that started this forum thread.</p>
<ol>
<li>Preload the random word into the <code>Find what</code> field.</li>
<li>Put the caret on the 1025 character ruler and then do <code>Ctrl-F</code> to see what’s in <code>Find what</code>. You will see it’s still the pre-loaded random word.</li>
<li>Try various things such as selecting the ruler and then doing <code>Ctrl+F</code>. You will still get the pre-loaded random word.</li>
<li>Repeat steps 1, 2 and 3 using the 1024 character long ruler. You will discover that this ruler loads into the <code>Find what</code> field.</li>
</ol>
<p dir="auto">** The 2046 character limit for Notepad++ searches **</p>
<ol>
<li>First do steps 1 to 5 of the <strong>The 30000 character <code>Find what</code> field limit</strong> repo that’s above.</li>
<li>Do <code>Enter</code> (or click Find Next) to search for whatever is in the <code>Find what</code> field and then press <code>Esc</code>.</li>
<li>You will see that the first 2046 characters of the 70000 character ruler are selected. I did a <code>Ctrl+C</code> and pasted that to it’s own line to verify that it’s a 2046 character long line.</li>
<li>Do <code>F3</code> and Notepad++'s search thing will continue to find/select the first 2046 characters of the 70000 character ruler. (You can make extra copies of this ruler if desired)</li>
</ol>
<p dir="auto">** Bonus on the 2046 character limit for Notepad++ searches **</p>
<p dir="auto">I wondered if I could trick Notepad++ into using more than 2046 characters and so tried this:</p>
<ol>
<li>Exit Notepad++, edit the config.xml file, and added <code>2050______2060</code> to the <code>&lt;Find name="70000___10________20</code> line so that it ends with <code>2040______2050______2060" /&gt;</code></li>
<li>I started Notepad++, went to a blank area, and did <code>Ctrl+F</code>. I discovered that <code>Find what</code> is pre-loaded with a 2060 long value that starts with <code>70000___10________20</code> and ends with <code>2040______2050______2060</code>.</li>
<li>Searches though are still limited to 2046 characters.</li>
</ol>
<p dir="auto">** Bonus on the <code>F3</code> search **</p>
<p dir="auto">I discovered that Notepad++ must have a separate internal buffer that it uses for the <code>F3</code> search. If you start Notepad++ and then do <code>F3</code> then nothing happens even though the top of the find history is something that should be in the document.</p>
<p dir="auto">Related to this is if you preload something into the find history that it’s not available for an <code>F3</code> search. For example, put the caret on the word <code>Notepad</code>, do <code>Ctrl-F</code> and then <code>Esc</code>. Tapping <code>F3</code> will not search for <code>Notepad</code> but instead it it searches for whatever you had last searched for.</p>
<p dir="auto">I ran into this as I was hoping to preload the 2060 character long string by editing config.xml, starting Notepad++, and then doing an <code>F3</code> to see how long the resulting selection was. Nothing happened as there was noting in the 'text to search for` buffer. Thus I could not use this method to fool Notepad++ into searching for more than 2046 characters.</p>
<p dir="auto">Also, when either pre-load or copy/paste something into the <code>Find what</code> field and then exit Notepad++ without ever searching for that value then it’s not saved to the config.xml file.</p>
<ul>
<li>Thus, while you can copy/paste a 30000 character long string so that it shows up at the top of the search history this will not get saved to config.xml file.</li>
<li>If you do a search for that 30000 character long string then it seems that it’s first truncated to 2046 characters and it then does the seach. I believe it truncates first as the <code>Find what</code> field is truncated on the spot when you click the <code>[Find Next]</code></li>
<li>Thus the dialog box does not let you search for more than 2046 characters.</li>
<li>The truncated value will also now be at the top of the search history, and when you exit Notepad++ the 2046 character long string gets written to the config.xml file.</li>
</ul>
<p dir="auto">I did not do any testing with Notepad++ macros or PythonScript to see if I could use more than 2046 characters in a search pattern.</p>
<blockquote>
<p dir="auto">But isn’t it true that in Notepad++, even though you can put more than 2046 characters in the Find what box (e.g. via pasting), it ignores anything over 2046 when executing the search?</p>
</blockquote>
<p dir="auto">That seems to be true and it also truncates the field to 2046 characters when adding it to the search history.</p>
<blockquote>
<p dir="auto">Side Note: Also, what Notepad++ uses as a limit might be 2046 bytes, not characters in a strict sense. I haven’t looked at this lately, but if memory serves if you use multibyte characters in the Find what box data, the limit is going to be less than 2046.</p>
</blockquote>
<p dir="auto">That’s correct which is why I used plain ASCII for these tests. I’ve forgotten if the limits in this area are related to UTF-8 encoding and/or some characters need more bits than the seven needed for plain ASCII.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101653</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101653</guid><dc:creator><![CDATA[mkupper]]></dc:creator><pubDate>Thu, 15 May 2025 23:02:47 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Thu, 15 May 2025 11:42:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a> said:</p>
<blockquote>
<p dir="auto">There is another upper limit which is that the Find field allows for up to 30,000 characters. You can’t paste more than 30,000 characters into the field.</p>
</blockquote>
<p dir="auto">If you’re speaking slightly sloppily, then this makes sense.  I’d guess that the limit is actually 32767, the default Windows value for an edit control, see <a href="https://learn.microsoft.com/en-us/windows/win32/controls/em-setlimittext#:~:text=the%20default%20limit%20for%20the%20amount%20of%20text%20a%20user%20can%20enter%20in%20an%20edit%20control%20is%2032%2C767%20characters" rel="nofollow ugc">HERE</a>.</p>
<p dir="auto">But isn’t it true that in Notepad++, even though you can put more than 2046 characters in the <em>Find what</em> box (e.g. via pasting), it ignores anything over 2046 when executing the search?</p>
<p dir="auto">Side Note:  Also, what Notepad++ uses as a limit might be 2046 <em>bytes</em>, not <em>characters</em> in a strict sense.  I haven’t looked at this lately, but if memory serves if you use multibyte characters in the <em>Find what</em> box data, the limit is going to be less than 2046.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101640</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101640</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 15 May 2025 11:42:43 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Thu, 15 May 2025 11:26:32 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a>, and <strong>All</strong>,</p>
<p dir="auto">Oh, yes, sorry <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a>, It’s a <strong>typo</strong> : I use , generally, the <strong><code>~~~</code></strong> string to <strong>define</strong> and <strong>end</strong> a text <strong>block</strong>. But, this time, I forgot <strong>one</strong> tilde for a block end :-((</p>
<p dir="auto">I edited my <strong>first</strong> post and correct it !</p>
<p dir="auto">So, just retry and copy the <strong>third</strong> text section, of my <strong>initial</strong> post, in the clipboard with the <strong>upper-right</strong> corner button. It should be <strong>OK</strong> !</p>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101639</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101639</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 15 May 2025 11:26:32 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Thu, 15 May 2025 10:17:24 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">Note, in the status bar, that 1,047 characters have been selected</p>
</blockquote>
<p dir="auto">Trying to follow along, I don’t see how the above happens.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101636</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101636</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 15 May 2025 10:17:24 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Thu, 15 May 2025 09:38:10 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a> an <strong>All</strong>,</p>
<p dir="auto">Really sorry, but I’m rather <strong>confused</strong> !</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a>, you said :</p>
<blockquote>
<p dir="auto">I discovered that the <strong>Find field</strong> is limited to <strong><code>2046</code></strong> characters.</p>
</blockquote>
<p dir="auto">And <strong>two</strong> lines below, you said :</p>
<blockquote>
<p dir="auto">There is another upper limit which is that the <strong>Find field</strong> allows for up to <strong><code>30,000</code></strong> characters</p>
</blockquote>
<p dir="auto">To my mind, the <strong>former</strong> number is correct, No ??!!</p>
<hr />
<p dir="auto">I also verified, on my <strong>old</strong> <strong><code>Win-XP</code></strong> laptop, with the <strong>last</strong> XP version of N++ ( <strong><code>v7.9.2</code></strong> ) :</p>
<ul>
<li>
<p dir="auto">That it is possible to get a <strong>multi</strong>-lines regex up to the <strong><code>2,046</code></strong> characters</p>
</li>
<li>
<p dir="auto">That the <strong>automatic</strong> check of the <strong><code>In selection</code></strong> option, although <em>NOT</em> configurable in the <strong><code>Preferences...</code></strong> dialog, at that time, is effective for the <strong><code>1,025</code></strong> or <strong>upper</strong> values</p>
</li>
</ul>
<p dir="auto">So, at the time of the <strong><code>v7.9.2</code></strong> release, the <strong>regex</strong> limit of chars and the automatic <strong><code>In selection</code></strong> limit seemed <strong>unrelated</strong> ! Not sure that it’s <em>still</em> the case, nowadays ?</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101633</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101633</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 15 May 2025 09:38:10 GMT</pubDate></item><item><title><![CDATA[Reply to Bug when a multi-lines regex is used in the &#x27;Search&#x27;, &#x27;Replace&#x27; or &#x27;Mark&#x27; dialog on Wed, 14 May 2025 23:31:27 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>, I decided to try a different test.</p>
<p dir="auto">I had three lines of text</p>
<pre><code class="language-txt">aaa... repeated 1024 times.
bbb... repeated 1025 times.
ccc... repeated 32768 times.
</code></pre>
<ul>
<li>No text is selected.</li>
<li>Position the caret on the first line and do <code>Ctrl+F</code>. The Find dialog will pop up with the Find field populated with <code>aaa...aaa</code>.</li>
<li>Close the dialog box and try again on line 2. The Find dialog pops up again but the Find field stil has <code>aaa...aaa</code> and not the expected <code>bbb...bbb</code></li>
</ul>
<p dir="auto">The behavior changes from 1024 to 1025 characters in the selection. It’s a sort of well known issue and for a multi-line <code>(?x)</code> free-form search is painful as you can’t get around the 1024 character limit by copy/pasting the text into the search or find field.</p>
<p dir="auto">While the magic number is 1024 this is apparently unrelated to the magic number 1024 found in <code>Settings / Preferences / Searching (tab)</code> setting for <code>Minimum Size for Auto-Checking "In-selection"</code>.</p>
<p dir="auto">As you can get around the 1024 limit by copy/pasting into the Find field I used the <code>ccc...ccc</code> line to test this. I loaded line 3 into the copy/paste buffer and then did a <code>Ctrl+F</code> to bring up the search dialog and then pasted into the Find field.</p>
<p dir="auto">I discovered that the Find field is limited to 2046 characters.</p>
<ul>
<li>Do a search for <code>ccc...ccc</code> and you will discover that it matches and selects 2046 characters from line 3. It does not matter if you use Normal, Extended, or Regular Expression mode.</li>
<li>If you re-activate the Find dialog you will discover that the Find field has 2046 characters in it.</li>
</ul>
<p dir="auto">There is another upper limit which is that the Find field allows for up to 30,000 characters. You can’t paste more than 30,000 characters into the field. FWIW, Microsoft Notepad’s Find field is limited to 127 characters.</p>
<p dir="auto">If you put in a feature request then I’m inclined to vote for than an upper limit of 30,000 characters in the selection will auto-populate the Find field. Hopefully, both the normal and extended search allow for 30,000 character searches.</p>
<p dir="auto">We know that regular expression mode has a much lower limit but I don’t see a clean way to impose a smaller limit for that mode while allowing for switching modes within the dialog box.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101630</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101630</guid><dc:creator><![CDATA[mkupper]]></dc:creator><pubDate>Wed, 14 May 2025 23:31:27 GMT</pubDate></item></channel></rss>