<?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 and Replace..]]></title><description><![CDATA[<p dir="auto">I’ve a file with alot of lines in them with various data, but what I’m looking to do is to grab all text containing +99(87654321) and i understand i can just use \d{11} actually but the problem is that when i do, i dont know how to replace any non-qualifying text with empties? So say the file looks like …:<br />
123 455 61 +9901020304 blah blah 901</p>
<p dir="auto">I wish to blank everything but the column of numbers prefixed with +99</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/18353/regex-and-replace</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Jul 2026 19:33:55 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/18353.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 10 Oct 2019 17:14:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RegEx and Replace.. on Fri, 11 Oct 2019 12:22:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eddie-adolfsson" aria-label="Profile: Eddie-Adolfsson">@<bdi>Eddie-Adolfsson</bdi></a></p>
<p dir="auto">Just informationally, you can remove lines NOT containing a specific bit of text via finding it with the following method:</p>
<p dir="auto">Say you want to match lines that DON’T contain <code>abc</code>.  Then your search expression might be <code>^(?-s)(?!.*abc).*\R</code>.  If you replace with <em>nothing</em> when you run a replacement you effectively remove those lines.</p>
<p dir="auto">Obviously you can replace <code>abc</code> with whatever you need.  It doesn’t have to be constant text, it can be a regular expression of course.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47733</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47733</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 11 Oct 2019 12:22:53 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx and Replace.. on Fri, 11 Oct 2019 08:13:00 GMT]]></title><description><![CDATA[<p dir="auto">For similar tasks I adopt a two step process, first to separate the text I want from the rest by putting them on separate lines, second by selecting the (un)wanted lines.</p>
<p dir="auto">Step 1: Replace <code>(\+\d{10})</code> with <code>\r\n\1\r\n</code>.<br />
Step 2: Mark all lines matching <code>^\+\d{10}$</code><br />
Step 3a: Either Menu =&gt; Search =&gt; Bookmarks =&gt; copy all marked lines, so they can be pasted into another buffer.<br />
Step 3b: Or  Menu =&gt; Search =&gt; Bookmarks =&gt; Remove unmarked lines.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47725</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47725</guid><dc:creator><![CDATA[AdrianHHH]]></dc:creator><pubDate>Fri, 11 Oct 2019 08:13:00 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx and Replace.. on Thu, 10 Oct 2019 18:02:09 GMT]]></title><description><![CDATA[<p dir="auto">Thank you so much, but I forgot to mention that the same document has lines in it that doesn’t have the +99 thing at all in them, and i need those gone too, what do i do then?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47715</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47715</guid><dc:creator><![CDATA[Eddie Adolfsson]]></dc:creator><pubDate>Thu, 10 Oct 2019 18:02:09 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx and Replace.. on Thu, 10 Oct 2019 17:19:55 GMT]]></title><description><![CDATA[<p dir="auto">This might give you a solid start:</p>
<p dir="auto">Search for <code>^(?-s).*?(\+\d{10}).*</code> and replace with <code>\1</code>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47713</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47713</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 10 Oct 2019 17:19:55 GMT</pubDate></item></channel></rss>