<?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 question in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27926#M5472</link>
    <description>&lt;P&gt;sourcetype="EPPWEB" source="/opt/log/*/web_server/info.log" WAT | rex field=_raw "USER (?P&lt;REGISTRAR&gt;[\d+-\w\w]) downloading /[^/]+/[^/]+/(?P&lt;FILENAME&gt;w+.w+).$" doesn't work.  Even taking away the $ doesn't work either.  &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/FILENAME&gt;&lt;/REGISTRAR&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 12:12:38 GMT</pubDate>
    <dc:creator>gnovak</dc:creator>
    <dc:date>2020-09-28T12:12:38Z</dc:date>
    <item>
      <title>Regex question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27922#M5468</link>
      <description>&lt;P&gt;I can't seem to figure this one out.  I have a line in a log like this:&lt;/P&gt;

&lt;P&gt;2012-08-07 12:35:49,138 [http-10.40.231.33-40081-11] INFO info.mycompany.WAT.report.ReportService - USER [6913-ZZ] downloading /billing/2012/May/Statement.pdf&lt;/P&gt;

&lt;P&gt;And here is my splunk search with regex:&lt;/P&gt;

&lt;P&gt;sourcetype="EPPWEB" source="/opt/log/&lt;EM&gt;/web_server/info.log" WAT | rex field=_raw "USER (?P&lt;REGISTRAR&gt;[\d+-\w\w]) downloading /[^/]+/[^/]+/(?P&lt;FILENAME&gt;\w&lt;/FILENAME&gt;&lt;/REGISTRAR&gt;&lt;/EM&gt;.\w+)+$"&lt;/P&gt;

&lt;P&gt;For the field "filename" i have results like ".pdf" or ".txt".  I'd like to get the entire file name ....Statement.pdf&lt;/P&gt;

&lt;P&gt;What am I missing or not missing?  &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:12:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27922#M5468</guid>
      <dc:creator>gnovak</dc:creator>
      <dc:date>2020-09-28T12:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Regex question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27923#M5469</link>
      <description>&lt;P&gt;Maybe (?P&lt;FILENAME&gt;w+\.w+).  Escape the period just to make sure.&lt;/FILENAME&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Aug 2012 15:03:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27923#M5469</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-08-07T15:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Regex question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27924#M5470</link>
      <description>&lt;P&gt;Try making the end look like this:&lt;BR /&gt;
downloading /[^/]+/[^/]+/(?P&lt;FILENAME&gt;[\w.])$"&lt;/FILENAME&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Aug 2012 15:07:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27924#M5470</guid>
      <dc:creator>christopher_hod</dc:creator>
      <dc:date>2012-08-07T15:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Regex question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27925#M5471</link>
      <description>&lt;P&gt;When I take the ending + away the field "filename" isn't extracted any more.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Aug 2012 15:08:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27925#M5471</guid>
      <dc:creator>gnovak</dc:creator>
      <dc:date>2012-08-07T15:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Regex question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27926#M5472</link>
      <description>&lt;P&gt;sourcetype="EPPWEB" source="/opt/log/*/web_server/info.log" WAT | rex field=_raw "USER (?P&lt;REGISTRAR&gt;[\d+-\w\w]) downloading /[^/]+/[^/]+/(?P&lt;FILENAME&gt;w+.w+).$" doesn't work.  Even taking away the $ doesn't work either.  &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/FILENAME&gt;&lt;/REGISTRAR&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:12:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27926#M5472</guid>
      <dc:creator>gnovak</dc:creator>
      <dc:date>2020-09-28T12:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Regex question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27927#M5473</link>
      <description>&lt;P&gt;rex field=_raw "USER.*/(?&lt;FILENAME&gt;.+?)$"&lt;/FILENAME&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Aug 2012 15:20:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27927#M5473</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2012-08-07T15:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Regex question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27928#M5474</link>
      <description>&lt;P&gt;This actually worked.  I took some of your example and added it.  sourcetype="EPPWEB" source="/opt/log/&lt;EM&gt;/web_server/info.log" WAT | rex field=_raw "USER (?P&lt;REGISTRAR&gt;[\d+-\w\w]).&lt;/REGISTRAR&gt;&lt;/EM&gt;/(?&lt;FILENAME&gt;.+?)$"&lt;/FILENAME&gt;&lt;/P&gt;

&lt;P&gt;Thanks for the help&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27928#M5474</guid>
      <dc:creator>gnovak</dc:creator>
      <dc:date>2020-09-28T12:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Regex question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27929#M5475</link>
      <description>&lt;P&gt;Awesomeness!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Aug 2012 15:36:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-question/m-p/27929#M5475</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2012-08-07T15:36:34Z</dc:date>
    </item>
  </channel>
</rss>

