<?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: Splunk split events to extract text in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-split-events-to-extract-text/m-p/540818#M153064</link>
    <description>&lt;P&gt;Use a negative index&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval temp=split(_raw, "Exception:") 
| eval temp1 = mvindex(temp,-1) 
| eval temp2=split(temp1,", Job") 
| eval EXCEPTION=mvindex(temp2,0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Feb 2021 12:24:07 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-02-22T12:24:07Z</dc:date>
    <item>
      <title>Splunk split events to extract text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-split-events-to-extract-text/m-p/540804#M153055</link>
      <description>&lt;P&gt;I have multiple events in Splunk like below :&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;Exception:100 : *** Error 3006 Logons are disabled., Job=ABC&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#333399"&gt;Exception:XYZ API has failed. Exception: RDBMS error 2801: Duplicate unique prime key error, Job=ABC&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#333399"&gt;Exception:100 : RDBMS error 2640: Specified table either does not exist in DEX or is moved to another map., Job=ABC&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I am looking for the text between "&lt;FONT color="#333399"&gt;Exception:" and ", Job"&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;Output desired :&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;*** Error 3006 Logons are disabled.&lt;BR /&gt;RDBMS error 2801: Duplicate unique prime key error&lt;BR /&gt;RDBMS error 2640: Specified table either does not exist in DEX or is moved to another map.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333333"&gt;I was trying split like below, however in some events , "Exception:" appears twice.&amp;nbsp;&amp;nbsp;Hence second case above , gives me&amp;nbsp;XYZ API has failed :&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;eval temp=split(_raw, "Exception:") | eval temp1 = mvindex(temp,1) | eval temp2=split(temp1,"), Job") | eval EXCEPTION=mvindex(temp2,0)&lt;/P&gt;&lt;P&gt;Is there any way to split based on second or last occurrence of&amp;nbsp;&lt;FONT color="#333333"&gt;Exception in the event ?&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333333"&gt;Thank you for any suggestion/help.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 09:49:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-split-events-to-extract-text/m-p/540804#M153055</guid>
      <dc:creator>ppatkar</dc:creator>
      <dc:date>2021-02-22T09:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk split events to extract text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-split-events-to-extract-text/m-p/540808#M153059</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/176812"&gt;@ppatkar&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this regex:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "(Exception:)(?!.*\1)(?&amp;lt;exception&amp;gt;[^,]+),\s+"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/5hGUXo/1" target="_blank"&gt;https://regex101.com/r/5hGUXo/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 10:34:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-split-events-to-extract-text/m-p/540808#M153059</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-02-22T10:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk split events to extract text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-split-events-to-extract-text/m-p/540818#M153064</link>
      <description>&lt;P&gt;Use a negative index&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval temp=split(_raw, "Exception:") 
| eval temp1 = mvindex(temp,-1) 
| eval temp2=split(temp1,", Job") 
| eval EXCEPTION=mvindex(temp2,0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 12:24:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-split-events-to-extract-text/m-p/540818#M153064</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-02-22T12:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk split events to extract text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-split-events-to-extract-text/m-p/540826#M153068</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp; . It works in general , however it breaks when my&amp;nbsp;&lt;SPAN&gt;Exception has "," in it . &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ex :&amp;nbsp;&lt;FONT color="#333399"&gt;Exception:XYZ API has failed. Exception: ApiError(ERR361, No bucket found), Job=ABC&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Output desired in this case :&amp;nbsp;&lt;FONT color="#008000"&gt;Exception: ApiError(ERR361, No bucket found)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 12:11:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-split-events-to-extract-text/m-p/540826#M153068</guid>
      <dc:creator>ppatkar</dc:creator>
      <dc:date>2021-02-22T12:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk split events to extract text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-split-events-to-extract-text/m-p/540835#M153072</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/176812"&gt;@ppatkar&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please, try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "(Exception:)(?!.*\1)(?&amp;lt;exception&amp;gt;.+),\s+Job"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/5hGUXo/2" target="_blank" rel="noopener"&gt;https://regex101.com/r/5hGUXo/2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 12:58:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-split-events-to-extract-text/m-p/540835#M153072</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-02-22T12:58:11Z</dc:date>
    </item>
  </channel>
</rss>

