<?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: Date field Extraction ?? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Date-field-Extraction/m-p/26505#M5128</link>
    <description>&lt;P&gt;Thanx Rob &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 17 Nov 2012 13:47:30 GMT</pubDate>
    <dc:creator>rakesh_498115</dc:creator>
    <dc:date>2012-11-17T13:47:30Z</dc:date>
    <item>
      <title>Date field Extraction ??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-field-Extraction/m-p/26501#M5124</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have the following format of Dates in my logs like 2007/01/25 and 2006/12 . i want to extract these dates to a single field called Date. I have written the regular expression like this..&lt;/P&gt;

&lt;P&gt;"(?i)/.*?/(?P&lt;DATE&gt;\d+/\d+/\d+)/\w+"&lt;/DATE&gt;&lt;/P&gt;

&lt;P&gt;but this is extrating only the format 2007/01/25 .. but i  couldn't extract 2006/12 ..how can i write a single regular expression to extract both the dates ???&lt;/P&gt;

&lt;P&gt;please help&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2012 15:01:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-field-Extraction/m-p/26501#M5124</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2012-11-07T15:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date field Extraction ??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-field-Extraction/m-p/26502#M5125</link>
      <description>&lt;P&gt;Without knowing what the source looks like, this is a bit more difficult to answer. It also looks like you are using the interactive field extractor feature in Splunk. However, the simplest regex for use with the rex command based on your example would be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex field=yourField "(?&amp;lt;1date&amp;gt;[\d/]+)\s\w+"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Nov 2012 19:53:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-field-Extraction/m-p/26502#M5125</guid>
      <dc:creator>Rob</dc:creator>
      <dc:date>2012-11-07T19:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Date field Extraction ??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-field-Extraction/m-p/26503#M5126</link>
      <description>&lt;P&gt;I have log events like &lt;/P&gt;

&lt;P&gt;event1 &lt;/P&gt;

&lt;P&gt;2007/02/12 &amp;lt;&lt;SNIPNET&gt;&amp;gt;sdsdsdsddad&lt;BR /&gt;
asdasdasdasdsadasdasd&lt;BR /&gt;
asdsdad&lt;/SNIPNET&gt;&lt;/P&gt;

&lt;P&gt;event2 &lt;/P&gt;

&lt;P&gt;2006/12 &amp;lt;&lt;SNIPPENT&gt;&amp;gt; dasdasdasdasd&lt;BR /&gt;
asdas&lt;BR /&gt;
dsadsadsadsadasdasdsadsa&lt;BR /&gt;
sadsa&lt;/SNIPPENT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Nov 2012 13:52:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-field-Extraction/m-p/26503#M5126</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2012-11-08T13:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Date field Extraction ??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-field-Extraction/m-p/26504#M5127</link>
      <description>&lt;P&gt;@rakesh498115&lt;BR /&gt;
I edited the regex above to match what you are looking for. That should do the job.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Nov 2012 19:02:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-field-Extraction/m-p/26504#M5127</guid>
      <dc:creator>Rob</dc:creator>
      <dc:date>2012-11-08T19:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Date field Extraction ??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-field-Extraction/m-p/26505#M5128</link>
      <description>&lt;P&gt;Thanx Rob &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Nov 2012 13:47:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-field-Extraction/m-p/26505#M5128</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2012-11-17T13:47:30Z</dc:date>
    </item>
  </channel>
</rss>

