<?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 changing date in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-changing-date/m-p/233243#M69232</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I want to check daily if my file generated successfully. The filename is prefixed by date so e.g.&lt;/P&gt;

&lt;P&gt;3 march i'll have a filename like: 20160302-myfile&lt;BR /&gt;
2 march - 20160301-myfile&lt;/P&gt;

&lt;P&gt;I retain the files in folder for 3 months so just using *-myfile doesn't work for me.&lt;/P&gt;

&lt;P&gt;Can splunk regex autoincrement the date everyday?&lt;/P&gt;</description>
    <pubDate>Thu, 03 Mar 2016 20:46:02 GMT</pubDate>
    <dc:creator>aniketb</dc:creator>
    <dc:date>2016-03-03T20:46:02Z</dc:date>
    <item>
      <title>Regex for changing date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-changing-date/m-p/233243#M69232</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I want to check daily if my file generated successfully. The filename is prefixed by date so e.g.&lt;/P&gt;

&lt;P&gt;3 march i'll have a filename like: 20160302-myfile&lt;BR /&gt;
2 march - 20160301-myfile&lt;/P&gt;

&lt;P&gt;I retain the files in folder for 3 months so just using *-myfile doesn't work for me.&lt;/P&gt;

&lt;P&gt;Can splunk regex autoincrement the date everyday?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 20:46:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-changing-date/m-p/233243#M69232</guid>
      <dc:creator>aniketb</dc:creator>
      <dc:date>2016-03-03T20:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for changing date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-changing-date/m-p/233244#M69233</link>
      <description>&lt;P&gt;So, the data is ingested already and you want to alert OR check if you received file for today (or Yesterday) using Splunk search?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 20:52:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-changing-date/m-p/233244#M69233</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-03T20:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for changing date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-changing-date/m-p/233245#M69234</link>
      <description>&lt;P&gt;Yes my log does show it. e.g.&lt;/P&gt;

&lt;P&gt;today's log will show &lt;/P&gt;

&lt;P&gt;/my folder/ mysubfolder 20160302-myfile.zip 20160301-myfile.zip .....&lt;/P&gt;

&lt;P&gt;I need the search string to search on:&lt;/P&gt;

&lt;P&gt;sourcetype=xyz "/my folder/ mysubfolder" 20160301 (this variable should change automatically everyday)&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 20:55:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-changing-date/m-p/233245#M69234</guid>
      <dc:creator>aniketb</dc:creator>
      <dc:date>2016-03-03T20:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for changing date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-changing-date/m-p/233246#M69235</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=xyz "/my folder/ mysubfolder" [| gentimes start=-1 | eval search=strftime(now(),"%Y%m%d') | table search ] 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The subsearch will generate a value in the format %Y%m%d (2010303 for today) and return the text value of it to main search.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 21:17:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-changing-date/m-p/233246#M69235</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-03T21:17:25Z</dc:date>
    </item>
  </channel>
</rss>

