<?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: Rex query for two different type event in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Rex-query-for-two-different-type-event/m-p/676419#M231348</link>
    <description>&lt;P&gt;I'm surprise this regex worked at all since the expression looks for tabs to separate the fields while the same data uses commas.&lt;/P&gt;&lt;P&gt;That aside, would believe a single character makes the difference?&amp;nbsp; See if you can find it below.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;^(?P&amp;lt;ACD&amp;gt;\w+\.\d+),(?P&amp;lt;ATTEMPTS&amp;gt;[^,]+),(?P&amp;lt;FAIL_REASON&amp;gt;[^,]*),(?P&amp;lt;INTERVAL_FILE&amp;gt;[^,]+),(?P&amp;lt;STATUS&amp;gt;\w+),(?P&amp;lt;START&amp;gt;[^,]+),(?P&amp;lt;FINISH&amp;gt;[^,]+),(?P&amp;lt;INGEST_TIME&amp;gt;.+)&lt;/LI-CODE&gt;&lt;P&gt;It's the asterisk in the FAIL_REASON group, which allows for zero characters in the field.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Feb 2024 18:11:53 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2024-02-02T18:11:53Z</dc:date>
    <item>
      <title>Rex query for two different type event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-query-for-two-different-type-event/m-p/676417#M231347</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need help on getting rex query. I am getting below two events. I am able to rex for event 1 with NULL field. But I also need to capture the sample event 2 which does not have NULL value. Instead of NULL it just have ",," (no NULL values just two single quotes.). Need the rex command to capture the field in both the case. If event has NULL then need the NULL field and if just two single quote need blank value.&lt;/P&gt;&lt;P&gt;sample event1:&lt;/P&gt;&lt;P&gt;acd.55,1,NULL,C:\totalview\ftp\switches\customer1\55\020224.1100,PASS,2024-02-02 17:32:30.047 +00:00,2024-02-02 17:36:02.088 +00:00,212&lt;/P&gt;&lt;P&gt;Sample event 2:&lt;/P&gt;&lt;P&gt;acd.85,1,,C:\totalview\ftp\switches\customer1\85\020224.1100,PASS,2024-02-02 17:31:30.032 +00:00,2024-02-02 17:32:00.226 +00:00,30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Created the below rex query which is working for event 1. But not recognizing if getting event 2 some time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;^(?P&amp;lt;ACD&amp;gt;\w+\.\d+)\t(?P&amp;lt;ATTEMPTS&amp;gt;[^\t]+)\t(?P&amp;lt;FAIL_REASON&amp;gt;[^\t]+)\t(?P&amp;lt;INTERVAL_FILE&amp;gt;[^\t]+)\t(?P&amp;lt;STATUS&amp;gt;\w+)\t(?P&amp;lt;START&amp;gt;[^\t]+)\t(?P&amp;lt;FINISH&amp;gt;[^\t]+)\t(?P&amp;lt;INGEST_TIME&amp;gt;.+)&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 18:02:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-query-for-two-different-type-event/m-p/676417#M231347</guid>
      <dc:creator>ravir_jbp</dc:creator>
      <dc:date>2024-02-02T18:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Rex query for two different type event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-query-for-two-different-type-event/m-p/676419#M231348</link>
      <description>&lt;P&gt;I'm surprise this regex worked at all since the expression looks for tabs to separate the fields while the same data uses commas.&lt;/P&gt;&lt;P&gt;That aside, would believe a single character makes the difference?&amp;nbsp; See if you can find it below.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;^(?P&amp;lt;ACD&amp;gt;\w+\.\d+),(?P&amp;lt;ATTEMPTS&amp;gt;[^,]+),(?P&amp;lt;FAIL_REASON&amp;gt;[^,]*),(?P&amp;lt;INTERVAL_FILE&amp;gt;[^,]+),(?P&amp;lt;STATUS&amp;gt;\w+),(?P&amp;lt;START&amp;gt;[^,]+),(?P&amp;lt;FINISH&amp;gt;[^,]+),(?P&amp;lt;INGEST_TIME&amp;gt;.+)&lt;/LI-CODE&gt;&lt;P&gt;It's the asterisk in the FAIL_REASON group, which allows for zero characters in the field.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 18:11:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-query-for-two-different-type-event/m-p/676419#M231348</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-02-02T18:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Rex query for two different type event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-query-for-two-different-type-event/m-p/676420#M231349</link>
      <description>&lt;P&gt;If you actually have tabs separating your fields (instead of commas), the issue is that you have used + (at least 1 occurrence) rather than * (zero or more occurrences)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;^(?P&amp;lt;ACD&amp;gt;\w+\.\d+)\t(?P&amp;lt;ATTEMPTS&amp;gt;[^\t]+)\t(?P&amp;lt;FAIL_REASON&amp;gt;[^\t]*)\t(?P&amp;lt;INTERVAL_FILE&amp;gt;[^\t]+)\t(?P&amp;lt;STATUS&amp;gt;\w+)\t(?P&amp;lt;START&amp;gt;[^\t]+)\t(?P&amp;lt;FINISH&amp;gt;[^\t]+)\t(?P&amp;lt;INGEST_TIME&amp;gt;.+)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 02 Feb 2024 18:18:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-query-for-two-different-type-event/m-p/676420#M231349</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-02T18:18:53Z</dc:date>
    </item>
  </channel>
</rss>

