<?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 help to extract logname in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-to-extract-logname/m-p/625906#M217557</link>
    <description>&lt;LI-CODE lang="markup"&gt;| rex "(?&amp;lt;logname&amp;gt;\S+)\s+INFORMATION"&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 04 Jan 2023 22:05:55 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-01-04T22:05:55Z</dc:date>
    <item>
      <title>Regex help to extract logname</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-to-extract-logname/m-p/625897#M217551</link>
      <description>&lt;P&gt;I'm trying to extract logname from the following.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the logname value would be message.log/bblog.log/api.log&lt;/P&gt;&lt;P&gt;Please Note :&amp;nbsp; When the timestamp date is between10-31 there is no extra space where when the timestamp date is single digit i.e.,(1-9 ) there is an extra space at the beginning of the event.&lt;/P&gt;&lt;P&gt;ex: &amp;lt;10&amp;gt;Jan&amp;lt;space&amp;gt;&amp;lt;space&amp;gt;4 15:30:02&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;10&amp;gt;Dec&amp;lt;space&amp;gt;31 15:30:02&lt;/P&gt;&lt;P&gt;Here are the sample events&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;10&amp;gt;Jan&amp;nbsp; 4 15:30:02 a2222xyabcd031.xyz.com app1001-cc-NONPROD 2023-01-04 15:30:02 message.log INFORMATION&lt;BR /&gt;apple:73 dev-banana_Guava-[Messaging.Security] [sys] [THE Outbound | outbound|] claimEligibility=false&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;10&amp;gt;Jan&amp;nbsp; 4 15:30:02 ia2222xyabcd031.xyz.com app1001-cc-NONPROD 2023-01-04 15:30:02 bblog.log INFORMATION&lt;BR /&gt;apple:73 dev-banana_Guava-[Messaging.Security] [sys] [THE Outbound | outbound|] claimEligibility=false&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;10&amp;gt;Dec 31 15:30:04 a2222xyabcd031.xyz.com app1001-cc-NONPROD 2023-01-04 15:30:04 api.log INFORMATION&lt;BR /&gt;apple:73 dev-banana_Guava-[Messaging.Security] [sys] [THE Outbound | outbound|] claimEligibility=false&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 21:43:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-to-extract-logname/m-p/625897#M217551</guid>
      <dc:creator>iamsplunker</dc:creator>
      <dc:date>2023-01-04T21:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help to extract logname</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-to-extract-logname/m-p/625906#M217557</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex "(?&amp;lt;logname&amp;gt;\S+)\s+INFORMATION"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 04 Jan 2023 22:05:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-to-extract-logname/m-p/625906#M217557</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-01-04T22:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help to extract logname</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-to-extract-logname/m-p/625909#M217558</link>
      <description>&lt;P&gt;Try this regex.&amp;nbsp; Change the values of "WARNING" and "ERROR" to match your data.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; (\S+) (?:INFORMATION|WARNING|ERROR)&lt;/LI-CODE&gt;&lt;P&gt;Note the leading space.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 22:08:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-to-extract-logname/m-p/625909#M217558</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-01-04T22:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help to extract logname</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-to-extract-logname/m-p/625911#M217560</link>
      <description>&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;Quick question what if we have different string after the LogName&amp;nbsp;&lt;/P&gt;&lt;P&gt;For ex: ERROR or WARN&lt;/P&gt;&lt;P&gt;Can we use something like this&amp;nbsp; ?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "(?&amp;lt;logname&amp;gt;\S+)\s+INFORMATION|WARN|ERROR"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 22:22:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-to-extract-logname/m-p/625911#M217560</guid>
      <dc:creator>iamsplunker</dc:creator>
      <dc:date>2023-01-04T22:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help to extract logname</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-to-extract-logname/m-p/625912#M217561</link>
      <description>&lt;P&gt;I would try putting the alternate values in brackets&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "(?&amp;lt;logname&amp;gt;\S+)\s+(INFORMATION|WARN|ERROR)"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 04 Jan 2023 22:30:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-to-extract-logname/m-p/625912#M217561</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-01-04T22:30:34Z</dc:date>
    </item>
  </channel>
</rss>

