<?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[Search line without ending tag]]></title><description><![CDATA[<p dir="auto">Hello.</p>
<p dir="auto">I’m very bad in regex, can someone tell me, how i can find lines with next problem.<br />
I have xml document with a lot of info for tax system. Some files generated with errors, closing tag goin to the next line, and i need to find this cases.<br />
And one more problem, there can be spaces or tabs, before beggining tag.<br />
Need to find cases like &lt;TypePost&gt;Main *and here closing tag going to the next line</p>
<pre><code>      &lt;Post&gt;Manager&lt;/Post&gt;
      &lt;subdivision&gt;&lt;Marketing&lt;/subdivision&gt;
      &lt;TypePost&gt;Main
      &lt;/TypePost&gt;
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/topic/18931/search-line-without-ending-tag</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 01:13:36 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/18931.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Feb 2020 15:23:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Search line without ending tag on Mon, 17 Feb 2020 23:13:44 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alex-mesch" aria-label="Profile: alex-mesch">@<bdi>alex-mesch</bdi></a>,</p>
<p dir="auto">To <strong>begin</strong> with, click on the link, below :</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regex-documentation">https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regex-documentation</a></p>
<p dir="auto">Cheers,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/50758</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/50758</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 17 Feb 2020 23:13:44 GMT</pubDate></item><item><title><![CDATA[Reply to Search line without ending tag on Mon, 17 Feb 2020 19:32:14 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> thx)<br />
Tomorrow I will study how it works) Very hard for my brain)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/50743</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/50743</guid><dc:creator><![CDATA[Alex Mesch]]></dc:creator><pubDate>Mon, 17 Feb 2020 19:32:14 GMT</pubDate></item><item><title><![CDATA[Reply to Search line without ending tag on Mon, 17 Feb 2020 18:58:35 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alex-mesch" aria-label="Profile: alex-mesch">@<bdi>alex-mesch</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: ekopalypse">@<bdi>ekopalypse</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">A <strong>second</strong> possibility, derived from <a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: ekopalypse">@<bdi>ekopalypse</bdi></a>’s solution, would be :</p>
<ul>
<li>
<p dir="auto">Open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</p>
</li>
<li>
<p dir="auto">SEARCH <strong><code>&lt;(\w+)&gt;.*\K\R\h*(?=&lt;/\1&gt;)</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
</li>
<li>
<p dir="auto">Now, choice :</p>
<ul>
<li>
<p dir="auto">To <strong>tick</strong> the <strong><code>Wrap around</code></strong> option if you want to process the S/R on the <strong>whole</strong> file, from <strong>beginning</strong> to <strong>end</strong></p>
</li>
<li>
<p dir="auto">To <strong>untick</strong> the <strong><code>Wrap around</code></strong> option to process the S/R, from <strong>current</strong> location to the <strong>end</strong> of the file</p>
</li>
<li>
<p dir="auto">To do a <strong>normal</strong> selection of text first and then, <strong>tick</strong> the <strong><code>In selection</code></strong> option</p>
</li>
</ul>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search mode</p>
</li>
<li>
<p dir="auto">Click, <strong>exclusively</strong> on the <strong><code>Replace All</code></strong> option, <strong>whatever</strong> your choice !</p>
</li>
</ul>
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">Due to the <strong><code>\K</code></strong> syntax, inside this regex, the <strong>search</strong> process works <strong>correctly</strong>, but the <strong>“step by step”</strong> replacement, with the <strong><code>Replace</code></strong> button, is <strong>not</strong> functional :-(</p>
</li>
<li>
<p dir="auto">The <strong>search</strong> regex looks for a <strong>line-break</strong>, <strong>possibly</strong> followed with some <strong>blank</strong> characters ( <strong><code>tabulation</code></strong> and/or <strong><code>space</code></strong> ), <em>ONLY IF</em> :</p>
<ul>
<li>
<p dir="auto">It is preceded with <strong><code>&lt;</code></strong>, then a <strong>name</strong> tag <strong><code>\w+</code></strong>, stored as <strong>group <code>1</code></strong>, because embedded in <strong>parentheses</strong>, then <strong><code>&gt;</code></strong> and any <strong>subsequent</strong> character(s) <strong><code>.*</code></strong>, even <strong><code>0</code></strong>, till the <strong>line-break</strong></p>
</li>
<li>
<p dir="auto">It is followed with the <strong>same ending</strong> tag <strong><code>&lt;/...&gt;</code></strong>, due to the <strong>positive look-ahead</strong> structure <strong><code>?=&lt;/\1&gt;)</code></strong> and the <strong><code>\1</code></strong> syntax which represents the <strong>name</strong> tag</p>
</li>
</ul>
</li>
<li>
<p dir="auto">As the <strong>replacement</strong> zone is <strong><code>empty</code></strong>, the <strong>EOL</strong>, and the possible <strong>blank</strong> chars, are simply <strong>deleted</strong> !</p>
</li>
</ul>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/50742</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/50742</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 17 Feb 2020 18:58:35 GMT</pubDate></item><item><title><![CDATA[Reply to Search line without ending tag on Mon, 17 Feb 2020 16:13:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: Ekopalypse">@<bdi>Ekopalypse</bdi></a> amazing, it’s working very well))<br />
Thank you very much and thank u for description of the process.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/50738</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/50738</guid><dc:creator><![CDATA[Alex Mesch]]></dc:creator><pubDate>Mon, 17 Feb 2020 16:13:05 GMT</pubDate></item><item><title><![CDATA[Reply to Search line without ending tag on Mon, 17 Feb 2020 16:02:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alex-mesch" aria-label="Profile: Alex-Mesch">@<bdi>Alex-Mesch</bdi></a></p>
<p dir="auto">if your data is consistent then something like this<br />
find what:<code>&lt;(\w+&gt;)(.*)\R\h*(&lt;/\1)</code><br />
replace with:<code>\1\2\3</code><br />
might do it.</p>
<p dir="auto">So we are looking for</p>
<ul>
<li>a tag <code>&lt;(\w+&gt;)</code> (a less sign followed by any word followed by a greater sign</li>
<li>followed by any text <code>(.*)</code></li>
<li>followed by a end of line char <code>\R</code></li>
<li>followed by horizontal spaces <code>\h*</code></li>
<li>followed by the start of a closing tag <code>&lt;/</code> followed by what was found in the starting tag <code>\1</code> -&gt; <code>(&lt;/\1)</code></li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/50737</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/50737</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Mon, 17 Feb 2020 16:02:32 GMT</pubDate></item><item><title><![CDATA[Reply to Search line without ending tag on Mon, 17 Feb 2020 15:45:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: Ekopalypse">@<bdi>Ekopalypse</bdi></a> TY, working.<br />
But, i’m sorry) I forgot one moment.<br />
What if here can be any tag and text?<br />
Something like this, need to find line UsersC and UUID and some other different names.</p>
<pre><code>&lt;UsersC&gt;21
&lt;/UsersC&gt;
&lt;UUID&gt;be9a1528-9a/6/0/-4917-8857-12896a7693de&lt;/UUID&gt;
&lt;Date&gt;2020-01-20&lt;/Date&gt;
&lt;UUID&gt;7f8e38ab-ceba-45c5-ab34-834b61bad840
&lt;/UUID&gt;
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/50736</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/50736</guid><dc:creator><![CDATA[Alex Mesch]]></dc:creator><pubDate>Mon, 17 Feb 2020 15:45:45 GMT</pubDate></item><item><title><![CDATA[Reply to Search line without ending tag on Mon, 17 Feb 2020 15:38:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alex-mesch" aria-label="Profile: Alex-Mesch">@<bdi>Alex-Mesch</bdi></a></p>
<p dir="auto">the <code>\R</code> denotes line endings and <code>\h</code> stands for horizontal spaces which can be spaces or tabs.<br />
So this in mind you might consider<br />
find what:<code>&lt;TypePost&gt;Main\R\h+</code><br />
replace with: <code>&lt;TypePost&gt;Main</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/50735</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/50735</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Mon, 17 Feb 2020 15:38:13 GMT</pubDate></item></channel></rss>