<?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 Extraction picking the next match in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extraction-picking-the-next-match/m-p/572381#M199488</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to extract a field from the below event and the extraction is working fine on events that is coming with the value for the field. However, in the events that are coming in empty values it is picking the next matching value. How to fix it so it only picks the required value and ignore the empty field.&lt;/P&gt;&lt;P&gt;Expression used:&lt;/P&gt;&lt;P&gt;(?:[^,]+,){23}\"(?&amp;lt;occurance&amp;gt;\w+)\",.*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Below highlighted is the event that is extracting correct:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;50271232,00004102,00000000,1600,"20210901225500","20210901225500",4,-1,-1,"SYSTEM","","System",46769357,"System","Server-I \x83W\x83\x87\x83u\x83l\x83b\x83g(AJSROOT1:/\x90V\x8A_\x96{\x94ԏ\x88\x97\x9D/\x92l\x8ED\x94\xAD\x8Ds/04_\x92l\x8ED\x8Ew\x8E\xA6\x83f\x81[\x83^\x98A\x8Cg_\x8CߑO1TAX:@5V689)\x82\xF0\x8AJ\x8En\x82\xB5\x82܂\xB7","Information","admin","/App/Sys/AJS2","JOBNET","AJSROOT1:/\x90V\x8A_\x96{\x94ԏ\x88\x97\x9D/\x92l\x8ED\x94\xAD\x8Ds/04_\x92l\x8ED\x8Ew\x8E\xA6\x83f\x81[\x83^\x98A\x8Cg_\x8CߑO1TAX","JOBNET","AJSROOT1:/\x90V\x8A_\x96{\x94ԏ\x88\x97\x9D/\x92l\x8ED\x94\xAD\x8Ds/04_\x92l\x8ED\x8Ew\x8E\xA6\x83f\x81[\x83^\x98A\x8Cg_\x8CߑO1TAX","AJSROOT1:/\x90V\x8A_\x96{\x94ԏ\x88\x97\x9D/\x92l\x8ED\x94\xAD\x8Ds/04_\x92l\x8ED\x8Ew\x8E\xA6\x83f\x81[\x83^\x98A\x8Cg_\x8CߑO1TAX","&lt;U&gt;&lt;STRONG&gt;START&lt;/STRONG&gt;&lt;/U&gt;","20210901225500","","",11,"A0","AJSROOT1:/\x90V\x8A_\x96{\x94ԏ\x88\x97\x9D/\x92l\x8ED\x94\xAD\x8Ds","A1","04_\x92l\x8ED\x8Ew\x8E\xA6\x83f\x81[\x83^\x98A\x8Cg_\x8CߑO1TAX","A3"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The below event does not have the value in the field and the next matching field is picked from below.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;50266209,00000501,00000000,3476,"20210901220311","20210901220311",4,-1,-1,"SYSTEM","","psd005",142331,"MS932","OR01201S [psd005:HONDB1] YSN1 free 4.52% \x82\xAA\x82\xB5\x82\xAB\x82\xA2\x92l5%\x82\xF0\x89\xBA\x89\xF1\x82\xE8\x82܂\xB5\x82\xBD (Free size = 1466560KB) [Jp1 Notified]","Alert","","/insight/PI","","","","","","","","","",9,"&lt;STRONG&gt;&lt;STRIKE&gt;ACTION_VERSION&lt;/STRIKE&gt;&lt;/STRONG&gt;","510","OPT_CATEGORY","OS","OPT_PARM1","","OPT_PARM2","","OPT_PARM3","","OPT_PARM4","","OPT_SID","HONDB1","OPT_URL1","","OPT_URL2","",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help in this.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Oct 2021 06:58:42 GMT</pubDate>
    <dc:creator>srinivas_gowda</dc:creator>
    <dc:date>2021-10-26T06:58:42Z</dc:date>
    <item>
      <title>Extraction picking the next match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extraction-picking-the-next-match/m-p/572381#M199488</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to extract a field from the below event and the extraction is working fine on events that is coming with the value for the field. However, in the events that are coming in empty values it is picking the next matching value. How to fix it so it only picks the required value and ignore the empty field.&lt;/P&gt;&lt;P&gt;Expression used:&lt;/P&gt;&lt;P&gt;(?:[^,]+,){23}\"(?&amp;lt;occurance&amp;gt;\w+)\",.*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Below highlighted is the event that is extracting correct:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;50271232,00004102,00000000,1600,"20210901225500","20210901225500",4,-1,-1,"SYSTEM","","System",46769357,"System","Server-I \x83W\x83\x87\x83u\x83l\x83b\x83g(AJSROOT1:/\x90V\x8A_\x96{\x94ԏ\x88\x97\x9D/\x92l\x8ED\x94\xAD\x8Ds/04_\x92l\x8ED\x8Ew\x8E\xA6\x83f\x81[\x83^\x98A\x8Cg_\x8CߑO1TAX:@5V689)\x82\xF0\x8AJ\x8En\x82\xB5\x82܂\xB7","Information","admin","/App/Sys/AJS2","JOBNET","AJSROOT1:/\x90V\x8A_\x96{\x94ԏ\x88\x97\x9D/\x92l\x8ED\x94\xAD\x8Ds/04_\x92l\x8ED\x8Ew\x8E\xA6\x83f\x81[\x83^\x98A\x8Cg_\x8CߑO1TAX","JOBNET","AJSROOT1:/\x90V\x8A_\x96{\x94ԏ\x88\x97\x9D/\x92l\x8ED\x94\xAD\x8Ds/04_\x92l\x8ED\x8Ew\x8E\xA6\x83f\x81[\x83^\x98A\x8Cg_\x8CߑO1TAX","AJSROOT1:/\x90V\x8A_\x96{\x94ԏ\x88\x97\x9D/\x92l\x8ED\x94\xAD\x8Ds/04_\x92l\x8ED\x8Ew\x8E\xA6\x83f\x81[\x83^\x98A\x8Cg_\x8CߑO1TAX","&lt;U&gt;&lt;STRONG&gt;START&lt;/STRONG&gt;&lt;/U&gt;","20210901225500","","",11,"A0","AJSROOT1:/\x90V\x8A_\x96{\x94ԏ\x88\x97\x9D/\x92l\x8ED\x94\xAD\x8Ds","A1","04_\x92l\x8ED\x8Ew\x8E\xA6\x83f\x81[\x83^\x98A\x8Cg_\x8CߑO1TAX","A3"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The below event does not have the value in the field and the next matching field is picked from below.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;50266209,00000501,00000000,3476,"20210901220311","20210901220311",4,-1,-1,"SYSTEM","","psd005",142331,"MS932","OR01201S [psd005:HONDB1] YSN1 free 4.52% \x82\xAA\x82\xB5\x82\xAB\x82\xA2\x92l5%\x82\xF0\x89\xBA\x89\xF1\x82\xE8\x82܂\xB5\x82\xBD (Free size = 1466560KB) [Jp1 Notified]","Alert","","/insight/PI","","","","","","","","","",9,"&lt;STRONG&gt;&lt;STRIKE&gt;ACTION_VERSION&lt;/STRIKE&gt;&lt;/STRONG&gt;","510","OPT_CATEGORY","OS","OPT_PARM1","","OPT_PARM2","","OPT_PARM3","","OPT_PARM4","","OPT_SID","HONDB1","OPT_URL1","","OPT_URL2","",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help in this.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 06:58:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extraction-picking-the-next-match/m-p/572381#M199488</guid>
      <dc:creator>srinivas_gowda</dc:creator>
      <dc:date>2021-10-26T06:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Extraction picking the next match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extraction-picking-the-next-match/m-p/572384#M199490</link>
      <description>&lt;P&gt;You need to us * instead of + to get zero or more - + matches on one or more&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?:[^,]+,){23}\"(?&amp;lt;occurance&amp;gt;\w*)\",.*&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 26 Oct 2021 07:29:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extraction-picking-the-next-match/m-p/572384#M199490</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-10-26T07:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Extraction picking the next match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extraction-picking-the-next-match/m-p/572388#M199492</link>
      <description>&lt;P&gt;This worked perfect, however, when I try and use the same on the below it is working different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rex used:&amp;nbsp;(?:[^,]+,){14}\"(?&amp;lt;alert_description&amp;gt;[^,]*)\",.*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Correctly extracted event:&lt;/P&gt;&lt;P&gt;50271232,00004102,00000000,1600,"20210901225500","20210901225500",4,-1,-1,"SYSTEM","","psd217",46769357,"MS932","&lt;U&gt;&lt;STRONG&gt;KAVS0260-I \x83W\x83\x87\x83u\x83l\x83b\x83g(AJSROOT1:/\x90V\x8A_\x96{\x94ԏ\x88\x97\x9D/\x92l\x8ED\x94\xAD\x8Ds/04_\x92l\x8ED\x8Ew\x8E\xA6\x83f\x81[\x83^\x98A\x8Cg_\x8CߑO1TAX:@5V689)\x82\xF0\x8AJ\x8En\x82\xB5\x82܂\xB7&lt;/STRONG&gt;&lt;/U&gt;","Information","jp1admin"...........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Missing from below event and extracting wrong field:&lt;/P&gt;&lt;P&gt;50271234,00004105,00000000,1600,"20210901225500","20210901225500",4,-1,-1,"SYSTEM","","psd217",46769359,"MS932","KAVS0263-I \x83W\x83\x87\x83u(AJSROOT1:/\x90V\x8A_\x96{\x94ԏ\x88\x97\x9D/\x92l\x8ED\x94\xAD\x8Ds/04_\x92l\x8ED\x8Ew\x8E\xA6\x83f\x81[\x83^\x98A\x8Cg_\x8CߑO1TAX/V9B01_B:@5V689)\x82\xF0\x8AJ\x8En\x82\xB5\x82܂\xB7(host: UXC510, JOBID: 56620)","&lt;STRIKE&gt;&lt;STRONG&gt;Information&lt;/STRONG&gt;&lt;/STRIKE&gt;","jp1admin"........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did this affect in some way else?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 07:51:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extraction-picking-the-next-match/m-p/572388#M199492</guid>
      <dc:creator>srinivas_gowda</dc:creator>
      <dc:date>2021-10-26T07:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Extraction picking the next match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extraction-picking-the-next-match/m-p/572398#M199496</link>
      <description>&lt;P&gt;That's because you have an embedded , in the description.&amp;nbsp;&lt;SPAN class=""&gt;Try something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?:[^,]+,){14}\"(?&amp;lt;alert_description&amp;gt;[^\"]*)\",.*&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 26 Oct 2021 09:05:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extraction-picking-the-next-match/m-p/572398#M199496</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-10-26T09:05:19Z</dc:date>
    </item>
  </channel>
</rss>

