<?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[Hello-Help with regular expressions]]></title><description><![CDATA[<p dir="auto">Hello there, ive been messing around with regular expressions feature of search and replace and i have to say im not a programmer. I feel im asking a complex thing tho :)</p>
<p dir="auto">Have a list in a txt file formatted as above</p>
<p dir="auto">123:abc:1.2.3.4.5.2<br />
def:456:6.7.8.9.6.3</p>
<p dir="auto">is it possible to make them like</p>
<p dir="auto">1.2.3.4.5.2: 123:abc<br />
6.7.8.9.6.3: def:456</p>
<p dir="auto">evidencing that what is before and after the first and second “:” can be words or numbers | what is  among commas after second “:” (1.2.3.4.5) are only numbers.<br />
I hope i’ve explained correctly what i intend to do :)<br />
Thanks in advance!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/13201/hello-help-with-regular-expressions</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 18:52:03 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/13201.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 31 Jan 2017 12:51:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hello-Help with regular expressions on Thu, 02 Feb 2017 02:01:35 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <strong>Antonio</strong>,</p>
<p dir="auto">If you are sure that the <strong>last colon</strong>, of <strong>each</strong> line of your file, is the <strong>exact</strong> location which separates the <strong>two</strong> parts, of <strong>each</strong> line, to be <strong>reversed</strong> , an other formulation could be :</p>
<p dir="auto">SEARCH : <strong><code>(?-s)^(.+):(.+)</code></strong></p>
<p dir="auto">REPLACE : <strong><code>\2: \1</code></strong>  ( with a <strong>space</strong> between the <strong>colon</strong> <strong><code>:</code></strong> and the <strong>back-reference</strong> <strong><code>\1</code></strong>)</p>
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">The <strong><code>(?-s)</code></strong> first part ensures that the <strong>dot</strong> special character ( <strong><code>.</code></strong> ) represents a <strong>single standard</strong> character and <strong>not</strong> any <strong>End of Line</strong> character</p>
</li>
<li>
<p dir="auto">Then the part <strong><code>(.+):</code></strong>, look, from <strong>beginning</strong> of line ( <strong><code>^</code></strong> ), for the <strong>longest</strong> non-empty range of <strong>standard</strong> characters, followed by the  <strong>last colon</strong> of each line, which is stored as <strong>group 1</strong>, due to <strong>round</strong> brackets</p>
</li>
<li>
<p dir="auto">Finally, the part <strong><code>(.+)</code></strong>, grabs <strong>all</strong> the <strong>remaining standard</strong> characters of the <strong>current</strong> line ( = all text after the <strong>last</strong> colon character ) and stores them in <strong>group 2</strong></p>
</li>
</ul>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/21431</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/21431</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 02 Feb 2017 02:01:35 GMT</pubDate></item><item><title><![CDATA[Reply to Hello-Help with regular expressions on Tue, 31 Jan 2017 13:30:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/antonio-miboost" aria-label="Profile: Antonio-MiBoost">@<bdi>Antonio-MiBoost</bdi></a></p>
<p dir="auto">Not so complex, hopefully there is a learning opportunity for you here!  Nothing is worse than someone that repeatedly posts about regular expressions, and demonstrates with the questions that they aren’t learning, but are rather just looking for someone to write their regular expression searches for them.  :-D</p>
<p dir="auto">Find what:  <code>^([^:]+:[^:]+):([^\r\n]+)</code><br />
Repl with:  <code>\2:\x20\1</code><br />
Search mode:  Regular expression</p>
<p dir="auto">Here’s what it does:</p>
<p dir="auto">Find the start of a line, followed by one or more characters that are not : (and remember that as group #1), followed by a :, followed by one or more characters that are not : (and remember that as group #2, followed by a :, followed by one or more characters out to the end of the line.</p>
<p dir="auto">Replace the found text with the contents of group #2, a :, a blank space (the \x20) and the contents of group #1.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/21398</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/21398</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Tue, 31 Jan 2017 13:30:40 GMT</pubDate></item></channel></rss>