<?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: Regex - find second match? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-find-second-match/m-p/67317#M16835</link>
    <description>&lt;P&gt;Worked. Thanks man! Very quick response too.&lt;/P&gt;</description>
    <pubDate>Sat, 09 Oct 2010 01:48:28 GMT</pubDate>
    <dc:creator>cfortune</dc:creator>
    <dc:date>2010-10-09T01:48:28Z</dc:date>
    <item>
      <title>Regex - find second match?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-find-second-match/m-p/67315#M16833</link>
      <description>&lt;P&gt;Was hoping I could get some help with extracting a field. I have a line that looks like: &lt;/P&gt;

&lt;P&gt;"2010-10-08 16:04:10 0.0.0.0 21 3236 255.255.255.255 22821 2312 username 0 0 - 22 Back from VerifyPassword(user=username), bPasswordOK=1, iRetCode=0"&lt;/P&gt;

&lt;P&gt;I want to extract the 255.255.255.255 as src_ip. I understand how to extract the field but I can't come up with a regex that extracts only that second IP address (as it's the source, first is the destination and is always the same, of course these are made up in this example. I don't have broadcast addresses logging into my server). I even downloaded regexbuddy but I still can't figure it out because I'm lame.&lt;/P&gt;

&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Oct 2010 00:49:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-find-second-match/m-p/67315#M16833</guid>
      <dc:creator>cfortune</dc:creator>
      <dc:date>2010-10-09T00:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Regex - find second match?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-find-second-match/m-p/67316#M16834</link>
      <description>&lt;P&gt;I think this will work - this is in transforms.conf style:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mylookup]
REGEX=\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} ([^\s]+) \d+ \d+ ([^\s]+)
FORMAT=src_ip::$2 dest_ip::$1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 09 Oct 2010 01:02:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-find-second-match/m-p/67316#M16834</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2010-10-09T01:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Regex - find second match?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-find-second-match/m-p/67317#M16835</link>
      <description>&lt;P&gt;Worked. Thanks man! Very quick response too.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Oct 2010 01:48:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-find-second-match/m-p/67317#M16835</guid>
      <dc:creator>cfortune</dc:creator>
      <dc:date>2010-10-09T01:48:28Z</dc:date>
    </item>
  </channel>
</rss>

