<?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 'G1' to the start of each line.]]></title><description><![CDATA[<p dir="auto">Sorry noob here…  I am writing a G-Code program for my home made cnc. My thing is I need to add ‘G1’ to the start of each line and as I have over 12,000 lines I don’t want to do each line in turn…<br />
Is there a way to use find and replace to do this automatically?</p>
<p dir="auto">Any help would be great.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/14065/add-g1-to-the-start-of-each-line</link><generator>RSS for Node</generator><lastBuildDate>Fri, 11 Sep 2026 01:16:38 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/14065.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 01 Jul 2017 16:23:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Add 'G1' to the start of each line. on Sat, 01 Jul 2017 18:02:07 GMT]]></title><description><![CDATA[<p dir="auto">Many thanks did just what I needed great help :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/25313</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/25313</guid><dc:creator><![CDATA[Cnc Builder]]></dc:creator><pubDate>Sat, 01 Jul 2017 18:02:07 GMT</pubDate></item><item><title><![CDATA[Reply to Add 'G1' to the start of each line. on Sat, 01 Jul 2017 17:25:23 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/cnc-builder" aria-label="Profile: cnc-builder">@<bdi>cnc-builder</bdi></a></p>
<p dir="auto"><strong>Elementary</strong> task with <strong>regular</strong> expressions, indeed !!</p>
<ul>
<li>
<p dir="auto">Move back to the <strong>very beginning</strong> of the file to change ( <strong><code>Ctrl + Origin</code></strong> )</p>
</li>
<li>
<p dir="auto">Open the <strong>Find/Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</p>
</li>
<li>
<p dir="auto">Type <strong><code>^</code></strong>, in the <strong>Find what:</strong> box</p>
</li>
<li>
<p dir="auto">Type <strong><code>G1</code></strong>, in the <strong>Replace with:</strong> box</p>
</li>
<li>
<p dir="auto">Choose the <strong>Regular expression</strong> search mode</p>
</li>
<li>
<p dir="auto">Click on the <strong>Replace All</strong> button</p>
</li>
</ul>
<p dir="auto">Et voilà !</p>
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">The <strong><code>^</code></strong> character is the symbol, meaning “<strong>beginning of line</strong>”, in <strong>regular</strong> expressions</p>
</li>
<li>
<p dir="auto">If you prefer to <strong>separate</strong> the string <strong>G1</strong> from the <strong>rest</strong> of text, you may, either, add a <strong>space</strong> character after <strong>G1</strong> or the symbol <strong><code>\t</code></strong>, for a <strong>tabulation</strong> character</p>
</li>
</ul>
<p dir="auto">Best regards,</p>
<p dir="auto">guy038</p>
<p dir="auto"><strong>P.S.</strong> :</p>
<p dir="auto">For <strong>newby</strong> people, about <strong>regular</strong> expressions <strong>concept</strong> and <strong>syntax</strong>, begin with that article, in <strong>N++ Wiki</strong> :</p>
<p dir="auto"><a href="http://docs.notepad-plus-plus.org/index.php/Regular_Expressions" rel="nofollow ugc">http://docs.notepad-plus-plus.org/index.php/Regular_Expressions</a></p>
<p dir="auto">In addition, you’ll find <strong>good documentation</strong>, about the  <strong>Boost C++ Regex library, v1.55.0</strong> ( similar to the <strong>PERL Regular Common Expressions, v1.48.0</strong> ), used by <strong><code>Notepad++</code></strong>, <em>since its <strong><code>6.0</code></strong> version</em>, at the <strong>TWO</strong> addresses below :</p>
<p dir="auto"><a href="http://www.boost.org/doc/libs/1_48_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html" rel="nofollow ugc">http://www.boost.org/doc/libs/1_48_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html</a></p>
<p dir="auto"><a href="http://www.boost.org/doc/libs/1_48_0/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html" rel="nofollow ugc">http://www.boost.org/doc/libs/1_48_0/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html</a></p>
<ul>
<li>
<p dir="auto">The <strong>FIRST</strong> link explains the <strong>syntax</strong>, of regular expressions, in the <strong>SEARCH</strong> part</p>
</li>
<li>
<p dir="auto">The <strong>SECOND</strong> link explains the <strong>syntax</strong>, of regular expressions, in the <strong>REPLACEMENT</strong> part</p>
</li>
</ul>
<hr />
<p dir="auto">You may, also, look for <strong>valuable</strong> informations, on the <strong>sites</strong>, below :</p>
<p dir="auto"><a href="http://www.regular-expressions.info" rel="nofollow ugc">http://www.regular-expressions.info</a></p>
<p dir="auto"><a href="http://www.rexegg.com" rel="nofollow ugc">http://www.rexegg.com</a></p>
<p dir="auto"><a href="http://perldoc.perl.org/perlre.html" rel="nofollow ugc">http://perldoc.perl.org/perlre.html</a></p>
<p dir="auto">Be aware that, as any <strong>documentation</strong>, it may contain some <strong>errors</strong> ! Anyway, if you detected one, that’s <strong>good news</strong> : you’re improving ;-))</p>
]]></description><link>https://community.notepad-plus-plus.org/post/25312</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/25312</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sat, 01 Jul 2017 17:25:23 GMT</pubDate></item></channel></rss>