<?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[Find and Replace multiple lines of XML]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">I’m a complete newb when it comes to regex. For work, I have to clean a huge XML file for our customer. It’s basically 250+ Data Operations that contain tons of internal technical information, as well as some data that is relevant for our customer. I’ve been able to remove unnecessary lines by using this Regex line that I found using Google.</p>
<pre><code>(?-s)&lt;exampletag&gt;(.*?)&lt;/exampletag&gt;
</code></pre>
<p dir="auto">However, I have one field (&lt;errorDetails&gt;) that is several hundred lines long for each Data Operation that I need to remove and the above regex doesn’t seem to work when the content isn’t all in one line. Is there any way for me to easily remove the &lt;errorDetails&gt; + &lt;/errorDetails&gt; and everything in between? Unfortunately, while it is the same error for each Operation, the error message contains several identifiers, table names and the like, so the content in between the tags is unique for each operation.</p>
<p dir="auto">Ticking “matches newline” did not work.</p>
<p dir="auto">Thanks for your assistance!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/25866/find-and-replace-multiple-lines-of-xml</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 13:52:58 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/25866.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 07 Jun 2024 10:55:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Find and Replace multiple lines of XML on Fri, 07 Jun 2024 11:23:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> Thank you so much, that worked beatifully</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95292</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95292</guid><dc:creator><![CDATA[Andreas Kraus]]></dc:creator><pubDate>Fri, 07 Jun 2024 11:23:11 GMT</pubDate></item><item><title><![CDATA[Reply to Find and Replace multiple lines of XML on Fri, 07 Jun 2024 11:00:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/30981">@Andreas-Kraus</a></p>
<p dir="auto">The <code>(?-s)</code> in your expression is the problem.<br />
That is roughly equivalent to leaving “. matches newline” uncheckmarked, and also note that it <em>overrides</em> the state of “. matches newline” (so if you use <code>(?-s)</code> in your expression, the state of “. matches newline” does not matter at all).</p>
<p dir="auto">Try changing <code>(?-s)</code> to <code>(?s)</code>.<br />
OR, remove <code>(?-s)</code> entirely and then checkmark “. matches newline”.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95289</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95289</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 07 Jun 2024 11:00:41 GMT</pubDate></item></channel></rss>