<?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 do I extract this date time field from my sample data using rex? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-date-time-field-from-my-sample-data-using/m-p/283059#M85536</link>
    <description>&lt;P&gt;Tested this and works fine:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;conn | rex field=_raw "^(?P\w+\s+\d+\s+\d+:\d+:\d+)" | stats count by ddate
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 28 Jul 2016 08:48:25 GMT</pubDate>
    <dc:creator>inventsekar</dc:creator>
    <dc:date>2016-07-28T08:48:25Z</dc:date>
    <item>
      <title>How do I extract this date time field from my sample data using rex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-date-time-field-from-my-sample-data-using/m-p/283058#M85535</link>
      <description>&lt;P&gt;I used this search, but it is not extracting the date time field properly. I will use this date time as a common field to join openstack api to find a public ip.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"conn" | rex field=_raw "(?P...\d+\d+:\d+:\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2nd try, also no result:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"conn" | rex field=_raw "(?P\[\s*(\d+/\D+/.*?)\])" | stats count by ddate
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jul 28 09:52:47 icns02 slapd[17684]: conn=1228614 fd=22 closed
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Jul 2016 07:11:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-date-time-field-from-my-sample-data-using/m-p/283058#M85535</guid>
      <dc:creator>cyberportnoc</dc:creator>
      <dc:date>2016-07-28T07:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract this date time field from my sample data using rex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-date-time-field-from-my-sample-data-using/m-p/283059#M85536</link>
      <description>&lt;P&gt;Tested this and works fine:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;conn | rex field=_raw "^(?P\w+\s+\d+\s+\d+:\d+:\d+)" | stats count by ddate
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Jul 2016 08:48:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-date-time-field-from-my-sample-data-using/m-p/283059#M85536</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-07-28T08:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract this date time field from my sample data using rex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-date-time-field-from-my-sample-data-using/m-p/283060#M85537</link>
      <description>&lt;P&gt;May I know if that rex on my reply worked fine or not. &lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 16:55:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-date-time-field-from-my-sample-data-using/m-p/283060#M85537</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-07-28T16:55:26Z</dc:date>
    </item>
  </channel>
</rss>

