<?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[Remove last word of each line]]></title><description><![CDATA[<p dir="auto">Hi everyone. I would like to remove the last word of each line. 	It has to do with many song names ending with a portion of the youtube URL that always contains 11 letters. I’m trying to get the song title clean, without the URL.</p>
<p dir="auto">From this:<br />
PJS  Nebulas (Promotional Edit)  DN_9ZbWRUWU	<br />
Jilo  First Times Valley (E​-​Ger​ä​t Remix)  tOjgku6iNhY	<br />
Sachi Kobayashi  Still Remember  SK3jAqN5Myw</p>
<p dir="auto">To This:<br />
PJS  Nebulas (Promotional Edit)<br />
Jilo  First Times Valley (E​-​Ger​ä​t Remix)<br />
Sachi Kobayashi  Still Remember</p>
<p dir="auto">How can I do?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/24109/remove-last-word-of-each-line</link><generator>RSS for Node</generator><lastBuildDate>Fri, 09 Oct 2026 04:08:15 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/24109.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 08 Feb 2023 04:30:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Remove last word of each line on Wed, 08 Feb 2023 21:34:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terry-r" aria-label="Profile: Terry-R">@<bdi>Terry-R</bdi></a> ,<br />
Thanks, and you’re right, I learn more, by trying.  I had started to use <a href="http://regex101.com" rel="nofollow ugc">regex101.com</a>, but for the reason you mention, some of the boost stuff throws an error  in it.  I think I may have used a bad character or something when it threw the error, so I went to the NPP S/R box to try out what I had. Thanks for the reasoning behind the failure. I had tried a \h, but that failed also, so…at least I have another tool in the box to understand the next time I try. :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/84005</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84005</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Wed, 08 Feb 2023 21:34:54 GMT</pubDate></item><item><title><![CDATA[Reply to Remove last word of each line on Wed, 08 Feb 2023 19:59:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lycan-thrope" aria-label="Profile: Lycan-Thrope">@<bdi>Lycan-Thrope</bdi></a> said in <a href="/post/83989">Remove last word of each line</a>:</p>
<blockquote>
<p dir="auto">Mine broke when I tried my suggestion of changing the {11} to {12}. Not sure why, but it did.</p>
</blockquote>
<p dir="auto">That’s because the class you used <code>[\w+]</code> had 2 issues. First you stated it should be a word character, thus one of the alphanumeric characters plus underscore, see <a href="https://www.boost.org/doc/libs/1_78_0/libs/regex/doc/html/boost_regex/syntax/character_classes/std_char_classes.html" rel="nofollow ugc">boost documentation</a>. So as it does not include a space, but the space and 11 characters were what you wanted to select (in your adjusted version with <code>{12}</code>), it wasn’t going to select any of the lines. You also could have replaced the <code>+</code> with a space character and you would have selected the lines.</p>
<p dir="auto">Second issue was that the <code>+</code> you added did not mean as many of the <code>\w</code> as possible, but actually just a <code>+</code> character. So if you replaced one of those spaces before the 11 <code>\w</code> characters with a <code>+</code> character your regex would have worked on that 1 line with the quantifier of <code>{12}</code>.</p>
<p dir="auto">Possibly, had you entered your regex into <a href="http://regex101.com" rel="nofollow ugc">regex101.com</a> the description may have alerted you to the mistake. So although it worked (on 11 characters) the premise behind it was unfortunately wrong.</p>
<p dir="auto">But, and I fully intend to end on a positive note, it was a useful exercise for you. I too was once in your shoes. Sometimes you learn more by the mistakes you make. I often used <a href="http://regex101.com" rel="nofollow ugc">regex101.com</a> to find out the description, it really can be useful. Don’t forget though that as it uses a similar (but not the same) regex engine there can sometimes be differences.</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/83990</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/83990</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Wed, 08 Feb 2023 19:59:41 GMT</pubDate></item><item><title><![CDATA[Reply to Remove last word of each line on Wed, 08 Feb 2023 19:09:06 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> ,<br />
Cleaner and simpler. Mine broke when I tried my suggestion of changing the <code>{11}</code> to <code>{12}</code>. Not sure why, but it did.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/83989</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/83989</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Wed, 08 Feb 2023 19:09:06 GMT</pubDate></item><item><title><![CDATA[Reply to Remove last word of each line on Wed, 08 Feb 2023 16:45:54 GMT]]></title><description><![CDATA[<p dir="auto">@Bahaa-Eddin-ツ ,</p>
<p dir="auto">You already <a href="https://community.notepad-plus-plus.org/topic/24110/how-to-change-email-and-pass-to-email-pass">asked that</a>.  Be patient, and keep the discussion there.</p>
<p dir="auto">Your new question has nothing to do with “remove last word of each line”, and shouldn’t be asked in this discussion.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/83977</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/83977</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 08 Feb 2023 16:45:54 GMT</pubDate></item><item><title><![CDATA[Reply to Remove last word of each line on Wed, 08 Feb 2023 16:41:14 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><br />
Hi sir!<br />
you helped me a lot :)<br />
<strong>Do you know a way to convert email and pass from:</strong></p>
<pre><code>email: example@domain.com
password: 123123
</code></pre>
<p dir="auto">to:</p>
<pre><code>example@domain.com:123123
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/83976</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/83976</guid><dc:creator><![CDATA[Bahaa0013]]></dc:creator><pubDate>Wed, 08 Feb 2023 16:41:14 GMT</pubDate></item><item><title><![CDATA[Reply to Remove last word of each line on Wed, 08 Feb 2023 12:31:14 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> said in <a href="/post/83970">Remove last word of each line</a>:</p>
<blockquote>
<p dir="auto">SEARCH (?-s).{12}$</p>
</blockquote>
<p dir="auto">While <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a>’s suggestion appears to remove 12 characters when only 11 characters were wanted for removal, he’s also eliminating the space character that comes before the final 11, which seems fine to me.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/83972</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/83972</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 08 Feb 2023 12:31:14 GMT</pubDate></item><item><title><![CDATA[Reply to Remove last word of each line on Wed, 08 Feb 2023 09:33:19 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/andrea-ferro" aria-label="Profile: andrea-ferro">@<bdi>andrea-ferro</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/lycan-thrope" aria-label="Profile: lycan-thrope">@<bdi>lycan-thrope</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">Why not this <strong>simple</strong> one :</p>
<p dir="auto">SEARCH <strong><code>(?-s).{12}$</code></strong></p>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
<p dir="auto"><strong><code>Regular expression</code></strong> checked</p>
<p dir="auto">Possibly <strong><code>Wrap around</code></strong> checked</p>
<p dir="auto"><strong>One</strong> click <strong>only</strong> on the <strong><code>Replace All</code></strong> button</p>
<p dir="auto">Best Regards</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/83970</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/83970</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Wed, 08 Feb 2023 09:33:19 GMT</pubDate></item><item><title><![CDATA[Reply to Remove last word of each line on Wed, 08 Feb 2023 05:20:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andrea-ferro" aria-label="Profile: Andrea-Ferro">@<bdi>Andrea-Ferro</bdi></a> ,<br />
Start here:<br />
<a href="https://npp-user-manual.org/docs/searching/#regular-expressions" rel="nofollow ugc">https://npp-user-manual.org/docs/searching/#regular-expressions</a><br />
Figure, you need to find the last 11 characters of a line, and replace them with nothing.</p>
<p dir="auto">On the off chance you actually did try, this is what I came up with while you were reading it. :)</p>
<p dir="auto"><code>Find what: (.*(?=(?&lt;=)[\w+]{11}))(.*)</code><br />
<code>Replace with: $1</code><br />
<code>Search Mode: Regular Expression</code><br />
<code>Dot Matches Newline = NOT CHECKED</code></p>
<p dir="auto">This will leave a space behind the last letter. If you want that gone too, I suspect you’ll have to up the {11} to {12}, but if there is no space there, you’ll chop off letters.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/83968</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/83968</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Wed, 08 Feb 2023 05:20:19 GMT</pubDate></item></channel></rss>