<?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[regex: Parsing html tags in other tags / links and titles]]></title><description><![CDATA[<pre><code>&lt;ul id="myNavigation"&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-1.html" title="Page 1"&gt;Page 1 (34)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-2.html" title="Page 2"&gt;Page 2 (29)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-3.html" title="Page-3"&gt;Page 3 (11)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<p dir="auto">MUST BECOME:</p>
<pre><code>&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-66.html" title="Page 66"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page 66 &lt;span&gt;27&lt;/span&gt; &lt;/p&gt;
  &lt;/a&gt;
&lt;/div&gt;
&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-67.html" title="Page 67"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page 67 &lt;span&gt;24&lt;/span&gt; &lt;/p&gt;
   &lt;/a&gt;
&lt;/div&gt;
&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-68.html" title="Page 68"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page 68 &lt;span&gt;07&lt;/span&gt; &lt;/p&gt;
   &lt;/a&gt;
&lt;/div&gt;
</code></pre>
<p dir="auto">can something like this be done with regex?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/20844/regex-parsing-html-tags-in-other-tags-links-and-titles</link><generator>RSS for Node</generator><lastBuildDate>Fri, 16 Oct 2026 05:52:24 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/20844.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 06 Mar 2021 15:26:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Fri, 12 Mar 2021 08:20:51 GMT]]></title><description><![CDATA[<p dir="auto">of course there are others, but only <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> helped me and all notepad++ community with so hard to find solutions.</p>
<p dir="auto">and I am using <code>notepad++</code> and <code>grepWin</code> (and as for the Batch Process I using a great tool named <code>TextCrawler</code>)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63829</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63829</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Fri, 12 Mar 2021 08:20:51 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Fri, 12 Mar 2021 02:47:43 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 <strong>All</strong>,</p>
<p dir="auto">You said :</p>
<blockquote>
<p dir="auto">I believe, you are the best regex developer in the entire word.</p>
</blockquote>
<p dir="auto">I would say <strong>definitively</strong> not the <strong>best</strong> !</p>
<p dir="auto">For instance, just think of this <strong>man</strong> <a href="https://www.regular-expressions.info/about.html" rel="nofollow ugc">here</a> and <a href="https://www.just-great-software.com/aboutjg.html" rel="nofollow ugc">here</a>.</p>
<p dir="auto"><strong><code>Jan Goyvaerts</code></strong> :</p>
<ul>
<li>
<p dir="auto">Created the fantastic <strong><code>regular-expression.info</code></strong> site and still <strong>maintains</strong> it !</p>
</li>
<li>
<p dir="auto">Developed all these <strong>valuable</strong> regex tools : <strong><code>PowerGREP</code></strong>, <strong><code>RegexBuddy</code></strong>, <strong><code>RegexMagic</code></strong> and <strong><code>EditPad Pro</code></strong></p>
</li>
</ul>
<hr />
<p dir="auto">This is just an example of the <strong>many</strong> developers, involved in <strong>regular</strong> expressions !</p>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63827</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63827</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Fri, 12 Mar 2021 02:47:43 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Thu, 11 Mar 2021 19:36:30 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> thank you, I knew that you can do it. I believe, you are the best regex developer in the entire word.</p>
<p dir="auto">I understood one thing. Never say “it can’t be done” and even if it can’t be done in one way, you can always find another way. Be open to another programs.</p>
<p dir="auto">Much more important: if you give someone a new perspective, that someone will be able to see clearly the problem and to find the solution much easy.</p>
<p dir="auto">So, my friends. Thanks a lot, from now on I know that many people understood also the power of PowerShell, and it can be used very often to modify files by integrate regex.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63808</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63808</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Thu, 11 Mar 2021 19:36:30 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Thu, 11 Mar 2021 18:57:48 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>
<p dir="auto">Hi Guy… it is too funny.<br />
Now, before solving a problem, you have to solve another problem: What the problem actually is!<br />
It’s good that you have the talent and perseverance to do that; well, it’s good for the OP I suppose.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63807</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63807</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 11 Mar 2021 18:57:48 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Thu, 11 Mar 2021 19:46: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>, <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">OMG, now I understand the <strong>all story</strong> ! In fact, you’re did <strong>not</strong> express your needs correctly, in your <strong>first</strong> post ! The <strong><code>File-2.tml</code></strong> is <strong>useless</strong> and we just can go from the <strong><code>result_1.hmtl</code></strong> file to the <strong><code>result.html</code></strong> file !</p>
<p dir="auto">Indeed, in your <strong>first</strong> post, you said :</p>
<blockquote>
<pre><code class="language-html">&lt;ul id="myNavigation"&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-1.html" title="Page 1"&gt;Page 1 (34)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-2.html" title="Page 2"&gt;Page 2 (29)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-3.html" title="Page-3"&gt;Page 3 (11)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<p dir="auto">MUST BECOME:</p>
<pre><code class="language-html">&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-66.html" title="Page 66"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page 66 &lt;span&gt;27&lt;/span&gt; &lt;/p&gt;
  &lt;/a&gt;
&lt;/div&gt;
&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-67.html" title="Page 67"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page 67 &lt;span&gt;24&lt;/span&gt; &lt;/p&gt;
   &lt;/a&gt;
&lt;/div&gt;
&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-68.html" title="Page 68"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page 68 &lt;span&gt;07&lt;/span&gt; &lt;/p&gt;
   &lt;/a&gt;
&lt;/div&gt;
</code></pre>
<p dir="auto">can something like this be done with regex?</p>
</blockquote>
<p dir="auto">But… you <strong>SHOULD</strong> have written :</p>
<blockquote>
<pre><code class="language-html">&lt;ul id="myNavigation"&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-1.html" title="Page 1"&gt;Page 1 (34)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-2.html" title="Page 2"&gt;Page 2 (29)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-3.html" title="Page-3"&gt;Page 3 (11)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<p dir="auto">MUST BECOME</p>
<pre><code class="language-html">&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-1.html" title="Page 1"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page 1 &lt;span&gt;34&lt;/span&gt; &lt;/p&gt;
  &lt;/a&gt;
&lt;/div&gt;
&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-2.html" title="Page 2"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page 2 &lt;span&gt;29&lt;/span&gt; &lt;/p&gt;
   &lt;/a&gt;
&lt;/div&gt;
&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-3.html" title="Page-3"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page-3 &lt;span&gt;11&lt;/span&gt; &lt;/p&gt;
   &lt;/a&gt;
&lt;/div&gt;
</code></pre>
<p dir="auto">can something like this be done with regex?</p>
</blockquote>
<p dir="auto">And <strong>yes</strong>, this <strong>transformation</strong> can, indeed, be solved with <em>ONE</em> <strong>regex</strong> S/R only !!!</p>
<p dir="auto">What misled me was the fact that your <strong>output</strong> file contained <strong>other</strong> values than the ones indicated in the <strong>initial</strong> file ! ( <strong><code>Page 66 &lt;span&gt;27&lt;/span&gt;, Page 67 &lt;span&gt;24&lt;/span&gt;, Page 68 &lt;span&gt;07&lt;/span&gt;...</code></strong> which are <strong>completely</strong> out of scope :-(( I <strong>vainly</strong> looked for a <strong>link</strong> between, for example, the strings <strong><code>"Page 1"&gt;Page 1 (34)</code></strong> and <strong><code>Page 66 &lt;span&gt;27&lt;/span&gt;</code></strong> !</p>
<hr />
<p dir="auto">So, <strong>Robin</strong>, now, it’s <strong>fairly</strong> easy to get the <strong>right</strong> regex S/R !</p>
<p dir="auto">From this <strong>initial</strong> text</p>
<pre><code class="language-html">===========================================================================================================================================
&lt;ul id="myNavigation"&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-1.html" title="Page 1"&gt;Page 1 (34)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-2.html" title="Page 2"&gt;Page 2 (29)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-3.html" title="Page-3"&gt;Page 3 (11)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
===========================================================================================================================================
</code></pre>
<p dir="auto">with the following <strong>regex</strong> S/R :</p>
<p dir="auto">SEARCH <strong><code>(?-i)^\h*&lt;li&gt;&lt;a href="https://my\-website.com/(.+?)" title="(.+?)"&gt;.+?\((.+?)\)&lt;/a&gt;&lt;/li&gt;|&lt;(ul id="myNavigation"|/ul)&gt;\R</code></strong></p>
<p dir="auto">REPLACE <strong><code>?4:&lt;div class="categories-name"&gt;\r\n\x20\x20\x20&lt;a href="https://my-website.com/\1" title="\2"&gt;\r\n\x20\x20\x20&lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt;\x20\2\x20&lt;span&gt;\3&lt;/span&gt; &lt;/p&gt;\r\n\x20\x20\x20&lt;/a&gt;\r\n&lt;/div&gt;</code></strong></p>
<p dir="auto">we <strong>do</strong> get the <strong>expected</strong> text, totally <strong>identical</strong> to your <strong><code>result.html</code></strong> contents ! Moreover, you do <strong>not</strong> need the <strong><code>Powershell</code></strong> script any more !</p>
<pre><code class="language-html">===========================================================================================================================================
&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-1.html" title="Page 1"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page 1 &lt;span&gt;34&lt;/span&gt; &lt;/p&gt;
   &lt;/a&gt;
&lt;/div&gt;
&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-2.html" title="Page 2"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page 2 &lt;span&gt;29&lt;/span&gt; &lt;/p&gt;
   &lt;/a&gt;
&lt;/div&gt;
&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-3.html" title="Page-3"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page-3 &lt;span&gt;11&lt;/span&gt; &lt;/p&gt;
   &lt;/a&gt;
&lt;/div&gt;
===========================================================================================================================================
</code></pre>
<p dir="auto">Et voilà !</p>
<hr />
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">The <strong>groups</strong> used are :</p>
<ul>
<li>
<p dir="auto"><strong>Group <code>1</code></strong> : the part after <strong><a href="http://website.com/" rel="nofollow ugc">website.com/</a></strong> till the <strong>double</strong> quote, <strong>not</strong> included</p>
</li>
<li>
<p dir="auto"><strong>Group <code>2</code></strong> : the <strong>title</strong> part</p>
</li>
<li>
<p dir="auto"><strong>Group <code>3</code></strong> : the string between <strong>parentheses</strong>, <strong>before</strong> <strong><code>&lt;/a&gt;</code></strong></p>
</li>
<li>
<p dir="auto"><strong>Group <code>4</code></strong> : either the <strong>literal</strong> string <strong><code>&lt;ul id="myNavigation"&gt;</code></strong> or the <strong>literal</strong> string <strong><code>&lt;/ul&gt;</code></strong>, which must be <strong>deleted</strong>, in <strong>replacement</strong></p>
</li>
</ul>
</li>
<li>
<p dir="auto">Ths regex string <strong><code>\x20\x20\x20</code></strong> occurs <strong>three</strong> times, in the <strong>replacement</strong> regex, and correspond to the needed <strong>leading spaces</strong> in each <strong><code>&lt;div ......&lt;/div&gt;</code></strong> <strong>section</strong>. Changed it as <strong>desired</strong> !</p>
</li>
</ul>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
<p dir="auto"><strong>P.S.</strong> :</p>
<p dir="auto">And, if you want to change the lines <strong><code>&lt;li&gt;.........&lt;/li&gt;</code></strong>, <em>ONLY</em> <strong>inside</strong> the <strong><code>&lt;ul...............&lt;/ul&gt;</code></strong> sections, use this <strong>second</strong> regex S/R, <strong>derived</strong> of the <strong>generic</strong> regex S/R, discussed in <strong>other</strong> topics :</p>
<p dir="auto">SEARCH <strong><code>(?s-i)(?:&lt;ul id="myNavigation"&gt;|(?!\A)\G)(?:(?!&lt;/ul&gt;).)*?\K^\h*&lt;li&gt;&lt;a href="https://my\-website.com/(.+?)" title="(.+?)"&gt;.+?\((.+?)\)&lt;/a&gt;&lt;/li&gt;</code></strong></p>
<p dir="auto">REPLACE <strong><code>&lt;div class="categories-name"&gt;\r\n\x20\x20\x20&lt;a href="https://my-website.com/\1" title="\2"&gt;\r\n\x20\x20\x20&lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt;\x20\2\x20&lt;span&gt;\3&lt;/span&gt; &lt;/p&gt;\r\n\x20\x20\x20&lt;/a&gt;\r\n&lt;/div&gt;</code></strong></p>
<hr />
<p dir="auto">Now, end the job, getting rid of the <strong>literal</strong> string <strong><code>&lt;ul id="myNavigation"&gt;</code></strong> and the <strong>literal</strong> string <strong><code>&lt;/ul&gt;</code></strong>, with, simply :</p>
<p dir="auto">SEARCH <strong><code>(?-i)&lt;(ul id="myNavigation"|/ul)&gt;\R</code></strong></p>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
<p dir="auto">We need <strong>consecutive</strong> regexes S/R because the values <strong><code>&lt;ul id="myNavigation"&gt;</code></strong> and <strong><code>&lt;/ul&gt;</code></strong> are used as <strong>anchors</strong>, in the <strong>first</strong> generic S/R and must <strong>not</strong> be <strong>deleted</strong> during the <strong>first</strong> regex process !</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63806</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63806</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 11 Mar 2021 19:46:56 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Thu, 11 Mar 2021 15:24:38 GMT]]></title><description><![CDATA[<p dir="auto">the single problem in PowerShell is that not every regex formulas that works in notepad++ works there. Seems that PowerShell don’t like <code>\K</code> or <code>\G</code> or replacement such as <code>(?2\2)</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/63801</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63801</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Thu, 11 Mar 2021 15:24:38 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Thu, 11 Mar 2021 15:13:19 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> this is the <code>result.html</code> after run the PowerShell code</p>
<p dir="auto"><img src="https://snipboard.io/htwEJ1.jpg" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/63799</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63799</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Thu, 11 Mar 2021 15:13:19 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Thu, 11 Mar 2021 15:09:00 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>
<p dir="auto">OK but could you provide the <strong><code>result.html</code></strong> file <em>AFTER</em> running the <strong><code>Powershell</code></strong> script !</p>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
<p dir="auto">Sorry, with my old <strong><code>XP SP3</code></strong> machine is a bit <strong>out</strong> of date !</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63798</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63798</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 11 Mar 2021 15:09:00 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Thu, 11 Mar 2021 15:06:05 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> <code>result.html</code> is just a blank file, put in the same folder with <code>File1.html</code> and <code>File2.html</code></p>
<p dir="auto">After you run the code in PowerShell, the output result will appear into <code>result.html</code></p>
<p dir="auto">please test the PowerShell code. You will see in <code>result.html</code> the structure html from the <code>File2.html</code> but with the values extracted from <code>File1.html</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/63797</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63797</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Thu, 11 Mar 2021 15:06:05 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Thu, 11 Mar 2021 15:01:32 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/63788">regex: Parsing html tags in other tags / links and titles</a>:</p>
<blockquote>
<p dir="auto">but this is really off-topic for a Notepad++ forum</p>
</blockquote>
<p dir="auto">No, sir. Is an opportunity to understand that a problem has many solution, even if people told you that isn’t possible.</p>
<p dir="auto">By the way, the same problem can be done in LINUX, much easier…with bash script, but that’s another story.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63795</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63795</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Thu, 11 Mar 2021 15:01:32 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Thu, 11 Mar 2021 15:01:47 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>
<p dir="auto">But, could you provide, also, the <strong><code>result.html</code></strong> file ?</p>
<p dir="auto">Thanks</p>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63794</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63794</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 11 Mar 2021 15:01:47 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Thu, 11 Mar 2021 14:56:51 GMT]]></title><description><![CDATA[<p dir="auto">File1.html</p>
<pre><code>&lt;ul id="myNavigation"&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-1.html" title="Page 1"&gt;Page 1 (34)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-2.html" title="Page 2"&gt;Page 2 (29)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-3.html" title="Page-3"&gt;Page 3 (11)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<p dir="auto">File2.html</p>
<pre><code>&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-66.html" title="Page 66"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page 66 &lt;span&gt;27&lt;/span&gt; &lt;/p&gt;
  &lt;/a&gt;
&lt;/div&gt;
&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-67.html" title="Page 67"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page 67 &lt;span&gt;24&lt;/span&gt; &lt;/p&gt;
   &lt;/a&gt;
&lt;/div&gt;
&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-68.html" title="Page 68"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page 68 &lt;span&gt;07&lt;/span&gt; &lt;/p&gt;
   &lt;/a&gt;
&lt;/div&gt;
</code></pre>
<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><br />
Thank you. Please understand that finding this solution, was not easy.</p>
<p dir="auto">First, I knew that <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> is one of the best REGEX developer on earth. He already gave a solution, in another post, to a PARSING html. so I thought he would succeed.</p>
<p dir="auto">Second, in another post, someone else gave a solution with PowerShell, of another problem. I remember also that post.</p>
<p dir="auto">So, I knew that this problem can be resolve, but I had to try both options.</p>
<p dir="auto">Now, maybe will be a better way to handle regex and files, by integrate notepad++ them into another program such as PowerShell.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63793</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63793</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Thu, 11 Mar 2021 14:56:51 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Thu, 11 Mar 2021 12:43:30 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>
<p dir="auto"><strong>Nice</strong> ! So you, <strong>finally</strong>, got a working solution.</p>
<hr />
<p dir="auto">Out of curiosity, could you provide me a <strong>short</strong> sample of your initial files <strong><code>file1.html</code></strong> with <strong>several</strong> sections <strong><code>&lt;ul......&lt;/ul&gt;</code></strong> and <strong><code>file2.html</code></strong> and the <strong>corresponding</strong> <strong><code>result.html</code></strong> file, <strong>created</strong> by your <strong><code>Powershell</code></strong> script</p>
<p dir="auto">This could <strong>help</strong> me to understand which you <strong>really</strong> wanted to achieve and why I could <strong>not</strong> imagine about suitable and useful <strong>regexes</strong> !</p>
<p dir="auto">Thanks for your cooperation !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63791</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63791</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 11 Mar 2021 12:43:30 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Thu, 11 Mar 2021 12:31:07 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/63775">regex: Parsing html tags in other tags / links and titles</a>:</p>
<blockquote>
<p dir="auto">This is the solution. Yes, it can be done with regex, but must integrated in powershell.</p>
</blockquote>
<p dir="auto">Ok…  but this is really off-topic for a Notepad++ forum.<br />
Whatever you’re doing could I’m sure be done in many different ways.<br />
This isn’t a general “data manipulation” forum.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63788</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63788</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 11 Mar 2021 12:31:07 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Thu, 11 Mar 2021 09:25:19 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> This is the solution. Yes, it can be done with regex, but must integrated in powershell. Works super !</p>
<pre><code>$file1 = 'c:\Folder1\file1.html'
$file2 = 'c:\Folder1\file2.html'
$result = 'c:\Folder1\result.html'
$link=@()
$title=@()
$number=@()
Get-Content -Path $file1 -Delimiter '&lt;/li&gt;'|ForEach-Object{
    $_|ForEach-Object{
        if($_ -match '(?&lt;=href=").+?(?=")'){$link += $Matches.Values}
        if($_ -match '(?&lt;=title=").+?(?=")'){$title += $Matches.Values}
        if($_ -match '(?&lt;=\()\d+(?=\))'){$number += $Matches.Values}
    }
}
$content = Get-Content -Path $file2 -Delimiter '&lt;/div&gt;'
for($i=0;$i -lt $content.Count;$i++){
    $content[$i] | ForEach-Object{
        if($_ -match '(?&lt;=href=").+?(?=")'){$link2 = $Matches.Values}
        if($_ -match '(?&lt;=title=").+?(?=")'){$title2 = $Matches.Values}
        if($_ -match '(?&lt;=&lt;span&gt;)\d+(?=&lt;/span&gt;)'){$number2 = $Matches.Values}
    }
    $content[$i] -replace $link2, $link[$i] -replace $title2, $title[$i] -replace $number2, $number[$i] | Out-File -FilePath $result -Append
}
</code></pre>
<p dir="auto">Source: <a href="https://docs.microsoft.com/en-us/answers/questions/307621/powershell-copy-strings-from-some-html-tags-to-ano.html" rel="nofollow ugc">https://docs.microsoft.com/en-us/answers/questions/307621/powershell-copy-strings-from-some-html-tags-to-ano.html</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/63775</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63775</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Thu, 11 Mar 2021 09:25:19 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Tue, 09 Mar 2021 22:05:09 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">If you want me to <strong>test</strong> your <strong>two</strong> regex S/R ( Let’s say respectively, S/R <strong><code>A</code></strong> and S/R <strong><code>B</code></strong> )</p>
<ul>
<li>
<p dir="auto">I need an <strong>exact</strong> raw text which must be processed with the SR <strong><code>A</code></strong></p>
</li>
<li>
<p dir="auto">I need any <strong>additional</strong> action, if <strong>any</strong>, which is to be done, after processing S/R <strong><code>A</code></strong> and before processing S/R <strong><code>B</code></strong></p>
</li>
<li>
<p dir="auto">I need an <strong>exact</strong> raw text which must be processed with the S/R <strong><code>B</code></strong> ( Of course, it may be the <strong>result</strong> of the S/R <strong><code>A</code></strong> on the <strong>initial</strong> text )</p>
</li>
</ul>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63744</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63744</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 09 Mar 2021 22:05:09 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Tue, 09 Mar 2021 21:39:12 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> yes, sir. Thank you.  You succeded to transform the part 1 with part 2.</p>
<p dir="auto">My problem, or I didn’t understand to good, are those <code>••••</code></p>
<p dir="auto">How can I change those  many <code>••••</code> with different words and numbers ? If I have 200 lines, I need 2 months to change those  <code>••••</code></p>
<p dir="auto">I return to my regex,</p>
<p dir="auto">please <strong>.matches newlines</strong> and run this 2 regex</p>
<p dir="auto">FIND: <code>(&lt;li&gt;&lt;a href="https://my-website.com/(.*?)" title=".*?)(\h+&lt;a href="https://my-website.com/).*?(" title=")</code></p>
<p dir="auto">REPLACE BY:  <code>\1\3\2\4</code></p>
<p dir="auto">and</p>
<p dir="auto">FIND: <code>(title="(.*?)"&gt;.*?)(mr-1"&gt;&lt;/i&gt; ).*?(&lt;span&gt;)</code></p>
<p dir="auto">REPLACE BY:  <code>\1\3\2 \4</code></p>
<p dir="auto">With this 2 regex, I manage to make a parsing. I copy a information from part 1 to part 2. Of course, is an example of how the formula should work</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63742</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63742</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Tue, 09 Mar 2021 21:39:12 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Tue, 09 Mar 2021 19:46:19 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 <strong>All</strong>,</p>
<p dir="auto">When I said, in my <strong>previous</strong> post :</p>
<blockquote>
<p dir="auto">More generally, you would like that <strong>any</strong> line, as below, in a <strong><code>&lt;ul .............&lt;/ul&gt;</code></strong> <strong>section</strong> :</p>
</blockquote>
<blockquote>
<pre><code class="language-html">¤¤¤¤&lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
</code></pre>
</blockquote>
<blockquote>
<p dir="auto">is <strong>changed</strong> into :</p>
</blockquote>
<blockquote>
<pre><code class="language-html">&lt;div class="categories-name"&gt;
¤¤¤¤&lt;a href="https://my-website.com/••••.html" title="••••"&gt;
¤¤¤¤&lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; •••• &lt;span&gt;••••&lt;/span&gt; &lt;/p&gt;
¤¤¤¤&lt;/a&gt;
&lt;/div&gt;
</code></pre>
</blockquote>
<p dir="auto">This can be achieved with the following <strong>regex</strong> S/R, <strong>without</strong> any group :</p>
<p dir="auto">SEARCH <strong><code>^\h*&lt;li&gt;&lt;a href="https://my\-website.com/.+?\.html" title=".+?"&gt;.+?&lt;/a&gt;&lt;/li&gt;</code></strong></p>
<p dir="auto">REPLACE <strong><code>&lt;div class="categories-name"&gt;\r\n    &lt;a href="https://my-website.com/••••.html" title="••••"&gt;\r\n    &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt;••••&lt;span&gt;••••&lt;/span&gt; &lt;/p&gt;\r\n    &lt;/a&gt;\r\n&lt;/div&gt;</code></strong></p>
<p dir="auto">So, from any <strong>initial</strong> line, inside a <strong><code>&lt;ul .............&lt;/ul&gt;</code></strong> <strong>section</strong>, as below :</p>
<pre><code class="language-html">            &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
</code></pre>
<p dir="auto">You get these <strong>output</strong> lines :</p>
<pre><code class="language-html">&lt;div class="categories-name"&gt;
    &lt;a href="https://my-website.com/••••.html" title="••••"&gt;
    &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt;••••&lt;span&gt;••••&lt;/span&gt; &lt;/p&gt;
    &lt;/a&gt;
&lt;/div&gt;
</code></pre>
<p dir="auto">Just try it out !</p>
<hr />
<p dir="auto">Now, the problem is <em>HOW</em> to <strong>perform</strong> this S/R, <em>ONLY</em> on lines <strong>inside</strong> these <strong><code>&lt;ul&gt;</code></strong> sections, below  :</p>
<pre><code class="language-html">&lt;ul id="myNavigation"&gt;
....
....
....
&lt;/ul&gt;
</code></pre>
<p dir="auto">To do that, we’ll use, again, the <strong>generic</strong> regex, already discussed, with :</p>
<p dir="auto"><strong>BSR</strong> = <strong><code>&lt;ul id="myNavigation"&gt;</code></strong><br />
<strong>ESR</strong> = <strong><code>(?!&lt;/ul&gt;)</code></strong><br />
<strong>SR</strong> = <strong><code>^\h*&lt;li&gt;&lt;a href="https://my\-website.com/.+?\.html" title=".+?"&gt;.+?&lt;/a&gt;&lt;/li&gt;</code></strong><br />
<strong>RR</strong> = <strong><code>&lt;div class="categories-name"&gt;\r\n    &lt;a href="https://my-website.com/••••.html" title="••••"&gt;\r\n    &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; •••• &lt;span&gt;••••&lt;/span&gt; &lt;/p&gt;\r\n    &lt;/a&gt;\r\n&lt;/div&gt;</code></strong></p>
<p dir="auto">Leading to this <strong>general</strong> S/R :</p>
<p dir="auto">SEARCH <strong><code>(?s-i)(&lt;ul id="myNavigation"&gt;|(?!\A)\G)((?!&lt;/ul&gt;).)*?\K^\h*&lt;li&gt;&lt;a href="https://my\-website.com/.+?\.html" title=".+?"&gt;.+?&lt;/a&gt;&lt;/li&gt;</code></strong></p>
<p dir="auto">REPLACE <strong><code>&lt;div class="categories-name"&gt;\r\n    &lt;a href="https://my-website.com/••••.html" title="••••"&gt;\r\n    &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt;••••&lt;span&gt;••••&lt;/span&gt; &lt;/p&gt;\r\n    &lt;/a&gt;\r\n&lt;/div&gt;</code></strong></p>
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">You must use N++ <strong><code>v7.9.1</code></strong> or a <strong>later</strong> release, which <strong>correctly</strong> handles the <strong><code>\A</code></strong> assertion !</p>
</li>
<li>
<p dir="auto">In replacement, everything is <strong>literal</strong>, but the parts <strong><code>\r\n</code></strong>, standing for <strong><code>Windows</code></strong> <strong>EOL</strong></p>
</li>
<li>
<p dir="auto">Of course, <em>AFTER</em> the replacement, you’ll have to <strong>change</strong> any <strong><code>••••</code></strong> zone with its <strong>exact</strong> contents !</p>
</li>
</ul>
<hr />
<p dir="auto">Let’s try this <strong>final</strong> regex S/R :</p>
<ul>
<li>Place this <strong>sample</strong> text, below, in a N++ <strong>new</strong> tab :</li>
</ul>
<pre><code class="language-html">...
...
&lt;ul id="myNavigation"&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
....
....
....
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;

&lt;ul id="myNavigation"&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
....
....
....
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
</code></pre>
<ul>
<li>
<p dir="auto">Perform the <strong>last</strong> regex S/R, <strong>above</strong></p>
</li>
<li>
<p dir="auto">You’re left with the <strong>expected</strong> text :</p>
</li>
</ul>
<pre><code class="language-html">...
...
&lt;ul id="myNavigation"&gt;
&lt;div class="categories-name"&gt;
    &lt;a href="https://my-website.com/••••.html" title="••••"&gt;
    &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt;••••&lt;span&gt;••••&lt;/span&gt; &lt;/p&gt;
    &lt;/a&gt;
&lt;/div&gt;
&lt;div class="categories-name"&gt;
    &lt;a href="https://my-website.com/••••.html" title="••••"&gt;
    &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt;••••&lt;span&gt;••••&lt;/span&gt; &lt;/p&gt;
    &lt;/a&gt;
&lt;/div&gt;
&lt;div class="categories-name"&gt;
    &lt;a href="https://my-website.com/••••.html" title="••••"&gt;
    &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt;••••&lt;span&gt;••••&lt;/span&gt; &lt;/p&gt;
    &lt;/a&gt;
&lt;/div&gt;
....
....
....
&lt;div class="categories-name"&gt;
    &lt;a href="https://my-website.com/••••.html" title="••••"&gt;
    &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt;••••&lt;span&gt;••••&lt;/span&gt; &lt;/p&gt;
    &lt;/a&gt;
&lt;/div&gt;
&lt;/ul&gt;

    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;

&lt;ul id="myNavigation"&gt;
&lt;div class="categories-name"&gt;
    &lt;a href="https://my-website.com/••••.html" title="••••"&gt;
    &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt;••••&lt;span&gt;••••&lt;/span&gt; &lt;/p&gt;
    &lt;/a&gt;
&lt;/div&gt;
....
....
....
&lt;div class="categories-name"&gt;
    &lt;a href="https://my-website.com/••••.html" title="••••"&gt;
    &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt;••••&lt;span&gt;••••&lt;/span&gt; &lt;/p&gt;
    &lt;/a&gt;
&lt;/div&gt;
&lt;div class="categories-name"&gt;
    &lt;a href="https://my-website.com/••••.html" title="••••"&gt;
    &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt;••••&lt;span&gt;••••&lt;/span&gt; &lt;/p&gt;
    &lt;/a&gt;
&lt;/div&gt;
&lt;div class="categories-name"&gt;
    &lt;a href="https://my-website.com/••••.html" title="••••"&gt;
    &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt;••••&lt;span&gt;••••&lt;/span&gt; &lt;/p&gt;
    &lt;/a&gt;
&lt;/div&gt;
&lt;/ul&gt;


    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;
</code></pre>
<hr />
<p dir="auto">You can verify that the <strong>remaining</strong> lines <strong><code>&lt;li&gt;&lt;a href="https://my-website.com/••••.html" title="••••"&gt;••••&lt;/a&gt;&lt;/li&gt;</code></strong> are only lines, which are <strong>outside</strong> a <strong><code>&lt;ul id="myNavigation"&gt;............&lt;/ul&gt;</code></strong> <strong>multi</strong>-lines section, so <strong>not</strong> replaced at all !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
<p dir="auto">Oups !! I forgot to <strong>delete</strong>, either, the lines <strong><code>&lt;ul id="myNavigation"&gt;</code></strong> and <strong><code>&lt;/ul&gt;</code></strong>. Quite easy with :</p>
<p dir="auto">SEARCH <strong><code>(?-i)&lt;(ul id="myNavigation"|/ul)&gt;\R</code></strong></p>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
]]></description><link>https://community.notepad-plus-plus.org/post/63738</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63738</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 09 Mar 2021 19:46:19 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Tue, 09 Mar 2021 14:43:52 GMT]]></title><description><![CDATA[<p dir="auto">also, the same basic formula, for another part:</p>
<p dir="auto">FIND: <code>(title="(.*?)"&gt;.*?)(mr-1"&gt;&lt;/i&gt; ).*?(&lt;span&gt;)</code></p>
<p dir="auto">REPLACE BY: <code>\1\3\2 \4</code></p>
<p dir="auto">Check this 2 regex formulas I wrote in the last 2 posts, and see what has changed</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63725</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63725</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Tue, 09 Mar 2021 14:43:52 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Tue, 09 Mar 2021 14:37:48 GMT]]></title><description><![CDATA[<p dir="auto">simple, with the formula:</p>
<p dir="auto">FIND: <code>(FROM-HERE(.*?)TO-HERE.*?)(FROM-HERE).*?(TO HERE)</code></p>
<p dir="auto">REPLACE BY  <code>\1\3\2\4</code></p>
<p dir="auto">for example, the first part:</p>
<pre><code>&lt;ul id="myNavigation"&gt;
    &lt;li&gt;&lt;a href="https://my-website.com/page-1.html" title="Page 1"&gt;Page 1 (34)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<p dir="auto">and this:</p>
<pre><code>&lt;div class="categories-name"&gt;
   &lt;a href="https://my-website.com/page-66.html" title="Page 66"&gt;
   &lt;p class="font-16 color-grey text-capitalize"&gt;&lt;i class="fa fa-angle-right font-14 color-blue mr-1"&gt;&lt;/i&gt; Page 66 &lt;span&gt;27&lt;/span&gt; &lt;/p&gt;
  &lt;/a&gt;
&lt;/div&gt;
</code></pre>
<p dir="auto">Please test this formula, and you will see that the link from the first text will be parse/copy to the second text.</p>
<p dir="auto">FIND: <code>(&lt;li&gt;&lt;a href="https://my-website.com/(.*?)" title=".*?)(\h+&lt;a href="https://my-website.com/).*?(" title=")</code></p>
<p dir="auto">REPLACE BY:  <code>\1\3\2\4</code></p>
<p dir="auto">Now, the problem is that I must replace each part differently.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63724</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63724</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Tue, 09 Mar 2021 14:37:48 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Sun, 07 Mar 2021 18:06:04 GMT]]></title><description><![CDATA[<p dir="auto">…and then some of the takers don’t even think through the logistics of their problem first, before asking for help, so the net result is that they waste the time of the helpers and any of the thread’s readers.  :-(</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63683</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63683</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 07 Mar 2021 18:06:04 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Sun, 07 Mar 2021 17:41:51 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>
<p dir="auto">Sorry, but I still do <strong>not</strong> see what you want to achieve ??!!</p>
<p dir="auto">How, on earth, do you think a <strong>regular</strong> expression can make the <strong>link</strong> between <strong><code>Page 1</code></strong> and <strong><code>Page 66</code></strong> or between <strong>numbers</strong> <strong><code>(34)</code></strong> and <strong><code>27</code></strong> ??</p>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/63682</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63682</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 07 Mar 2021 17:41:51 GMT</pubDate></item><item><title><![CDATA[Reply to regex: Parsing html tags in other tags / links and titles on Sun, 07 Mar 2021 17:01:13 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/63663">regex: Parsing html tags in other tags / links and titles</a>:</p>
<blockquote>
<p dir="auto">&lt;a href=“<a href="https://my-website.com/page-66.html" rel="nofollow ugc">https://my-website.com/page-66.html</a>” title=“Page 66”&gt;</p>
</blockquote>
<p dir="auto">hello. So, basicaly, this line is almost the same in both parts, having: <code>&lt;a href</code> and <code>title=</code>, even the name of the link and the name of the title is different. For this it can be done a parsing.</p>
<p dir="auto"><code>&lt;a href="https://my-website.com/page-1.html" title="Page 1"&gt;</code><br />
with this<br />
<code>&lt;a href="https://my-website.com/page-66.html" title="Page 66"&gt;</code></p>
<p dir="auto">the last part is a little tricky, I have to import the values PAGE and NUMBER OF THE PAGE, for one place to another:</p>
<p dir="auto"><code>Page 1 (34)&lt;/a&gt;</code> must become  <code>&lt;/i&gt; Page 66 &lt;span&gt;</code></p>
<p dir="auto">and</p>
<p dir="auto"><code>(34)&lt;/a&gt;&lt;/li&gt;</code> should become  <code>&lt;span&gt;27&lt;/span&gt; &lt;/p&gt;  &lt;/a&gt;</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/63681</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/63681</guid><dc:creator><![CDATA[Robin Cruise]]></dc:creator><pubDate>Sun, 07 Mar 2021 17:01:13 GMT</pubDate></item></channel></rss>