<?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[RegEx solution to evaluate URL string - keep only the ending]]></title><description><![CDATA[<p dir="auto">I have several lines in NPP like so:</p>
<pre><code>https://www.website.com/blah/157845121/Keep_This_Portion/
</code></pre>
<p dir="auto">I’m wondering if there is a RegEx solution that can delete everything and keep just the very last part where it says</p>
<pre><code>Keep_This_Portion
</code></pre>
<p dir="auto">I actually need the underscore removed as well.  The sequence of numbers that appear before it, will always vary.</p>
<p dir="auto">—</p>
<p dir="auto"><em>moderator added code markdown around text; please don’t forget to <a href="https://community.notepad-plus-plus.org/topic/21925/faq-desk-formatting-forum-posts">use the <code>&lt;/&gt;</code> button to mark example text as “code”</a> so that characters don’t get changed by the forum</em></p>
]]></description><link>https://community.notepad-plus-plus.org/topic/25139/regex-solution-to-evaluate-url-string-keep-only-the-ending</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Apr 2026 05:52:49 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/25139.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Nov 2023 23:16:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RegEx solution to evaluate URL string - keep only the ending on Thu, 16 Nov 2023 15:05:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/20791">@JustinJudo</a> said in <a href="/post/90529">RegEx solution to evaluate URL string - keep only the ending</a>:</p>
<blockquote>
<p dir="auto">I had a death of a family member recently…I have far more important things to process in my head than trying to learn…</p>
</blockquote>
<p dir="auto">Yes, you do.<br />
I’m sorry for your loss; we all go through these things. :-(</p>
<p dir="auto">Perhaps you should be taking a break from everything right now, including your original need for manipulation of URL text data – how important is that in your current state?  You’re bound to make mistakes with whatever you’re trying to accomplish.</p>
<hr />
<blockquote>
<p dir="auto">As for my comment about PeterJone’s attitude, he deleted his snarky and condescending snipet so it just looks like I’m criticizing him for no reason - but yeah it certainly was there… he deleted it</p>
</blockquote>
<p dir="auto">I suppose this IS a problem.  If something is there long enough for someone to respond based on it, it should not be deleted or changed, lest further respondents draw potentially false conclusions.  BUT… having read Peter’s posts here for years and years, I have a hugely hard time believing that anything he said was all that offensive.</p>
<p dir="auto"><strong>A LATER EDIT</strong>: After reading Peter’s restored-but-strikethrough posting parts, assuming they are legitimate (but I’m sure they are), there’s nothing there that should have caused a flap of the magnitude that ensued.  Let’s chalk it up to the OP having a bad day (or series of days/weeks when you have a death of someone close) when he wasn’t fully in his right mind.</p>
<hr />
<p dir="auto">Oh, well, let’s get back to Notepad++ business.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90533</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90533</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 16 Nov 2023 15:05:23 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx solution to evaluate URL string - keep only the ending on Thu, 16 Nov 2023 03:24:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/12335">@Terry-R</a> said in <a href="/post/90517">RegEx solution to evaluate URL string - keep only the ending</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/20791">@JustinJudo</a><br />
<s>I know</s> In case you can’t see who down voted you, <s>but</s> it was me. I’ll own it because otherwise you will think <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3841">@PeterJones</a> did it.</p>
<p dir="auto">I did it because frankly your attitude sucks. You were provided the solution and <strong><strong>politely</strong></strong> steered (again) in the direction of documentation which will help you learn.</p>
<p dir="auto">We’re not asking you to know it all right now, but if you’d come with the above question and shown a bit of work (since this isn’t your first question), we will be very happy to help.</p>
<p dir="auto">Perhaps take this on board, you will likely need our help again, more than we need yours. Tone your attitude down!</p>
<p dir="auto">Terry</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/12335">@Terry-R</a></p>
<p dir="auto">Hey Terry, please free to downvote to your hearts content.  I don’t live for fake internet points so if that is what makes you happy - go for it.   Speaking of attitude by the way - you’re one to speak.  If you’re really pure as the driven snow, you should have minded your own business instead of butting into a thread in which you have no business.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> said in <a href="/post/90520">RegEx solution to evaluate URL string - keep only the ending</a>:</p>
<blockquote>
<p dir="auto">Hmmm, someone is “unbearable” because they’re speaking the bald truth – I don’t think so. You’re just mad because you got called out on being lazy and are just attempting to lean on others to do your thinking and problem solving for you.</p>
</blockquote>
<p dir="auto">Holy Christ, the condescending shit here is really quite something else.  The reason why I haven’t put any effort into learning RegEx is that I had a death of a family member recently so my head is in a big of a fog and I’m really not in the mood to learn any thing anything at this moment.  I’m sorry if my so called “attitude” really doesn’t sit well with you guys, I have far more important things to process in my head than trying to learn RegEx today.</p>
<p dir="auto">As for my comment about PeterJone’s attitude, he deleted his snarky and condescending snipet so it just looks like I’m criticizing him for no reason - but yeah it certainly was there… he deleted it.</p>
<p dir="auto">Thanks all, you guys are all fantastic!  Thanks for showing me your true colors today!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90529</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90529</guid><dc:creator><![CDATA[JustinJudo]]></dc:creator><pubDate>Thu, 16 Nov 2023 03:24:03 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx solution to evaluate URL string - keep only the ending on Thu, 16 Nov 2023 02:12:05 GMT]]></title><description><![CDATA[<p dir="auto">I’m going to keep this short (and recommend not responding because it would go off-topic and I’m not that familiar with it anyway) because it’s not a Notepad++ topic really, but strongly recommend using <a href="https://docs.python.org/3/library/urllib.parse.html#module-urllib.parse" rel="nofollow ugc">Python’s urllib.parse module</a> for this purpose, which is accessible via PythonScript or just a normal non-Notepad++ Python script.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90527</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90527</guid><dc:creator><![CDATA[Mark Olson]]></dc:creator><pubDate>Thu, 16 Nov 2023 02:12:05 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx solution to evaluate URL string - keep only the ending on Thu, 16 Nov 2023 02:09:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/20791">@JustinJudo</a> said in <a href="/post/90516">RegEx solution to evaluate URL string - keep only the ending</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3841">@PeterJones</a> said in <a href="/post/90515">RegEx solution to evaluate URL string</a>:</p>
<blockquote>
<p dir="auto">Quite easily done, especially if someone were to have started learning regex back in April when one was pointed to the documentation. You will never learn if you don’t try.</p>
</blockquote>
<p dir="auto">You’re unbearable.  If you can’t be afford to be civil or polite in your response, then just keep out of the thread.  There’s just no need for any of your snarky attitude.</p>
</blockquote>
<p dir="auto">Sorry, I thought I deleted that, along with some other stuff, because  I realized I let my emotions get the better of me.</p>
<p dir="auto">But even without my intended edit, while frustrated with you, I <em>still</em> handed you the answer, for free.  But if you want to whine about how awful I am for including snark along with the right answer, you go right on ahead.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90526</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90526</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 16 Nov 2023 02:09:49 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx solution to evaluate URL string - keep only the ending on Thu, 16 Nov 2023 00:19:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/20791">@JustinJudo</a> said :</p>
<blockquote>
<p dir="auto">You’re unbearable.</p>
</blockquote>
<p dir="auto">Hmmm, someone is “unbearable” because they’re speaking the bald truth – I don’t think so.  You’re just mad because you got called out on being lazy and are just attempting to lean on others to do your thinking and problem solving for you.</p>
<blockquote>
<p dir="auto">If you can’t be afford to be civil or polite in your response, then just keep out of the thread.</p>
</blockquote>
<p dir="auto">The response was both civil and polite.  And Peter, as a tireless moderator, has a duty to respond in the manner he did.  And it is really hard to believe <em>you</em> responded in the way that <em>you</em> did, when he still gave you the answer to your need.</p>
<p dir="auto">OK, yep, I’ll downvote too.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90520</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90520</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 16 Nov 2023 00:19:26 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx solution to evaluate URL string - keep only the ending on Thu, 16 Nov 2023 00:13:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/12335">@Terry-R</a> said in <a href="/post/90517">RegEx solution to evaluate URL string - keep only the ending</a>:</p>
<blockquote>
<p dir="auto">I know you can’t see who down voted you</p>
</blockquote>
<p dir="auto">I could be wrong about this, but I think you CAN see who downvoted one of YOUR postings, but other people can’t.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90518</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90518</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 16 Nov 2023 00:13:20 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx solution to evaluate URL string - keep only the ending on Thu, 16 Nov 2023 00:15:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/20791">@JustinJudo</a><br />
<s>I know</s> In case you can’t see who down voted you, <s>but</s> it was me. I’ll own it because otherwise you will think <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3841">@PeterJones</a> did it.</p>
<p dir="auto">I did it because frankly your attitude sucks. You were provided the solution and <strong><strong>politely</strong></strong> steered (again) in the direction of documentation which will help you learn.</p>
<p dir="auto">We’re not asking you to know it all right now, but if you’d come with the above question and shown a bit of work (since this isn’t your first question), we will be very happy to help.</p>
<p dir="auto">Perhaps take this on board, you will likely need our help again, more than we need yours. Tone your attitude down!</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90517</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90517</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Thu, 16 Nov 2023 00:15:16 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx solution to evaluate URL string - keep only the ending on Wed, 15 Nov 2023 23:47:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3841">@PeterJones</a> said in <a href="/post/90515">RegEx solution to evaluate URL string</a>:</p>
<blockquote>
<p dir="auto">Quite easily done, especially if someone were to have started learning regex back in April when one was pointed to the documentation. You will never learn if you don’t try.</p>
</blockquote>
<p dir="auto">You’re unbearable.  If you can’t be afford to be civil or polite in your response, then just keep out of the thread.  There’s just no need for any of your snarky attitude.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90516</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90516</guid><dc:creator><![CDATA[JustinJudo]]></dc:creator><pubDate>Wed, 15 Nov 2023 23:47:04 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx solution to evaluate URL string - keep only the ending on Thu, 16 Nov 2023 14:57:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/20791">@JustinJudo</a> said in <a href="/post/90513">RegEx solution to evaluate URL string</a>:</p>
<blockquote>
<p dir="auto">I’m wondering if there is a RegEx solution that can delete everything and keep just the very last part where it says</p>
</blockquote>
<p dir="auto">Quite easily done, especially if someone were to have started learning regex back in April when one was pointed to the documentation, <s>rather than hoping that people would spoonfeed them the answers</s>.  You will never learn if you don’t try.</p>
<p dir="auto">But since you seem to need it:<br />
FIND = <code>^https://www.website.com/blah/\d+/(.*)/</code><br />
REPLACE = <code>$1</code></p>
<blockquote>
<p dir="auto">I actually need the underscore removed as well.</p>
</blockquote>
<p dir="auto"><s>Well, then you really shouldn’t’ve included the underscores in the “what I want” section.</s><br />
I’d do that as a separate search-and-replace, where you look for the underscore and replace it with a space.  I am going to assume you can figure out a regex to replace an underscore with a space.</p>
<p dir="auto">Good luck.</p>
<p dir="auto">—</p>
<p dir="auto"><em>note on edits: I had edited my post within 10 minutes of posting it, trying to tone things down, and my edits were done 10 minutes before any replies were posted.  But it apparently wasn’t enough, and now I’ve been accused of trying to “change history” or some such, so I have restored my original phrasing, but in <s>strikeout mode</s>, so everyone can see how rude they think I was originally, and how I tried to soften my phrasing to be kinder (apparently unsuccessfully).  After restoring these <s>strikeout</s> sections, I will be leaving this discussion, because it’s not helping anybody.</em></p>
]]></description><link>https://community.notepad-plus-plus.org/post/90515</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90515</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 16 Nov 2023 14:57:05 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx solution to evaluate URL string - keep only the ending on Thu, 16 Nov 2023 14:55:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/20791">@JustinJudo</a> ,</p>
<p dir="auto"><s>In response to your July regex query, I <a href="https://community.notepad-plus-plus.org/post/87625">pointed these references to you</a>:</s></p>
<h3>Useful References</h3>
<ul>
<li><a href="https://community.notepad-plus-plus.org/topic/21965/please-read-before-posting">Please Read Before Posting</a></li>
<li><a href="https://community.notepad-plus-plus.org/topic/22022/template-for-search-replace-questions">Template for Search/Replace Questions</a></li>
<li><a href="https://community.notepad-plus-plus.org/topic/21925/faq-desk-formatting-forum-posts">Formatting Forum Posts</a></li>
<li><a href="https://npp-user-manual.org/docs/searching/#regular-expressions" rel="nofollow ugc">Notepad++ Online User Manual: Searching/Regex</a></li>
<li><a href="https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regular-expressions-regex-documentation">FAQ: Where to find other regular expressions (regex) documentation</a></li>
</ul>
<p dir="auto"><s>You apparently didn’t avail yourself of that knowledge in the last 4 months, to learn how to properly format the question so that example text doesn’t get linkafied, thus forcing me to use moderator powers to fix your post.</s></p>
<p dir="auto"><s>In April, I had <a href="https://community.notepad-plus-plus.org/post/85717">previously pointed those out to you</a> in regard to your regex question.</s></p>
<p dir="auto"><s>At this point, I’m going to share something more specific to your circumstances:</s></p>
<p dir="auto">—</p>
<p dir="auto"><em><strong>Please note</strong>: This Community Forum is not a data transformation service; you should not expect to be able to always say “I have data like X and want it to look like Y” and have us do all the work for you.  If you are new to the Forum, and new to regular expressions, we will often give help on the first one or two data-transformation questions, especially if they are well-asked and you show a willingness to learn; and we will point you to the documentation where you can learn how to do the data transformations for yourself in the future.  But if you repeatedly ask us to do your work for you, you will find that the patience of usually-helpful Community members wears thin.  The best way to learn regular expressions is by experimenting with them yourself, and getting a feel for how they work; having us spoon-feed you the answers without you putting in the effort doesn’t help you in the long term and is uninteresting and annoying for us.</em></p>
<p dir="auto">—</p>
<p dir="auto"><em>note on edits: I had edited my post within 10 minutes of posting it, trying to tone things down, and my edits were done 10 minutes before any replies were posted.  But it apparently wasn’t enough, and now I’ve been accused of trying to “change history” or some such, so I have restored my original phrasing, but in <s>strikeout mode</s>, so everyone can see how rude they think I was originally, and how I tried to soften my phrasing to be kinder (apparently unsuccessfully).  After restoring these <s>strikeout</s> sections, I will be leaving this discussion, because it’s not helping anybody.</em></p>
]]></description><link>https://community.notepad-plus-plus.org/post/90514</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90514</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 16 Nov 2023 14:55:58 GMT</pubDate></item></channel></rss>