<?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 to extract date from the file name in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/regex-to-extract-date-from-the-file-name/m-p/279568#M84470</link>
    <description>&lt;P&gt;Sample Event :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Fri Apr  8 18:20:42 2016 action=add, path="/ubidata/axway/JourneyData/AAA_NA_712_2016-03-28-21-19-03_354235057942819_1G1ZT64885F132289_0_0.zip", isdir=0, size=18443, gid=0, uid=0, modtime="Fri Apr  8 18:20:41 2016", mode="rw-r--r--", hash=
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 09 Apr 2016 01:53:32 GMT</pubDate>
    <dc:creator>athorat</dc:creator>
    <dc:date>2016-04-09T01:53:32Z</dc:date>
    <item>
      <title>regex to extract date from the file name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-to-extract-date-from-the-file-name/m-p/279567#M84469</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;we are using fs_notification and monitoring a specific path.&lt;BR /&gt;
I have a field called path which has the following values. &lt;BR /&gt;
Now I have to extract the date from the name of the file which is 2016-03-28 for the following files and then do a count of those values.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    /ubidata/axway/JourneyData/AAA_NA_70_2016-03-28-03-30-07_353466071554972_NA_0_0.zip
    /ubidata/axway/JourneyData/AAA_NA_70_2016-03-28-00-47-08_353466071286872_1HGCR2F5XDA159398_0_0.zip
    /ubidata/axway/JourneyData/AAA_NA_709_2016-03-28-23-38-13_353466070336173_5J6YH28776L027013_0_0.zip
    /ubidata/axway/JourneyData/AAA_NA_709_2016-03-28-23-11-04_353466070738055_JHMES96664S000240_0_0.zip
    /ubidata/axway/JourneyData/AAA_NA_709_2016-03-28-22-23-29_353466070290842_1FTRW12557FB57292_0_0.zip
    /ubidata/axway/JourneyData/AAA_NA_709_2016-03-28-20-36-26_354235059078372_1GNDV23LX6D194324_0_0.zip
    /ubidata/axway/JourneyData/AAA_NA_709_2016-03-28-20-31-06_354235059637177_JTDBR32E170131585_0_0.zip
    /ubidata/axway/JourneyData/AAA_NA_709_2016-03-28-20-27-01_354235059626014_2GKFLSE39D6131090_0_0.zip
    /ubidata/axway/JourneyData/AAA_NA_709_2016-03-28-20-14-59_354235059651772_3FAHP06Z48R221560_0_0.zip
    /ubidata/axway/JourneyData/AAA_NA_709_2016-03-28-20-08-00_354235057942819_1G1ZT64885F132289_0_0.zip
    /ubidata/axway/JourneyData/AAA_NA_709_2016-03-28-19-50-45_354235058343207_JHLRM3H51CC010877_0_0.zip
    /ubidata/axway/JourneyData/AAA_NA_709_2016-03-28-19-20-32_353466070121963_1J4FT28B19D178678_0_0.zip
    /ubidata/axway/JourneyData/AAA_NA_709_2016-03-28-18-23-14_354235059577712_5FNYF28407B037209_0_0.zip
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 09 Apr 2016 01:29:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-to-extract-date-from-the-file-name/m-p/279567#M84469</guid>
      <dc:creator>athorat</dc:creator>
      <dc:date>2016-04-09T01:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: regex to extract date from the file name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-to-extract-date-from-the-file-name/m-p/279568#M84470</link>
      <description>&lt;P&gt;Sample Event :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Fri Apr  8 18:20:42 2016 action=add, path="/ubidata/axway/JourneyData/AAA_NA_712_2016-03-28-21-19-03_354235057942819_1G1ZT64885F132289_0_0.zip", isdir=0, size=18443, gid=0, uid=0, modtime="Fri Apr  8 18:20:41 2016", mode="rw-r--r--", hash=
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 09 Apr 2016 01:53:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-to-extract-date-from-the-file-name/m-p/279568#M84470</guid>
      <dc:creator>athorat</dc:creator>
      <dc:date>2016-04-09T01:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: regex to extract date from the file name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-to-extract-date-from-the-file-name/m-p/279569#M84471</link>
      <description>&lt;P&gt;I'm definitely not the best with regex, but maybe something like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex field=path "\_\w+\_(?&amp;lt;date&amp;gt;\w+-\w+-\w+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 09 Apr 2016 03:09:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-to-extract-date-from-the-file-name/m-p/279569#M84471</guid>
      <dc:creator>niemesrw</dc:creator>
      <dc:date>2016-04-09T03:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: regex to extract date from the file name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-to-extract-date-from-the-file-name/m-p/279570#M84472</link>
      <description>&lt;P&gt;This should get you the &lt;CODE&gt;date&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "_(?&amp;lt;date&amp;gt;\d{4}-\d{2}-\d{2})-"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 09 Apr 2016 14:31:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-to-extract-date-from-the-file-name/m-p/279570#M84472</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-04-09T14:31:24Z</dc:date>
    </item>
  </channel>
</rss>

