<?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[Add numbers to certain word?]]></title><description><![CDATA[<p dir="auto">Hey there,<br />
not familiar with notepad so much…</p>
<p dir="auto">I’ve got a gcode file like this:<br />
G1 X172.523 Y248.597 E3818.7309<br />
G1 X170.667 Y143.197 E3927.8915<br />
G1 X168.811 Y143.197 E3929.7801</p>
<p dir="auto">I want to subtract 1 (for example) from each X in every line.</p>
<p dir="auto">like this:<br />
G1 X171.523 Y248.597 E3818.7309<br />
G1 X169.667 Y143.197 E3927.8915<br />
G1 X167.811 Y143.197 E3929.7801</p>
<p dir="auto">Is it possible?   can I make a selection to which it would apply?</p>
<p dir="auto">thanks</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/18752/add-numbers-to-certain-word</link><generator>RSS for Node</generator><lastBuildDate>Fri, 15 May 2026 19:53:54 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/18752.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Jan 2020 12:02:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Add numbers to certain word? on Tue, 14 Jan 2020 16:29:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> said in <a href="/post/49831">Add numbers to certain word?</a>:</p>
<blockquote>
<p dir="auto">i think it would take less than 50 lines of perl or python to do it</p>
</blockquote>
<p dir="auto">That’s for sure :-)<br />
c3RhcnRfbGluZSwgZW5kX2xpbmUgPSBlZGl0b3IuZ2V0VXNlckxpbmVTZWxlY3Rpb24oKQ0Kc3RhcnRwb3MgPSBlZGl0b3IucG9zaXRpb25Gcm9tTGluZShzdGFydF9saW5lKQ0KZW5kcG9zID0gZWRpdG9yLmdldExpbmVFbmRQb3NpdGlvbihlbmRfbGluZSkNCmVkaXRvci5yZXJlcGxhY2UoJyg/PD1YKShbKy1dP1xkW1xkXC5dKyknLCBsYW1iZGEgbTogZmxvYXQobS5ncm91cCgxKSktMSwgMCwgc3RhcnRwb3MsIGVuZHBvcyk</p>
]]></description><link>https://community.notepad-plus-plus.org/post/49861</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/49861</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Tue, 14 Jan 2020 16:29:12 GMT</pubDate></item><item><title><![CDATA[Reply to Add numbers to certain word? on Tue, 14 Jan 2020 15:27:01 GMT]]></title><description><![CDATA[<p dir="auto">aha<br />
I see.</p>
<p dir="auto">ok thanks for the elaborate answer.</p>
<p dir="auto">cheers</p>
]]></description><link>https://community.notepad-plus-plus.org/post/49859</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/49859</guid><dc:creator><![CDATA[sagee schachter]]></dc:creator><pubDate>Tue, 14 Jan 2020 15:27:01 GMT</pubDate></item><item><title><![CDATA[Reply to Add numbers to certain word? on Mon, 13 Jan 2020 16:45:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sagee-schachter" aria-label="Profile: sagee-schachter">@<bdi>sagee-schachter</bdi></a> ,</p>
<p dir="auto">Search and replace, even in the powerful regular expression mode, doesn’t have generic math built in, so with <em>just</em> Notepad++, it is not possible to do.</p>
<p dir="auto">You could <em>use</em> Notepad++ to write up a utility in your favorite programming language, and have that script do the replacement.  (i think it would take less than 50 lines of perl or python to do it, for example; probably much less: yeah, perl has a oneliner that would do it: <code>perl -pi -e "m/X([+-]?\d[\d\.]+)/; my$x=$1; my$xx=$x-1; s/X$x/X$xx/g" FILENAME</code> – and just change the formula for <code>$xx</code> if you want a different math transformation; python could probably do it in a few lines inside a for loop; 50 was an upper bound, and probably way too high)</p>
<p dir="auto">Or, if you have the PythonScript or LuaScript or similar plugin for Notepad++, you could write a script for one of those plugins that runs inside the Notepad++ environment and can edit the active file directly inside Notepad++.  if you’re willing to do that, install the plugin, read some docs, take a crack at it; if you’re having difficulty, show us what you tried, and we’ll probably be able to help you finish it off.  But this isn’t a code-writing service, so there’s a lower chance that you’ll get someone to write it for you from scratch.</p>
<p dir="auto">But really, the answer is that Notepad++ <em>itself</em> doesn’t do this.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/49831</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/49831</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 13 Jan 2020 16:45:15 GMT</pubDate></item></channel></rss>