<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to write the regex to extract the IP Address, but not CIDr notations from my sample data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-the-IP-Address-but-not-CIDr/m-p/127253#M34499</link>
    <description>&lt;P&gt;Here you go:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^([^\s]+\s+){6}(?P&amp;lt;src_ip&amp;gt;\d+\.\d+\.\d+\.\d+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 04 Apr 2015 03:12:52 GMT</pubDate>
    <dc:creator>rsennett_splunk</dc:creator>
    <dc:date>2015-04-04T03:12:52Z</dc:date>
    <item>
      <title>How to write the regex to extract the IP Address, but not CIDr notations from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-the-IP-Address-but-not-CIDr/m-p/127252#M34498</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to extract fields from a feed that I have, but the automated field extractor is not working for me though. I want to tag the IP address at the very end of every line and call it 'src_ip'. However the automated tool picks up the two CIDr notations every time as well as the IP address at the end of the line.&lt;/P&gt;

&lt;P&gt;I am looking for Regex that will only pickup the IP address at the end of each line, and NOT the CIDr notations.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;20150404 00:12 &lt;A href="http://www.yahoo.com" target="test_blank"&gt;http://www.yahoo.com&lt;/A&gt; domain\user faddr=192.168.1.0/24 gaddr=192.168.1.0/24 192.168.1.68
20150404 00:12 &lt;A href="http://www.yahoo.com" target="test_blank"&gt;http://www.yahoo.com&lt;/A&gt; domain\user faddr=192.168.1.0/24 gaddr=192.168.1.0/24 192.168.1.21
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Would really appreciate somebody to provide me with the Regex it would be much appreciated.&lt;/P&gt;

&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2015 02:17:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-the-IP-Address-but-not-CIDr/m-p/127252#M34498</guid>
      <dc:creator>j666gak</dc:creator>
      <dc:date>2015-04-04T02:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the regex to extract the IP Address, but not CIDr notations from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-the-IP-Address-but-not-CIDr/m-p/127253#M34499</link>
      <description>&lt;P&gt;Here you go:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^([^\s]+\s+){6}(?P&amp;lt;src_ip&amp;gt;\d+\.\d+\.\d+\.\d+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 04 Apr 2015 03:12:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-the-IP-Address-but-not-CIDr/m-p/127253#M34499</guid>
      <dc:creator>rsennett_splunk</dc:creator>
      <dc:date>2015-04-04T03:12:52Z</dc:date>
    </item>
  </channel>
</rss>

