<?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: Help - Extract file name from the below raw data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657583#M227128</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260574"&gt;@danroberts&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "(?&amp;lt;filename&amp;gt;OU_\w*\.\w*"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/UiiMSA/1" target="_blank"&gt;https://regex101.com/r/UiiMSA/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2023 11:31:03 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2023-09-14T11:31:03Z</dc:date>
    <item>
      <title>How to extract file name from the below raw data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657579#M227127</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can anyone help me to extract the below file name which is OU_..... from the below raw data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;12:04&lt;/SPAN&gt;:19.85&lt;/SPAN&gt; &lt;SPAN class=""&gt;14/09/2023&lt;/SPAN&gt; &lt;SPAN class=""&gt;directory=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;E:\data\Test&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;ECHO&lt;/SPAN&gt; &lt;SPAN class=""&gt;is&lt;/SPAN&gt; &lt;SPAN class=""&gt;off.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Volume&lt;/SPAN&gt; &lt;SPAN class=""&gt;in&lt;/SPAN&gt; &lt;SPAN class=""&gt;drive&lt;/SPAN&gt; &lt;SPAN class=""&gt;E&lt;/SPAN&gt; &lt;SPAN class=""&gt;is&lt;/SPAN&gt; &lt;SPAN class=""&gt;Data&lt;/SPAN&gt; &lt;SPAN class=""&gt;Volume&lt;/SPAN&gt; &lt;SPAN class=""&gt;Serial&lt;/SPAN&gt; &lt;SPAN class=""&gt;Number&lt;/SPAN&gt; &lt;SPAN class=""&gt;is&lt;/SPAN&gt; &lt;SPAN class=""&gt;7808-CA1B&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Directory&lt;/SPAN&gt; &lt;SPAN class=""&gt;of&lt;/SPAN&gt; &lt;SPAN class=""&gt;E:\data\Test&lt;/SPAN&gt; &lt;SPAN class=""&gt;13/09/2023&lt;/SPAN&gt; &lt;SPAN class=""&gt;13:22&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;DIR&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt;XXX\xxxx&lt;/SPAN&gt; &lt;SPAN class=""&gt;.&lt;/SPAN&gt; &lt;SPAN class=""&gt;13/09/2023&lt;/SPAN&gt; &lt;SPAN class=""&gt;13:22&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;DIR&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt;xxx\xxx&lt;/SPAN&gt; &lt;SPAN class=""&gt;..&lt;/SPAN&gt; &lt;SPAN class=""&gt;12/09/2023&lt;/SPAN&gt; &lt;SPAN class=""&gt;09:31&lt;/SPAN&gt; &lt;SPAN class=""&gt;95&lt;/SPAN&gt; &lt;SPAN class=""&gt;xxx\xxx&lt;/SPAN&gt; &amp;nbsp;&lt;SPAN class=""&gt;dir_details.bat&lt;/SPAN&gt; &lt;SPAN class=""&gt;13/09/2023&lt;/SPAN&gt; &lt;SPAN class=""&gt;13:41&lt;/SPAN&gt; &lt;SPAN class=""&gt;171&lt;/SPAN&gt; &lt;SPAN class=""&gt;xxx\xxx&lt;/SPAN&gt; &amp;nbsp;&lt;SPAN class=""&gt;dir_details_copy.bat&lt;/SPAN&gt; &lt;SPAN class=""&gt;07/09/2023&lt;/SPAN&gt; &lt;SPAN class=""&gt;13:26&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt; &lt;SPAN class=""&gt;xxx\xxx&lt;/SPAN&gt; &amp;nbsp;&lt;SPAN class=""&gt;edsadsad.txt&lt;/SPAN&gt; &lt;SPAN class=""&gt;07/09/2023&lt;/SPAN&gt; &lt;SPAN class=""&gt;13:26&lt;/SPAN&gt; &lt;SPAN class=""&gt;22&lt;/SPAN&gt; &lt;SPAN class=""&gt;xxx\xxx&lt;/SPAN&gt; &amp;nbsp;&lt;SPAN class=""&gt;OU_kljdajdklsajkdl.zip&lt;/SPAN&gt; &lt;SPAN class=""&gt;07/09/2023&lt;/SPAN&gt; &lt;SPAN class=""&gt;13:26&lt;/SPAN&gt; &lt;SPAN class=""&gt;22&lt;/SPAN&gt; &lt;SPAN class=""&gt;xxx\xxx&lt;/SPAN&gt; &amp;nbsp;&lt;SPAN class=""&gt;OU_kljdajdklsajkewew.zip&lt;/SPAN&gt; &lt;SPAN class=""&gt;07/09/2023&lt;/SPAN&gt; &lt;SPAN class=""&gt;13:26&lt;/SPAN&gt; &lt;SPAN class=""&gt;22&lt;/SPAN&gt; &lt;SPAN class=""&gt;xxx\xxx&lt;/SPAN&gt; &amp;nbsp;&lt;SPAN class=""&gt;OU_kljdajdklsajkewewdsads.zip&lt;/SPAN&gt; &lt;SPAN class=""&gt;6&lt;/SPAN&gt; &lt;SPAN class=""&gt;File&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;s&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN class=""&gt;332&lt;/SPAN&gt; &lt;SPAN class=""&gt;bytes&lt;/SPAN&gt; &lt;SPAN class=""&gt;2&lt;/SPAN&gt; &lt;SPAN class=""&gt;Dir&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;s&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN class=""&gt;20718067712&lt;/SPAN&gt; &lt;SPAN class=""&gt;bytes&lt;/SPAN&gt; &lt;SPAN class=""&gt;free&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="splunk.PNG" style="width: 882px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27177i6D492D21335C80C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="splunk.PNG" alt="splunk.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 18:03:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657579#M227127</guid>
      <dc:creator>danroberts</dc:creator>
      <dc:date>2023-09-15T18:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Extract file name from the below raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657583#M227128</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260574"&gt;@danroberts&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "(?&amp;lt;filename&amp;gt;OU_\w*\.\w*"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/UiiMSA/1" target="_blank"&gt;https://regex101.com/r/UiiMSA/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 11:31:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657583#M227128</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-14T11:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Extract file name from the below raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657584#M227129</link>
      <description>&lt;P&gt;Try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex max_match=0 "\s+\S+\s+\S+\s+\S+\s+\S+\s+(?&amp;lt;file&amp;gt;OU_\S+)"&lt;/LI-CODE&gt;&lt;P&gt;In future, please paste the text of your event into a code block &amp;lt;/&amp;gt; much like I have done with the SPL above. This prevents the text from being reformatted and losing spaces and new lines etc.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 11:32:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657584#M227129</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-09-14T11:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Extract file name from the below raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657599#M227131</link>
      <description>&lt;P&gt;Thanks for the reply, unfortunately this just pulls out one of the OU file names.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 12:30:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657599#M227131</guid>
      <dc:creator>danroberts</dc:creator>
      <dc:date>2023-09-14T12:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Extract file name from the below raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657600#M227132</link>
      <description>&lt;P&gt;Thanks for the rely, this has worked.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would this also work in a props.conf file ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm utilising a universal forwarder with a bat script to pull the data from the directory.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 12:31:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657600#M227132</guid>
      <dc:creator>danroberts</dc:creator>
      <dc:date>2023-09-14T12:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Extract file name from the below raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657601#M227133</link>
      <description>&lt;P&gt;This is what you asked for&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 12:32:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657601#M227133</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-09-14T12:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Extract file name from the below raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657610#M227140</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260574"&gt;@danroberts&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex max_match=0 "(?&amp;lt;filename&amp;gt;OU_\w*\.\w*"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 13:11:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657610#M227140</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-14T13:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Extract file name from the below raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657865#M227232</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260574"&gt;@danroberts&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 09:46:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-file-name-from-the-below-raw-data/m-p/657865#M227232</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-18T09:46:33Z</dc:date>
    </item>
  </channel>
</rss>

