<?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 Regex for last IP Address in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-last-IP-Address/m-p/566058#M197241</link>
    <description>&lt;P&gt;Can someone please help with the Splunk query for the below scenario:&lt;/P&gt;&lt;P&gt;I want to extract last IP address by a regular expression (regex) , for an event which has one or more IP addresses.&lt;/P&gt;&lt;P&gt;If the event has one IP ---&amp;gt; then extract that IP&lt;/P&gt;&lt;P&gt;If the event has more than one IP ---&amp;gt; then extract the last IP&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 07 Sep 2021 04:51:10 GMT</pubDate>
    <dc:creator>VS0909</dc:creator>
    <dc:date>2021-09-07T04:51:10Z</dc:date>
    <item>
      <title>Regex for last IP Address</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-last-IP-Address/m-p/566058#M197241</link>
      <description>&lt;P&gt;Can someone please help with the Splunk query for the below scenario:&lt;/P&gt;&lt;P&gt;I want to extract last IP address by a regular expression (regex) , for an event which has one or more IP addresses.&lt;/P&gt;&lt;P&gt;If the event has one IP ---&amp;gt; then extract that IP&lt;/P&gt;&lt;P&gt;If the event has more than one IP ---&amp;gt; then extract the last IP&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 04:51:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-last-IP-Address/m-p/566058#M197241</guid>
      <dc:creator>VS0909</dc:creator>
      <dc:date>2021-09-07T04:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for last IP Address</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-last-IP-Address/m-p/566110#M197273</link>
      <description>&lt;P&gt;Can someone please help with the Splunk query for the below scenario:&lt;/P&gt;&lt;P&gt;I want to extract last IP address by a regular expression (regex) , for an event which has one or more IP addresses.&lt;/P&gt;&lt;P&gt;If the event has one IP ---&amp;gt; then extract that IP&lt;/P&gt;&lt;P&gt;If the event has more than one IP ---&amp;gt; then extract the last IP&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 10:41:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-last-IP-Address/m-p/566110#M197273</guid>
      <dc:creator>VS0909</dc:creator>
      <dc:date>2021-09-07T10:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for last IP Address</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-last-IP-Address/m-p/566188#M197313</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225618"&gt;@VS0909&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You can try below;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;rex "(?!.+\s\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?&amp;lt;ip&amp;gt;\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})"&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 07 Sep 2021 16:03:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-last-IP-Address/m-p/566188#M197313</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-09-07T16:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for last IP Address</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-last-IP-Address/m-p/566201#M197322</link>
      <description>&lt;P&gt;Can you share some example events to clarify how the last ip address might appear?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 18:55:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-last-IP-Address/m-p/566201#M197322</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-09-07T18:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for last IP Address</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-last-IP-Address/m-p/566205#M197324</link>
      <description>&lt;P&gt;(?&amp;lt;ip&amp;gt;\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b)(?!.*\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b)&lt;/P&gt;&lt;P&gt;Ugly as hell, and of course doesn't check for validity of the IP (accepts any 1-3 digit sequences, even ridiculous like 345.912.123.0). Regex is not the best tool to validate IP-s&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 19:45:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-last-IP-Address/m-p/566205#M197324</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-09-07T19:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for last IP Address</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-last-IP-Address/m-p/566206#M197325</link>
      <description>&lt;P&gt;Close, but your regex will match the first ip on the line, not the last one.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 19:46:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-last-IP-Address/m-p/566206#M197325</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-09-07T19:46:50Z</dc:date>
    </item>
  </channel>
</rss>

