<?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[why does this parsing not work? Replace the content of html tags between comments section]]></title><description><![CDATA[<p dir="auto">hello, I read this topic and the answer of <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> over <a href="https://community.notepad-plus-plus.org/topic/21156/regex-delete-everything-that-falls-between-the-html-comments-except-some-tags/3">HERE</a></p>
<p dir="auto">I have a similar request. I this html code.</p>
<pre><code>       &lt;!-- Form Start --&gt;
    &lt;div class="55df" &gt;
        &lt;div class="gg44"&gt;
            &lt;h4 class="header-text"&gt;United Romaketh&lt;/h4&gt;
            &lt;img src="https://sensy.com/33.png" alt="Alternate Text" /&gt;
        &lt;/div&gt;
        &lt;!-- Identify  --&gt;
        &lt;div class="45de"&gt;
            &lt;div class="col"&gt;
                &lt;div class="body-text"&gt;
                    &lt;h4&gt;Marcus 33&lt;/h4&gt;
                    &lt;p&gt;Can you tell me?&lt;/p&gt;
                &lt;/div&gt;
                &lt;div class="yy"&gt;
                    &lt;!-- Yesd. --&gt;

                    &lt;form action="https://www.gre.com/" method="post" class="similar"&gt;

                        &lt;!-- Stones --&gt;
                        &lt;input type="hidden" name="business" value="erer@gmail.com"&gt;

                        &lt;!-- button simple --&gt;
                        &lt;input type="hidden" name="cmd" value="_buttons"&gt;

                        &lt;!-- contribution --&gt;
                        &lt;input type="hidden" name="item_name" value="Maxim"&gt;
                        &lt;input type="hidden" name="item_number" value="Maxim"&gt;
                        &lt;select name="amount"&gt;&lt;option value="3.00"&gt;&amp;euro;3.00&lt;/option&gt;&lt;option value="5.00"&gt;&amp;euro;5.00&lt;/option&gt;&lt;option value="10.00"&gt;&amp;euro;10.00&lt;/option&gt;&lt;option value="25.00"&gt;&amp;euro;25.00&lt;/option&gt;&lt;option value="50.00"&gt;&amp;euro;50.00&lt;/option&gt;&lt;/select&gt;
                        &lt;input type="hidden" name="currency" value="DOL"&gt;

                        &lt;!-- Display the button. --&gt;
                        &lt;input class="paypal-img" type="image" src="https://www.pitt.com/hh.gif" border="0" name="submit" title="yy" alt="button" /&gt;
                    &lt;/form&gt;




                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col"&gt;
                &lt;div class="body-text"&gt;
                    &lt;h4&gt;I am here&lt;/h4&gt;
                    &lt;p&gt;My text here&lt;/p&gt;
                &lt;/div&gt;
                &lt;div class="gono"&gt;
                    &lt;form action="https://www.concate.com/donate" method="post" target="_top"&gt;
                        &lt;input type="hidden" name="444" value="7Z7JBUL" /&gt;
                        &lt;input class="r-img" type="image" src="https://www.rer.com/" border="0" name="submit" title="d" alt="sdsd" /&gt;
                        &lt;img alt="" border="0" src="https://www.dd.com/pixel.gif" width="1" height="1" /&gt;
                    &lt;/form&gt;
                &lt;/div&gt;
            &lt;/div&gt;

        &lt;/div&gt;

    &lt;/div&gt;
    &lt;div class="Home Store"&gt;
        &lt;h4&gt;I am here&lt;/h4&gt;
        &lt;p&gt;my dauther loves me&lt;/p&gt;
        &lt;div class="text-sdsg"&gt;
            Love Me tender
        &lt;/div&gt;
    &lt;/div&gt;
    
                &lt;!-- Form Final --&gt;
</code></pre>
<p dir="auto"><strong>The problem:</strong> I must replace all <code>&lt;p&gt;&lt;/p&gt;</code> with <code>&lt;p class="STAR-ONE"&gt;&lt;/p&gt;</code> from the section <code>&lt;!-- Form Start --&gt;</code> to <code>&lt;!-- Form Final--&gt;</code></p>
<p dir="auto">My regex seems ok, but is not replacing too good. Instead of <code>&lt;p class="STAR-ONE"&gt;&lt;/p&gt;</code> it gives me <code>&lt;p&gt;&lt;p class="STAR-ONE"&gt;&lt;/p&gt;</code></p>
<p dir="auto">I really don’t know where is the mistake on my regex…?!</p>
<p dir="auto">Search: <code>(?:.*?&lt;!-- Form Start --&gt;|\G).*?\K(&lt;p&gt;).*?(?=&lt;/p&gt;.*?&lt;!-- Form Final --&gt;)</code><br />
Replace by: <code>\1&lt;p class="STAR-ONE"&gt;\3</code></p>
]]></description><link>https://community.notepad-plus-plus.org/topic/21248/why-does-this-parsing-not-work-replace-the-content-of-html-tags-between-comments-section</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 05:48:58 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/21248.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 31 May 2021 08:24:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to why does this parsing not work? Replace the content of html tags between comments section on Tue, 15 Jun 2021 08:35:42 GMT]]></title><description><![CDATA[<p dir="auto"><strong>I found a solution that works with PowerShell, that will replace all lines with the canonical link tag:</strong></p>
<pre><code>$sourcedir = "C:\Folder1\"
$resultsdir = "C:\Folder1\"

Get-ChildItem -Path $sourcedir -Filter *.html | ForEach-Object {
    $content = Get-Content -Path $_.FullName -Raw
    $replaceValue = (Select-String -InputObject $content -Pattern '(?&lt;=&lt;link rel="canonical" href=").+(?=" /&gt;)').Matches.Value
    $content = $content -replace 'https:\/\/.+.html',$replaceValue
    Set-Content -Path $resultsdir\$($_.name) $content
}
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/67039</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67039</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Tue, 15 Jun 2021 08:35:42 GMT</pubDate></item><item><title><![CDATA[Reply to why does this parsing not work? Replace the content of html tags between comments section on Wed, 02 Jun 2021 03:06:57 GMT]]></title><description><![CDATA[<p dir="auto">thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/66559</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/66559</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Wed, 02 Jun 2021 03:06:57 GMT</pubDate></item><item><title><![CDATA[Reply to why does this parsing not work? Replace the content of html tags between comments section on Tue, 01 Jun 2021 15:25:12 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/robin-cruise" aria-label="Profile: robin-cruise">@<bdi>robin-cruise</bdi></a> and All,</p>
<p dir="auto">The <strong>general</strong> problem is how to <strong>modify</strong> some lines with an expression ( <strong><code>https://website.com/en/camera.html</code></strong> ), located <strong>before</strong> these lines ? Somehow, we need to <strong>rewrite</strong> the address, in the <strong><code>&lt;link••••• /&gt; </code></strong> tag somewhere, <strong>after</strong> the lines to modify !</p>
<hr />
<p dir="auto">So I propose to <strong>decompose</strong> the problem in <strong>two smaller</strong> ones :</p>
<ul>
<li><strong>Firstly</strong>, we store in a <strong>comment</strong>, at the <strong>very end</strong> of each <strong><code>HTML</code></strong> file, the <strong>address</strong> located in the <strong><code>&lt;link ••••• /&gt;</code></strong> tag with this <strong>regex</strong> S/R :</li>
</ul>
<p dir="auto">SEARCH <strong><code>(?-is)&lt;link rel="canonical" href="(.+?)"(?s).+\K</code></strong></p>
<p dir="auto">REPLACE <strong><code>\r\n&lt;!-- \1 --&gt;</code></strong></p>
<ul>
<li>
<p dir="auto"><strong>Secondly</strong> :</p>
<ul>
<li>
<p dir="auto">We <strong>replace</strong> the address, in each <strong><code>&lt;a href="••••••••••" class="flags••••••••••&gt;&lt;/a&gt;</code></strong> tag found, with the <strong>stored address</strong> in the <strong>last</strong> comment of the file, at the <strong>very end</strong> of file</p>
</li>
<li>
<p dir="auto">We <strong>delete</strong> this <strong>temporary</strong> comment, as well</p>
</li>
</ul>
</li>
</ul>
<p dir="auto">With this <strong>regex</strong> S/R :</p>
<p dir="auto">SEARCH <strong><code>(?-is)&lt;a href="\K.*?(?="\h+class="flags(?s).+&lt;!-- (.+) --&gt;\z)|(?-s)&lt;!--.+\z</code></strong></p>
<p dir="auto">REPLACE <strong><code>?1\1</code></strong></p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/66542</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/66542</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 01 Jun 2021 15:25:12 GMT</pubDate></item><item><title><![CDATA[Reply to why does this parsing not work? Replace the content of html tags between comments section on Tue, 01 Jun 2021 14:24:16 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/robin-cruise" aria-label="Profile: robin-cruise">@<bdi>robin-cruise</bdi></a> ,</p>
<p dir="auto">Sorry, I spent a <strong>lot</strong> of time with the <a class="plugin-mentions-user plugin-mentions-a" href="/user/xaviermdq" aria-label="Profile: xaviermdq">@<bdi>xaviermdq</bdi></a>’s problem ! Refer <a href="https://community.notepad-plus-plus.org/post/66537">here</a> !</p>
<p dir="auto">I won’t be long. I’ve <strong>already</strong> imagined something which should work !</p>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/66539</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/66539</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 01 Jun 2021 14:24:16 GMT</pubDate></item><item><title><![CDATA[Reply to why does this parsing not work? Replace the content of html tags between comments section on Tue, 01 Jun 2021 14:17:34 GMT]]></title><description><![CDATA[<p dir="auto">can you help me <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> ?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/66538</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/66538</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Tue, 01 Jun 2021 14:17:34 GMT</pubDate></item><item><title><![CDATA[Reply to why does this parsing not work? Replace the content of html tags between comments section on Tue, 01 Jun 2021 03:00:42 GMT]]></title><description><![CDATA[<p dir="auto">hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a></p>
<p dir="auto">yes, <code>&lt;link rel="canonical" href="https://website.com/en/camera.html" /&gt;</code>  occurs only once, in each HTML file.</p>
<p dir="auto">and yes, that line come always before the different <code>&lt;a href="•••••••••••••••" class="flags</code> expressions.</p>
<p dir="auto"><code>canonical</code> line is at about the beginning of the file<br />
all those <code>&lt;a href="•••••••••••••••" class="flags </code> are at the end of the files, in the footer.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/66526</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/66526</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Tue, 01 Jun 2021 03:00:42 GMT</pubDate></item><item><title><![CDATA[Reply to why does this parsing not work? Replace the content of html tags between comments section on Mon, 31 May 2021 22:10:13 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/robin-cruise" aria-label="Profile: robin-cruise">@<bdi>robin-cruise</bdi></a>,</p>
<ul>
<li>
<p dir="auto">Can you specify if the line <strong><code>&lt;link rel="canonical" href="https://website.com/en/camera.html" /&gt;</code></strong> occurs <strong>only once</strong>, in each <strong><code>HTML</code></strong> file ?</p>
</li>
<li>
<p dir="auto">Does this line come <strong>always before</strong> the different <strong><code>&lt;a href="•••••••••••••••" class="flags</code></strong> expressions ?</p>
</li>
</ul>
<p dir="auto">TIA,</p>
<p dir="auto">Cheers</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/66523</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/66523</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 31 May 2021 22:10:13 GMT</pubDate></item><item><title><![CDATA[Reply to why does this parsing not work? Replace the content of html tags between comments section on Mon, 31 May 2021 16:16:40 GMT]]></title><description><![CDATA[<p dir="auto">thank you.</p>
<p dir="auto">also, maybe <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> can help me with a similar problem:</p>
<p dir="auto">I have this 4 lines:</p>
<pre><code> &lt;link rel="canonical" href="https://website.com/en/camera.html" /&gt;
</code></pre>
<p dir="auto">and</p>
<pre><code>	&lt;div class="somers"&gt;&lt;a href="https://othersite/fffffon.html" class="flags bg" hreflang="bg" title="bk"&gt;&lt;/a&gt;
&lt;a href="https://roberta.com/test-lofet.html" class="flags sk" hreflang="sk" title="sk"&gt;&lt;/a&gt;
&lt;a href="https://cameleon.com/america.html" class="flags uk" hreflang="uk" title="uk"&gt;&lt;/a&gt;
</code></pre>
<p dir="auto">I want to copy <code>https://website.com/en/camera.html</code> from canonical tag, and copy/replace those 3 links on other line with it.</p>
<p dir="auto">My regex change only the first of the first three, don’t know why :(</p>
<p dir="auto">Search: <code>(?s)&lt;link rel="canonical" href="(.*?)"\h/&gt;.*?&lt;a href="\K.*?(?="\hclass="flags)</code><br />
Replace by: <code>\1</code></p>
<p dir="auto"><strong>The pattern I follow is:</strong></p>
<p dir="auto">FIND:  <code>(?s)PART-A(.*?)PART-B.*?SECOND-A\K.*?(?=SECOND-2)</code><br />
REPLACE BY:  <code>\1</code></p>
<p dir="auto">The output:</p>
<pre><code>	&lt;div class="somers"&gt;&lt;a href="https://website.com/en/camera.html" class="flags bg" hreflang="bg" title="bk"&gt;&lt;/a&gt;
&lt;a href="https://website.com/en/camera.html" class="flags sk" hreflang="sk" title="sk"&gt;&lt;/a&gt;
&lt;a href="https://website.com/en/camera.html" class="flags uk" hreflang="uk" title="uk"&gt;&lt;/a&gt;
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/66512</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/66512</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Mon, 31 May 2021 16:16:40 GMT</pubDate></item><item><title><![CDATA[Reply to why does this parsing not work? Replace the content of html tags between comments section on Mon, 31 May 2021 11:41:56 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/robin-cruise" aria-label="Profile: robin-cruise">@<bdi>robin-cruise</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">Firstly, I just <strong>cannot</strong> understand your <strong>last</strong> regex S/R :</p>
<p dir="auto">SEARCH <strong><code>(?:.*?&lt;!-- Form Start --&gt;|\G).*?\K&lt;p&gt;(.*?)(?=&lt;/p&gt;.*?&lt;!-- Form Final --&gt;)</code></strong><br />
1<br />
REPLACE <strong><code>\2&lt;p class="STAR-ONE"&gt;\1\3</code></strong></p>
<p dir="auto">Indeed, in <strong>replacement</strong>, you have <strong>three</strong> groups <strong><code>1</code></strong>, <strong><code>2</code></strong> and <strong><code>3</code></strong> but your <strong>search</strong> regex contains <strong>only one</strong> group <strong><code>(.*?)</code></strong> !? I verified that, after <strong>each</strong> replace operation, the groups <strong><code>2</code></strong> and <strong><code>3</code></strong> are <strong>always</strong> empty !</p>
<hr />
<p dir="auto">Secondly, you should have expressed your <strong>initial</strong> goal as :</p>
<p dir="auto">" I have some <strong><code>&lt;p&gt;</code>Some Text<code>&lt;/p&gt;</code></strong> zones and I would like to change them into <strong><code>&lt;p class="STAR-ONE"&gt;</code>SAME Text<code>&lt;/p&gt;</code></strong> "</p>
<p dir="auto">It’s a little bit <strong>clearer</strong> !</p>
<hr />
<p dir="auto">Thirdly :</p>
<ul>
<li>
<p dir="auto">You could had added the <strong><code>(?s)</code></strong> modifier, at <strong>beginning</strong> of your regex, in order to <strong>not</strong> care about the <strong><code>. matches newline</code></strong> option !</p>
</li>
<li>
<p dir="auto">You could had used used the more <strong>accurate</strong> <strong><code>^\h*</code></strong> syntax, instead of <strong><code>.*?</code></strong>, at beginning of the <strong>non-capturing</strong> group</p>
</li>
<li>
<p dir="auto">You could had added the <strong>negative</strong> look-around <strong><code>(?!\A)</code></strong>, right <strong>before</strong> the <strong><code>\G</code></strong> assertion. Indeed, as the <strong><code>Wrap around</code></strong> option is <strong>set</strong>, the regex engine starts the replacement process from the <strong>very beginning</strong> of file, whatever the current <strong>caret</strong> location, and the <strong><code>(?!\A)</code></strong> syntax ensures that the regex engine will not used the <strong>second</strong> alternative <strong><code>\G</code></strong> but will look, instead, for a <strong><code>&lt;!-- Form Start --&gt;</code></strong> line, <strong>first</strong> !</p>
</li>
</ul>
<hr />
<p dir="auto">Fourthly, your regex <strong>cannot</strong> work with, for instance, the text below, where I <strong>duplicated</strong> your <strong>initial</strong> example and, <strong>in between</strong>, I <strong>inserted</strong> the <strong>same</strong> section, <strong>without</strong> the boundaries <strong><code>&lt;!-- Form Start --&gt;</code></strong> and <strong><code>&lt;!-- Form Final --&gt;</code></strong></p>
<pre><code class="language-diff">       &lt;!-- Form Start --&gt;
    &lt;div class="55df" &gt;
        &lt;div class="gg44"&gt;
            &lt;h4 class="header-text"&gt;United Romaketh&lt;/h4&gt;
            &lt;img src="https://sensy.com/33.png" alt="Alternate Text" /&gt;
        &lt;/div&gt;
        &lt;!-- Identify  --&gt;
        &lt;div class="45de"&gt;
            &lt;div class="col"&gt;
                &lt;div class="body-text"&gt;
                    &lt;h4&gt;Marcus 33&lt;/h4&gt;
                    &lt;p&gt;Can you tell me?&lt;/p&gt;
                &lt;/div&gt;
                &lt;div class="yy"&gt;
                    &lt;!-- Yesd. --&gt;

                    &lt;form action="https://www.gre.com/" method="post" class="similar"&gt;

                        &lt;!-- Stones --&gt;
                        &lt;input type="hidden" name="business" value="erer@gmail.com"&gt;

                        &lt;!-- button simple --&gt;
                        &lt;input type="hidden" name="cmd" value="_buttons"&gt;

                        &lt;!-- contribution --&gt;
                        &lt;input type="hidden" name="item_name" value="Maxim"&gt;
                        &lt;input type="hidden" name="item_number" value="Maxim"&gt;
                        &lt;select name="amount"&gt;&lt;option value="3.00"&gt;&amp;euro;3.00&lt;/option&gt;&lt;option value="5.00"&gt;&amp;euro;5.00&lt;/option&gt;&lt;option value="10.00"&gt;&amp;euro;10.00&lt;/option&gt;&lt;option value="25.00"&gt;&amp;euro;25.00&lt;/option&gt;&lt;option value="50.00"&gt;&amp;euro;50.00&lt;/option&gt;&lt;/select&gt;
                        &lt;input type="hidden" name="currency" value="DOL"&gt;

                        &lt;!-- Display the button. --&gt;
                        &lt;input class="paypal-img" type="image" src="https://www.pitt.com/hh.gif" border="0" name="submit" title="yy" alt="button" /&gt;
                    &lt;/form&gt;




                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col"&gt;
                &lt;div class="body-text"&gt;
                    &lt;h4&gt;I am here&lt;/h4&gt;
                    &lt;p&gt;My text here&lt;/p&gt;
                &lt;/div&gt;
                &lt;div class="gono"&gt;
                    &lt;form action="https://www.concate.com/donate" method="post" target="_top"&gt;
                        &lt;input type="hidden" name="444" value="7Z7JBUL" /&gt;
                        &lt;input class="r-img" type="image" src="https://www.rer.com/" border="0" name="submit" title="d" alt="sdsd" /&gt;
                        &lt;img alt="" border="0" src="https://www.dd.com/pixel.gif" width="1" height="1" /&gt;
                    &lt;/form&gt;
                &lt;/div&gt;
            &lt;/div&gt;

        &lt;/div&gt;

    &lt;/div&gt;
    &lt;div class="Home Store"&gt;
        &lt;h4&gt;I am here&lt;/h4&gt;
        &lt;p&gt;my dauther loves me&lt;/p&gt;
        &lt;div class="text-sdsg"&gt;
            Love Me tender
        &lt;/div&gt;
    &lt;/div&gt;
    
                &lt;!-- Form Final --&gt;
&lt;!-- ------------------------------------------------------------------------------------------------------------------------------- --&gt;
    &lt;div class="55df" &gt;
        &lt;div class="gg44"&gt;
            &lt;h4 class="header-text"&gt;United Romaketh&lt;/h4&gt;
            &lt;img src="https://sensy.com/33.png" alt="Alternate Text" /&gt;
        &lt;/div&gt;
        &lt;!-- Identify  --&gt;
        &lt;div class="45de"&gt;
            &lt;div class="col"&gt;
                &lt;div class="body-text"&gt;
                    &lt;h4&gt;Marcus 33&lt;/h4&gt;
                    &lt;p&gt;Can you tell me?&lt;/p&gt;
                &lt;/div&gt;
                &lt;div class="yy"&gt;
                    &lt;!-- Yesd. --&gt;

                    &lt;form action="https://www.gre.com/" method="post" class="similar"&gt;

                        &lt;!-- Stones --&gt;
                        &lt;input type="hidden" name="business" value="erer@gmail.com"&gt;

                        &lt;!-- button simple --&gt;
                        &lt;input type="hidden" name="cmd" value="_buttons"&gt;

                        &lt;!-- contribution --&gt;
                        &lt;input type="hidden" name="item_name" value="Maxim"&gt;
                        &lt;input type="hidden" name="item_number" value="Maxim"&gt;
                        &lt;select name="amount"&gt;&lt;option value="3.00"&gt;&amp;euro;3.00&lt;/option&gt;&lt;option value="5.00"&gt;&amp;euro;5.00&lt;/option&gt;&lt;option value="10.00"&gt;&amp;euro;10.00&lt;/option&gt;&lt;option value="25.00"&gt;&amp;euro;25.00&lt;/option&gt;&lt;option value="50.00"&gt;&amp;euro;50.00&lt;/option&gt;&lt;/select&gt;
                        &lt;input type="hidden" name="currency" value="DOL"&gt;

                        &lt;!-- Display the button. --&gt;
                        &lt;input class="paypal-img" type="image" src="https://www.pitt.com/hh.gif" border="0" name="submit" title="yy" alt="button" /&gt;
                    &lt;/form&gt;




                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col"&gt;
                &lt;div class="body-text"&gt;
                    &lt;h4&gt;I am here&lt;/h4&gt;
                    &lt;p&gt;My text here&lt;/p&gt;
                &lt;/div&gt;
                &lt;div class="gono"&gt;
                    &lt;form action="https://www.concate.com/donate" method="post" target="_top"&gt;
                        &lt;input type="hidden" name="444" value="7Z7JBUL" /&gt;
                        &lt;input class="r-img" type="image" src="https://www.rer.com/" border="0" name="submit" title="d" alt="sdsd" /&gt;
                        &lt;img alt="" border="0" src="https://www.dd.com/pixel.gif" width="1" height="1" /&gt;
                    &lt;/form&gt;
                &lt;/div&gt;
            &lt;/div&gt;

        &lt;/div&gt;

    &lt;/div&gt;
    &lt;div class="Home Store"&gt;
        &lt;h4&gt;I am here&lt;/h4&gt;
        &lt;p&gt;my dauther loves me&lt;/p&gt;
        &lt;div class="text-sdsg"&gt;
            Love Me tender
        &lt;/div&gt;
    &lt;/div&gt;
&lt;!-- ------------------------------------------------------------------------------------------------------------------------------- --&gt;
       &lt;!-- Form Start --&gt;
    &lt;div class="55df" &gt;
        &lt;div class="gg44"&gt;
            &lt;h4 class="header-text"&gt;United Romaketh&lt;/h4&gt;
            &lt;img src="https://sensy.com/33.png" alt="Alternate Text" /&gt;
        &lt;/div&gt;
        &lt;!-- Identify  --&gt;
        &lt;div class="45de"&gt;
            &lt;div class="col"&gt;
                &lt;div class="body-text"&gt;
                    &lt;h4&gt;Marcus 33&lt;/h4&gt;
                    &lt;p&gt;Can you tell me?&lt;/p&gt;
                &lt;/div&gt;
                &lt;div class="yy"&gt;
                    &lt;!-- Yesd. --&gt;

                    &lt;form action="https://www.gre.com/" method="post" class="similar"&gt;

                        &lt;!-- Stones --&gt;
                        &lt;input type="hidden" name="business" value="erer@gmail.com"&gt;

                        &lt;!-- button simple --&gt;
                        &lt;input type="hidden" name="cmd" value="_buttons"&gt;

                        &lt;!-- contribution --&gt;
                        &lt;input type="hidden" name="item_name" value="Maxim"&gt;
                        &lt;input type="hidden" name="item_number" value="Maxim"&gt;
                        &lt;select name="amount"&gt;&lt;option value="3.00"&gt;&amp;euro;3.00&lt;/option&gt;&lt;option value="5.00"&gt;&amp;euro;5.00&lt;/option&gt;&lt;option value="10.00"&gt;&amp;euro;10.00&lt;/option&gt;&lt;option value="25.00"&gt;&amp;euro;25.00&lt;/option&gt;&lt;option value="50.00"&gt;&amp;euro;50.00&lt;/option&gt;&lt;/select&gt;
                        &lt;input type="hidden" name="currency" value="DOL"&gt;

                        &lt;!-- Display the button. --&gt;
                        &lt;input class="paypal-img" type="image" src="https://www.pitt.com/hh.gif" border="0" name="submit" title="yy" alt="button" /&gt;
                    &lt;/form&gt;




                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col"&gt;
                &lt;div class="body-text"&gt;
                    &lt;h4&gt;I am here&lt;/h4&gt;
                    &lt;p&gt;My text here&lt;/p&gt;
                &lt;/div&gt;
                &lt;div class="gono"&gt;
                    &lt;form action="https://www.concate.com/donate" method="post" target="_top"&gt;
                        &lt;input type="hidden" name="444" value="7Z7JBUL" /&gt;
                        &lt;input class="r-img" type="image" src="https://www.rer.com/" border="0" name="submit" title="d" alt="sdsd" /&gt;
                        &lt;img alt="" border="0" src="https://www.dd.com/pixel.gif" width="1" height="1" /&gt;
                    &lt;/form&gt;
                &lt;/div&gt;
            &lt;/div&gt;

        &lt;/div&gt;

    &lt;/div&gt;
    &lt;div class="Home Store"&gt;
        &lt;h4&gt;I am here&lt;/h4&gt;
        &lt;p&gt;my dauther loves me&lt;/p&gt;
        &lt;div class="text-sdsg"&gt;
            Love Me tender
        &lt;/div&gt;
    &lt;/div&gt;
    
                &lt;!-- Form Final --&gt;
</code></pre>
<hr />
<p dir="auto">Finally, we should use, from this <a href="https://community.notepad-plus-plus.org/post/62799">post</a>, the <strong>generic</strong> regex S/R, below :</p>
<p dir="auto">SEARCH <strong><code>(?-i:</code>BSR<code>|(?!\A)\G)(?s-i:(?!</code>ESR<code>).)*?\K(?-i:</code>FR<code>)</code></strong></p>
<p dir="auto">REPLACE <strong>RR</strong></p>
<p dir="auto">with :</p>
<ul>
<li>
<p dir="auto"><strong>BSR</strong> ( <em>Begin Search-region Regex</em> ) = <strong><code>^\h*&lt;!-- Form Start --&gt;</code></strong></p>
</li>
<li>
<p dir="auto"><strong>ESR</strong> ( <em>End Search-region Regex</em> ) = <strong><code>^\h*&lt;!-- Form Final --&gt;</code></strong></p>
</li>
<li>
<p dir="auto"><strong>FR</strong> ( <em>Find Regex</em> ) = <strong><code>&lt;p&gt;</code></strong></p>
</li>
<li>
<p dir="auto"><strong>FR</strong> ( <em>Find Regex</em> ) = <strong><code>&lt;p class="STAR-ONE"&gt;</code></strong></p>
</li>
</ul>
<p dir="auto">This leads to the <strong>effective</strong> regex :</p>
<ul>
<li>
<p dir="auto">SEARCH <strong><code>(?-i:^\h*&lt;!-- Form Start --&gt;|(?!\A)\G)(?s-i:(?!^\h*&lt;!-- Form Final --&gt;).)*?\K(?-i:&lt;p&gt;)</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>&lt;p class="STAR-ONE"&gt;</code></strong></p>
</li>
</ul>
<p dir="auto">But, as the <strong><code>-i</code></strong> modifier is used <strong>everywhere</strong> and as the <strong><code>(?s)</code></strong> dot is used for a <strong>single</strong> <strong><code>.</code></strong>, <strong>only</strong>, we can even <strong>simplify</strong> the S/R as :</p>
<ul>
<li>
<p dir="auto">SEARCH <strong><code>(?s-i)(?:^\h*&lt;!-- Form Start --&gt;|(?!\A)\G)(?:(?!^\h*&lt;!-- Form Final --&gt;).)*?\K&lt;p&gt;</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>&lt;p class="STAR-ONE"&gt;</code></strong></p>
</li>
</ul>
<p dir="auto">which <strong>correctly</strong> matches <strong><code>6</code></strong> occurrences in my <strong>above</strong> example ( = <strong><code>3 x 2</code></strong> zones <strong><code>&lt;!-- Form Start --&gt;•••••&lt;!-- Form Final --&gt;</code></strong> ) !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/66498</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/66498</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 31 May 2021 11:41:56 GMT</pubDate></item><item><title><![CDATA[Reply to why does this parsing not work? Replace the content of html tags between comments section on Mon, 31 May 2021 08:57:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robin-cruise" aria-label="Profile: Robin-Cruise">@<bdi>Robin-Cruise</bdi></a> said in <a href="/post/66496">why does this parsing not work? Replace the content of html tags between comments section</a>:</p>
<blockquote>
<p dir="auto">(?:.<em>?&lt;!-- Form Start --&gt;|\G).</em>?\K(&lt;p&gt;).<em>?(?=&lt;/p&gt;.</em>?&lt;!-- Form Final --&gt;)</p>
</blockquote>
<p dir="auto">I find the answer, thanks:</p>
<p dir="auto">FIND: <code>(?:.*?&lt;!-- Form Start --&gt;|\G).*?\K&lt;p&gt;(.*?)(?=&lt;/p&gt;.*?&lt;!-- Form Final --&gt;)</code><br />
Replace by: <code>\2&lt;p class="STAR-ONE"&gt;\1\3</code></p>
<p dir="auto"><strong>CHECK</strong> Wrap around<br />
<strong>CHECK</strong> Regular expression<br />
<strong>CHECK</strong> . matches newline</p>
]]></description><link>https://community.notepad-plus-plus.org/post/66497</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/66497</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Mon, 31 May 2021 08:57:33 GMT</pubDate></item></channel></rss>