<?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[How do I add text to each line?]]></title><description><![CDATA[<p dir="auto">I have the following text :</p>
<pre><code>ernestobaltar@yahoo.com:Golden-Ball
amaury.tenaille@epfedu.fr:SilverBall
Inspirit@staplesnet.us:Copper_Ball
Matthewsk@mail.montclair.edu:Encourage
sissleib6930@stu.howardcollege.edu:Not-Engaged
</code></pre>
<p dir="auto">I want to get result :</p>
<pre><code>ernestobaltar@yahoo.com:Golden-Ball:Email.yahoo.com
amaury.tenaille@epfedu.fr:SilverBall:Email.epfedu.fr
Inspirit@staplesnet.us:Copper_Ball:Email.staplesnet.us
Matthewsk@mail.montclair.edu:Encourage:Email.mail.montclair.edu
sissleib6930@stu.howardcollege.edu:Not-Engaged:Email.stu.howardcollege.edu
</code></pre>
<p dir="auto">How do I do?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/19664/how-do-i-add-text-to-each-line</link><generator>RSS for Node</generator><lastBuildDate>Sat, 12 Sep 2026 22:30:40 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/19664.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Jul 2020 12:21:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How do I add text to each line? on Sat, 19 Nov 2022 01:56:41 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/melad-eissa" aria-label="Profile: melad-eissa">@<bdi>melad-eissa</bdi></a>,</p>
<blockquote>
<p dir="auto">In my previous post, I give an example of the <strong>modifications</strong> needed :</p>
<pre><code class="language-z">INITIAL  :    sissleib6930    @    stu.howardcollege.edu    :    Not-Engaged
EXPECTED :    sissleib6930    @    stu.howardcollege.edu    :    Not-Engaged    :Email.    stu.howardcollege.edu
</code></pre>
</blockquote>
<p dir="auto">Seemingly, we need the part between the <strong><code>@</code></strong> and the <strong><code>:</code></strong> chars because this part has to be <strong>re-</strong> written at the <strong>end</strong> of line, too</p>
<p dir="auto">However, the part before the <strong><code>@</code></strong> char does <strong>not</strong> change at all. So we can represent the goal as below ( note that <strong><code>Space</code></strong> chars are <strong>irrelevant</strong> )</p>
<pre><code class="language-z">                                   The OVERALL match = $0
                         /¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\
INITIAL  Text            @    stu.howardcollege.edu    :    Not-Engaged
EXPECTED Text            @    stu.howardcollege.edu    :    Not-Engaged    :Email.    stu.howardcollege.edu
                              \___________________/                        \_____/    \___________________/
                                    Group 1                                String        Repeated Group 1

SEARCH      regex        @  (         .+            )  :       .+

REPLACEMENT regex                            $0                            :Email.             \1
</code></pre>
<p dir="auto">Now, the <strong>exact</strong> syntax of this regex S/R is rather <strong>obvious</strong> :</p>
<p dir="auto">SEARCH <strong><code>(?-s)@(.+):.+</code></strong></p>
<p dir="auto">REPLACE <strong><code>$0:Email.\1</code></strong></p>
<p dir="auto">And will change the <strong>initial</strong> text :</p>
<pre><code class="language-diff">ernestobaltar@yahoo.com:Golden-Ball
amaury.tenaille@epfedu.fr:SilverBall
Inspirit@staplesnet.us:Copper_Ball
Matthewsk@mail.montclair.edu:Encourage
sissleib6930@stu.howardcollege.edu:Not-Engaged
</code></pre>
<p dir="auto">into the <strong>expected</strong> text :</p>
<pre><code class="language-diff">ernestobaltar@yahoo.com:Golden-Ball:Email.yahoo.com
amaury.tenaille@epfedu.fr:SilverBall:Email.epfedu.fr
Inspirit@staplesnet.us:Copper_Ball:Email.staplesnet.us
Matthewsk@mail.montclair.edu:Encourage:Email.mail.montclair.edu
sissleib6930@stu.howardcollege.edu:Not-Engaged:Email.stu.howardcollege.edu
</code></pre>
<hr />
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">In the <strong>search</strong> regex :</p>
<ul>
<li>
<p dir="auto">First, the <strong><code>(?-s)</code></strong> ensures that any regex symbol <strong><code>.</code></strong> will match a <strong>single standard</strong> character, <strong>only</strong> and <strong>not</strong> <strong><code>EOL</code></strong> chars</p>
</li>
<li>
<p dir="auto">Then the part <strong><code>@(.+):</code></strong> searches for the <strong><code>@</code></strong> character followed with a <strong>non-null</strong> range of chars till a colon <strong><code>:</code></strong>. Note that this range is <strong>stored</strong> as <strong>group <code>1</code></strong> because of the <strong>parentheses</strong></p>
</li>
<li>
<p dir="auto">The <strong>final</strong> part <strong><code>.+</code></strong> represents the characters after the <strong>colon</strong> char of <strong>each</strong> line</p>
</li>
</ul>
</li>
<li>
<p dir="auto">In the <strong>replacement</strong> regex :</p>
<ul>
<li>
<p dir="auto">We <strong>first</strong> insert the <strong>overall</strong> pattern <strong><code>$0</code></strong>. So, everything between the <strong><code>@</code></strong> char and the <strong>end</strong> of <strong>current</strong> line</p>
</li>
<li>
<p dir="auto">Then, we write the <strong>literal</strong> string <strong><code>:Email.</code></strong></p>
</li>
</ul>
<p dir="auto">-Finally, we <strong>re-</strong> write the contents of <strong>Group <code>1</code></strong>, so the <strong>name</strong> of <strong>each</strong> site, thanks to the <strong><code>\1</code></strong> syntax</p>
</li>
</ul>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/55867</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55867</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sat, 19 Nov 2022 01:56:41 GMT</pubDate></item><item><title><![CDATA[Reply to How do I add text to each line? on Tue, 14 Jul 2020 11:04:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> Perhaps it is only for those who know how to build one regex. For me, it’s not. Anyway, thank you for answer.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/55850</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55850</guid><dc:creator><![CDATA[Melad Eissa]]></dc:creator><pubDate>Tue, 14 Jul 2020 11:04:46 GMT</pubDate></item><item><title><![CDATA[Reply to How do I add text to each line? on Tue, 14 Jul 2020 11:00:09 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> You have the right to not answer my question. And I have the right to ask questions in this forum. Please tell me what I did wrong something? You see you say these things is very redundant, if I use multiple accounts to log multiple topic? You can check that? I do not understand my problem. You are trying to impose someone else? I do not know, I asked. And obviously I did not post one question 2 times. All content is different I clearly asked.<br />
If you feel my question is beyond the ability, you can ignore it, or support others. I not only ask you to support me. For example in this topic, I do not understand what guy038 said, I also complain about things? Looking back the way your show, you have properly? 1 again and you tell me, I do something wrong?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/55849</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55849</guid><dc:creator><![CDATA[Melad Eissa]]></dc:creator><pubDate>Tue, 14 Jul 2020 11:00:09 GMT</pubDate></item><item><title><![CDATA[Reply to How do I add text to each line? on Tue, 07 Jul 2020 13:51:24 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/sarah-duong" aria-label="Profile: sarah-duong">@<bdi>sarah-duong</bdi></a>, and <strong>All</strong></p>
<p dir="auto">I was about to give you the <strong>full</strong> solution to your problem, when I saw the <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a>’s answer. And I must admit that he’s <strong>right</strong> about it !</p>
<hr />
<p dir="auto">So let me show you how to <strong>guess</strong> the <strong>right</strong> solution as your goal is, simply, a line <strong>substitution</strong> of some parts of <strong>current</strong> line !</p>
<p dir="auto">You said that you have, for instance, this <strong>last</strong> line of text :</p>
<pre><code class="language-z">sissleib6930@stu.howardcollege.edu:Not-Engaged
</code></pre>
<p dir="auto">and that you want it to be <strong>changed</strong> as :</p>
<pre><code class="language-z">sissleib6930@stu.howardcollege.edu:Not-Engaged:Email.stu.howardcollege.edu
</code></pre>
<p dir="auto">OK ! So, let’s try to <strong>decompose</strong>, both the <strong>initial</strong> and the <strong>expected</strong> lines, inserting some <strong><code>space</code></strong> chars for a best <strong>identification</strong> of the <strong>different</strong> parts of your text :</p>
<pre><code class="language-z">INITIAL  :    sissleib6930    @    stu.howardcollege.edu    :    Not-Engaged
EXPECTED :    sissleib6930    @    stu.howardcollege.edu    :    Not-Engaged    :Email.    stu.howardcollege.edu
</code></pre>
<p dir="auto">What do we see ?</p>
<ul>
<li>
<p dir="auto">Firstly, the <strong>initial</strong> line must be <strong>rewritten</strong> as is</p>
</li>
<li>
<p dir="auto">Secondly, the <strong>literal</strong> string <strong><code>:Email.</code></strong> must be <strong>added</strong> at the <strong>end</strong> of <strong>current</strong> line</p>
</li>
<li>
<p dir="auto">Thirdly, the site <strong>address</strong>, located <strong>after</strong> the <strong><code>@</code></strong> symbol and <strong>before</strong> the <strong><code>:</code></strong> symbol  must be <strong>added</strong>, too, after the <strong>literal</strong> string <strong><code>:Email.</code></strong></p>
</li>
</ul>
<hr />
<p dir="auto">Now, it should be <strong>easy</strong> enough to you to build up the <strong>correct</strong> regex S/R to perform such <strong>modifications</strong> !</p>
<p dir="auto">You may find some <strong>first</strong> help, reading this part of the <strong>N++ official</strong> documentation :</p>
<p dir="auto"><a href="https://npp-user-manual.org/docs/searching/#regular-expressions" rel="nofollow ugc">https://npp-user-manual.org/docs/searching/#regular-expressions</a></p>
<hr />
<p dir="auto">I can assure you that my <strong>complete</strong> solution, <strong>already</strong> found, respects <em>exactly</em> the <strong>scheme</strong> described above !</p>
<p dir="auto">This is <strong>not</strong> surprising because there can only be <strong>one valid</strong> interpretation, though there can be <strong>several</strong> regex <strong>valid</strong> syntaxes, of course !</p>
<p dir="auto">Best Regards</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/55661</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55661</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 07 Jul 2020 13:51:24 GMT</pubDate></item><item><title><![CDATA[Reply to How do I add text to each line? on Tue, 07 Jul 2020 12:56:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sarah-duong" aria-label="Profile: Sarah-Duong">@<bdi>Sarah-Duong</bdi></a> ,</p>
<p dir="auto">We’ve been through this before.  We have shown you plenty of regex that deal with your colon-separated files.  Try generalizing one of those approaches (I will give you a hint: start with <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a>’s most recent post in <a href="https://community.notepad-plus-plus.org/topic/19619/how-to-remove-middle-text">your previous question</a>).</p>
<p dir="auto">If what you tried doesn’t work, show us what you tried, and explain why you thought it would work.  We will then be able to help you <em>learn</em> what you are missing.</p>
<p dir="auto">This forum is not a place where we do your job (or your homework) for you.  We have explained plenty of times what the various portions of our regexes do.  We have pointed you to the documentation plenty of times.  You have complained that you don’t have the time to read the documentation… but somehow, you have the time to come here with every new situation with these colon-files, and then the time to wait for answers, and then the time to argue with us when we try to get you to make an effort.  Honestly, if it’s not important enough to you to read some documentation, why should it be important enough to us to do it for you?</p>
<p dir="auto">Show some effort, and you will get good answers.  If you refuse to show effort, well, then, good luck.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/55660</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55660</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 07 Jul 2020 12:56:46 GMT</pubDate></item></channel></rss>