<?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[help on a formula, please?]]></title><description><![CDATA[<p dir="auto">Hi, I need some help please.</p>
<p dir="auto">I asked a question some time back on this site, and now i need another answer.</p>
<p dir="auto">take this setup for example:</p>
<p dir="auto">BEGIN “[i 0]”      Type Wife  Age 7200.000  SkinColour 0x000000ff END<br />
BEGIN “[i 1]”      Type Son  Age 7200.000  SkinColour 0x000000ff  END<br />
BEGIN “[i 2]”      Type Tree  SubType 5  Pos.x 10.49121  Pos.y 111.7811  Age 7200.000  END<br />
BEGIN “[i 3]”      Type Tree  SubType 2  Pos.x 13.77533  Pos.y 34.22266  Age 7200.000  END</p>
<p dir="auto">someone already told me how to modify the “Age” of a “Tree” earlier…<br />
?	Open the Replace dialog ( CTRL + H )<br />
?	Select the Regular expression search mode<br />
?	Preferably, check the Match case option<br />
?	Check the Wrap around option, if necessary<br />
?	In the Find What zone, type Age \K.+(?= END)<br />
Remark : There a space, before the word Age AND after it, as well as before the word END !<br />
?	In the Replace with zone, type, simply, the string 7200.000<br />
?	Click on the Replace All button<br />
Et voilà !</p>
<p dir="auto">but HERE IS THE QUESTION: how do i alter the steps to make sure it only includes the “Tree” Age??</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/11367/help-on-a-formula-please</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 18:10:09 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/11367.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 25 Feb 2016 23:09:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to help on a formula, please? on Fri, 26 Feb 2016 11:17:08 GMT]]></title><description><![CDATA[<p dir="auto">Hello <strong>Harry</strong>,</p>
<p dir="auto">I’m the <strong>one</strong>, who posted this reply to <strong>Clearinghouse Forsale</strong>, <strong>three</strong> months ago, about ! Refer to the link below :</p>
<p dir="auto"><a href="https://notepad-plus-plus.org/community/topic/10848/need-some-help-with-find-and-replace/3" rel="nofollow ugc">https://notepad-plus-plus.org/community/topic/10848/need-some-help-with-find-and-replace/3</a></p>
<p dir="auto">And indeed, reading again this <strong>old</strong> post, I just realize that I didn’t pay enough attention to the line :</p>
<blockquote>
<p dir="auto">now as you see, i have alot of lines that state begin…type tree…age ##### end</p>
</blockquote>
<p dir="auto">So, the replacement should occur, <em>ONLY IF</em> the lines contain the word <strong>Tree</strong>, before the word <strong>Age</strong> !</p>
<p dir="auto">In that case, just change the search regex as :</p>
<pre><code> Tree .* Age \K.+(?= END$)
</code></pre>
<p dir="auto">REMARKS :</p>
<ul>
<li>
<p dir="auto">There a space, <em>BEFORE</em> and <em>AFTER</em> the words <strong>Tree</strong> and <strong>Age</strong>, and a space <em>BEFORE</em> the last word <strong>END</strong> !</p>
</li>
<li>
<p dir="auto">I also added the <strong><code>$</code></strong> symbol, to be sure that we search for the word <strong>END</strong>, at the <strong>very end</strong> of each line</p>
</li>
</ul>
<p dir="auto">NOTES :</p>
<ul>
<li>
<p dir="auto">This time, the search regex is looking, <strong>FIRST</strong>, for any text, in a <strong>same</strong> line, between a <strong>first</strong> occurrence of the word <strong>Tree</strong> and a <strong>last</strong> occurrence of the word <strong>Age</strong> ( <strong><code>Tree .* Age</code></strong> )</p>
</li>
<li>
<p dir="auto">Due to the <strong><code>\K</code></strong> form, this <strong>previous</strong> match is, then, <strong>forgotten</strong> by the regex engine</p>
</li>
<li>
<p dir="auto">Next, it tries to match a <strong>non empty</strong> list of characters <strong><code>(.+)</code></strong></p>
</li>
<li>
<p dir="auto">But, <em>ONLY IF</em> that list is followed with a <strong>space</strong> and the word <strong>END</strong>, which ends the <strong>current</strong> line ( <strong><code>(?= END$)</code></strong> ). So it selects the exact number, <strong>only</strong>,  between the word <strong>Age</strong> and the keyword <strong>END</strong> !</p>
</li>
</ul>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/14314</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/14314</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Fri, 26 Feb 2016 11:17:08 GMT</pubDate></item><item><title><![CDATA[Reply to help on a formula, please? on Fri, 26 Feb 2016 01:16:40 GMT]]></title><description><![CDATA[<p dir="auto">Is there a reason why having the same topic open twice??<br />
This isn’t very kind, isn’t it.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/14304</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/14304</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Fri, 26 Feb 2016 01:16:40 GMT</pubDate></item><item><title><![CDATA[Reply to help on a formula, please? on Fri, 26 Feb 2016 01:06:00 GMT]]></title><description><![CDATA[<p dir="auto">no one knows how to search and replace the age values in the last two “Tree” lines only??</p>
]]></description><link>https://community.notepad-plus-plus.org/post/14302</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/14302</guid><dc:creator><![CDATA[harry reid]]></dc:creator><pubDate>Fri, 26 Feb 2016 01:06:00 GMT</pubDate></item></channel></rss>