<?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 Help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/156085#M43917</link>
    <description>&lt;P&gt;I am struggling with the regex match on the below pattern. I need to capture &lt;CODE&gt;etl_fdaf_33424134&lt;/CODE&gt; . Pretty much after the first _ . Any help? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/tmp/Jams/Apps/fgff_etl_fdaf_33424134.log 
/tmp/Jams/Apps/abc_etl_xyz_1111111.log 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 24 Jul 2014 13:23:44 GMT</pubDate>
    <dc:creator>theouhuios</dc:creator>
    <dc:date>2014-07-24T13:23:44Z</dc:date>
    <item>
      <title>Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/156085#M43917</link>
      <description>&lt;P&gt;I am struggling with the regex match on the below pattern. I need to capture &lt;CODE&gt;etl_fdaf_33424134&lt;/CODE&gt; . Pretty much after the first _ . Any help? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/tmp/Jams/Apps/fgff_etl_fdaf_33424134.log 
/tmp/Jams/Apps/abc_etl_xyz_1111111.log 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Jul 2014 13:23:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/156085#M43917</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2014-07-24T13:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/156086#M43918</link>
      <description>&lt;P&gt;I am not able to make the regex stop at the first _ . Its always looking till the last one. Is there a way to force it match just on the first _&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2014 13:24:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/156086#M43918</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2014-07-24T13:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/156087#M43919</link>
      <description>&lt;P&gt;This should do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_(?&amp;lt;fieldname&amp;gt;.*?)\.log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've assumed you don't want the .log captured based on your example.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2014 13:28:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/156087#M43919</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-24T13:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/156088#M43920</link>
      <description>&lt;P&gt;That works. I wonder why I was trying to make it work from Apps/ . This is simple to write and understand. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2014 14:28:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/156088#M43920</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2014-07-24T14:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/156089#M43921</link>
      <description>&lt;P&gt;That's possible as well, just make sure to be precise in what you match afterwards:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Apps/[^_]+_(?&amp;lt;fieldname&amp;gt;.*?)\.log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternatively, use non-greedy quantifiers:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Apps/.+?_(?&amp;lt;fieldname&amp;gt;.*?)\.log
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Jul 2014 15:16:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/156089#M43921</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-24T15:16:53Z</dc:date>
    </item>
  </channel>
</rss>

