<?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 GROUP cuts off data]]></title><description><![CDATA[<p dir="auto">I’m using the following regex to find an IP address in ‘slash’ notation.</p>
<p dir="auto">String = D EX     192.168.254.0/24 [170/1252608] via 172.29.104.5, 3w0d, Vlan104<br />
Regex = (([0-2]?[0-9]?[0-9].){3}([0-2]?[0-9]?[0-9])/[1-3]?[1-9])</p>
<p dir="auto">When I find using the regex it matches.  However, when I select ‘\1’ for replace (without quotes) to keep just the group match, the IP address has digits removed.  For example, if the IP address were a 10.x network the result returns 0.x and cuts off the ‘1’.  If the address is 172.16.x it cuts off the ‘172’.  If I change the regex to explicitly expect 10.x, 172.x, 192.x, etc. it works fine.</p>
<p dir="auto">Regex = ^.<em>(10.([0-2]?[0-9]?[0-9].){2}([0-2]?[0-9]?[0-9])/[1-3]?[1-9]).</em>$<br />
Regex = ^.<em>(172.([0-2]?[0-9]?[0-9].){2}([0-2]?[0-9]?[0-9])/[1-3]?[1-9]).</em>$<br />
Regex = ^.<em>(192.([0-2]?[0-9]?[0-9].){2}([0-2]?[0-9]?[0-9])/[1-3]?[1-9]).</em>$</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/11247/regex-group-cuts-off-data</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 03:47:26 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/11247.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 05 Feb 2016 16:29:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to REGEX GROUP cuts off data on Fri, 05 Feb 2016 16:46:29 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/spickles" aria-label="Profile: spickles">@<bdi>spickles</bdi></a><br />
one thing might be that you did not escape the forward slash !?<br />
But the replace … you want to replace the part which is found with the part which is found … ???</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13818</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13818</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Fri, 05 Feb 2016 16:46:29 GMT</pubDate></item></channel></rss>