<?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 &amp; Replace sets of value with an unique of values]]></title><description><![CDATA[<p dir="auto">Hi all!</p>
<p dir="auto">in a mine XML i have to replace these lines (example):<br />
&lt;relationship identifier=“id-742789” source=“id-830939” target=“id-830997” xsi:type=“Composition”&gt;<br />
&lt;name xml:lang=“en”&gt;&lt;/name&gt;<br />
&lt;/relationship&gt;<br />
&lt;relationship identifier=“id-830947” source=“id-830939” target=“id-830948” xsi:type=“Composition”&gt;<br />
&lt;name xml:lang=“en”&gt;&lt;/name&gt;</p>
<p dir="auto">with this:<br />
&lt;relationship identifier=“id-<strong>999999</strong>” source=“id-830939” target=“id-830997” xsi:type=“Composition”&gt;<br />
&lt;name xml:lang=“en”&gt;&lt;/name&gt;<br />
&lt;/relationship&gt;<br />
&lt;relationship identifier=“id-<strong>999999</strong>” source=“id-830939” target=“id-830948” xsi:type=“Composition”&gt;<br />
&lt;name xml:lang=“en”&gt;&lt;/name&gt;</p>
<p dir="auto">and after, starting from here:<br />
&lt;connection identifier=“id-742788” xsi:type=“Relationship” relationshipRef=“id-742789” source=“id-742790” target=“id-742779”&gt;<br />
&lt;style lineWidth=“1”&gt;<br />
&lt;fillColor r=“0” g=“176” b=“80” a=“100”/&gt;<br />
&lt;lineColor r=“0” g=“176” b=“80” a=“100”/&gt;<br />
&lt;font name=“Sky Text” size=“10” style=“plain”&gt;<br />
&lt;color r=“0” g=“0” b=“0” a=“100”/&gt;<br />
&lt;/font&gt;<br />
&lt;/style&gt;<br />
&lt;sourceAttachment x=“540” y=“333”/&gt;<br />
&lt;bendpoint x=“540” y=“487”/&gt;<br />
&lt;targetAttachment x=“667” y=“487”/&gt;<br />
&lt;/connection&gt;</p>
<p dir="auto">with:<br />
&lt;connection identifier=“id-742788” xsi:type=“Relationship” relationshipRef=“id-<strong>999999</strong>” source=“id-742790” target=“id-742779”&gt;<br />
&lt;style lineWidth=“1”&gt;<br />
&lt;fillColor r=“0” g=“176” b=“80” a=“100”/&gt;<br />
&lt;lineColor r=“0” g=“176” b=“80” a=“100”/&gt;<br />
&lt;font name=“Sky Text” size=“10” style=“plain”&gt;<br />
&lt;color r=“0” g=“0” b=“0” a=“100”/&gt;<br />
&lt;/font&gt;<br />
&lt;/style&gt;<br />
&lt;sourceAttachment x=“540” y=“333”/&gt;<br />
&lt;bendpoint x=“540” y=“487”/&gt;<br />
&lt;targetAttachment x=“667” y=“487”/&gt;<br />
&lt;/connection&gt;</p>
<p dir="auto">How i can do that?</p>
<p dir="auto">Best</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/23054/find-replace-sets-of-value-with-an-unique-of-values</link><generator>RSS for Node</generator><lastBuildDate>Thu, 21 May 2026 01:50:40 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/23054.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 31 May 2022 10:29:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Find &amp; Replace sets of value with an unique of values on Tue, 31 May 2022 15:18:10 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> no problem :)</p>
<p dir="auto">i applied a brute force approach and now i hope my xml will work:</p>
<p dir="auto">step 1) find <em>&lt;relationship</em> and replace with <em>&lt;relationship&gt;FYY ( *<br />
step 2)  find <em>source</em> and replace with <em>) source *<br />
Step 3) find <em>(?-s)(?-i:&lt;relationship&gt;|(?!\A)\G).</em>?\K(?:\x20(.+?))</em> with <em>identifier=“id-999999”</em><br />
Step 4) find <em>&gt;FYY</em> and replace with " "<br />
Step 5) find <em>&lt;connection</em> and replace with <em>&lt;connection&gt;FYY</em><br />
Step 6) find <em>relationshipRef</em> and replace with <em>( relationshipRef</em><br />
Step 7) find <em>(?-s)(?-i:&lt;connection&gt;|(?!\A)\G).</em>?\K(?:\x20(.+?))</em> and replace with <em>relationshipRef=“id-999999”</em><br />
Step 8) find <em>&gt;FYY</em> and replace with <em>" "</em><br />
Step 9) find <em>) source</em> and replace with <em>source</em></p>
<p dir="auto">am i mad? :D</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77186</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77186</guid><dc:creator><![CDATA[Luigi Giuseppe De Franceschi]]></dc:creator><pubDate>Tue, 31 May 2022 15:18:10 GMT</pubDate></item><item><title><![CDATA[Reply to Find &amp; Replace sets of value with an unique of values on Tue, 31 May 2022 14:27:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/luigi-giuseppe-de-franceschi" aria-label="Profile: luigi-giuseppe-de-franceschi">@<bdi>luigi-giuseppe-de-franceschi</bdi></a> said in <a href="/post/77178">Find &amp; Replace sets of value with an unique of values</a>:</p>
<blockquote>
<p dir="auto">i also looked here</p>
</blockquote>
<p dir="auto">Yes, that is better than my link.</p>
<blockquote>
<p dir="auto">but in twice links doesn’t modify inside a tag but only btw bracket</p>
</blockquote>
<p dir="auto">Not sure what that means…</p>
<p dir="auto">In fact, now I’m unclear on what exactly you need to do, so I’ll let someone else who does understand jump in and help.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77181</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77181</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 31 May 2022 14:27:35 GMT</pubDate></item><item><title><![CDATA[Reply to Find &amp; Replace sets of value with an unique of values on Tue, 31 May 2022 13:41:49 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> thank you, i also looked <a href="https://community.notepad-plus-plus.org/topic/22690/generic-regex-replacing-in-a-specific-zone-of-text/2">here</a> but in twice links doesn’t modify inside a tag but only btw brackets :(</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77178</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77178</guid><dc:creator><![CDATA[Luigi Giuseppe De Franceschi]]></dc:creator><pubDate>Tue, 31 May 2022 13:41:49 GMT</pubDate></item><item><title><![CDATA[Reply to Find &amp; Replace sets of value with an unique of values on Tue, 31 May 2022 12:00:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/luigi-giuseppe-de-franceschi" aria-label="Profile: luigi-giuseppe-de-franceschi">@<bdi>luigi-giuseppe-de-franceschi</bdi></a></p>
<p dir="auto">Probably <a href="https://community.notepad-plus-plus.org/topic/23029/generic-regex-selecting-a-complete-hierarchy-between-an-opening-html-xml-tag-and-its-corresponding-closing-tag">THIS</a> helps you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77173</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77173</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 31 May 2022 12:00:35 GMT</pubDate></item></channel></rss>