<?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 Parse Email Subject and populate fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Parse-Email-Subject-and-populate-fields/m-p/549384#M155878</link>
    <description>&lt;P&gt;Hi Splunkers!&lt;/P&gt;&lt;P&gt;Im running a very simple query to get the subject of all the emails we are getting. Something like this:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;index=o365_email_data&lt;BR /&gt;|table Subject&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Results look like this:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;&lt;STRONG&gt;Subject&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;&lt;SPAN&gt;Ticket ID: INC3333333 - Prio: 1 - High- "Description of the Incident" - has been updated&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;&lt;SPAN&gt;Ticket ID: INC1111111 - Prio: 4 - Low- "Description of the Incident" - has been resolved&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;&lt;SPAN&gt;Ticket ID: INC2222222 - Prio: 3 - Normal - "Description of the Incident" - has been created&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;What I would like to accomplish is to be able to parse certain parts of that Subject and fill a table like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="64%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;Ticket&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;Priority&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;Status&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;INC3333333 &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;High&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;Description of the Incident&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;updated&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;INC1111111 &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;Low&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;Description of the Incident&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;resolved&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;INC2222222 &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;Normal&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;Description of the Incident&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;created&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This resembles a lot like the "Text to Column" function in Excel. Im completely lost on how I can achieve this.&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 26 Apr 2021 23:05:55 GMT</pubDate>
    <dc:creator>jc_najera15</dc:creator>
    <dc:date>2021-04-26T23:05:55Z</dc:date>
    <item>
      <title>Parse Email Subject and populate fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parse-Email-Subject-and-populate-fields/m-p/549384#M155878</link>
      <description>&lt;P&gt;Hi Splunkers!&lt;/P&gt;&lt;P&gt;Im running a very simple query to get the subject of all the emails we are getting. Something like this:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;index=o365_email_data&lt;BR /&gt;|table Subject&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Results look like this:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;&lt;STRONG&gt;Subject&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;&lt;SPAN&gt;Ticket ID: INC3333333 - Prio: 1 - High- "Description of the Incident" - has been updated&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;&lt;SPAN&gt;Ticket ID: INC1111111 - Prio: 4 - Low- "Description of the Incident" - has been resolved&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;&lt;SPAN&gt;Ticket ID: INC2222222 - Prio: 3 - Normal - "Description of the Incident" - has been created&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;What I would like to accomplish is to be able to parse certain parts of that Subject and fill a table like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="64%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;Ticket&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;Priority&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;Status&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;INC3333333 &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;High&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;Description of the Incident&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;updated&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;INC1111111 &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;Low&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;Description of the Incident&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;resolved&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;INC2222222 &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;Normal&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;SPAN&gt;Description of the Incident&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;created&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This resembles a lot like the "Text to Column" function in Excel. Im completely lost on how I can achieve this.&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 23:05:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parse-Email-Subject-and-populate-fields/m-p/549384#M155878</guid>
      <dc:creator>jc_najera15</dc:creator>
      <dc:date>2021-04-26T23:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Parse Email Subject and populate fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parse-Email-Subject-and-populate-fields/m-p/549396#M155879</link>
      <description>&lt;P&gt;The rex command is your friend to do this in search:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-04-26 at 6.37.56 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13922i67FF6E4AC6E603A0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2021-04-26 at 6.37.56 PM.png" alt="Screen Shot 2021-04-26 at 6.37.56 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is the run anywhere search for the sample event above:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|  makeresults 
|  eval subject="Ticket ID: INC3333333 - Prio: 1 - High- Description of the Incident - has been updated" 
| rex field=subject "Ticket ID:\s(?&amp;lt;Ticket&amp;gt;\w+) - Prio: \d - (?&amp;lt;Priority&amp;gt;\w+)-\s(?&amp;lt;Description&amp;gt;[\w\s]+)- has been (?&amp;lt;Status&amp;gt;\w+)" 
|  table Ticket, Priority, Description, Status&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also add these field extractions to your sourcetype, so the fields get parsed out automatically whenever you search.&amp;nbsp;&lt;/P&gt;&lt;P&gt;HTH, Happy Splunking!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 01:41:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parse-Email-Subject-and-populate-fields/m-p/549396#M155879</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2021-04-27T01:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Parse Email Subject and populate fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parse-Email-Subject-and-populate-fields/m-p/549472#M155908</link>
      <description>&lt;P&gt;I just had an AHA moment, thanks so much for showing me how to do this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 14:36:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parse-Email-Subject-and-populate-fields/m-p/549472#M155908</guid>
      <dc:creator>jc_najera15</dc:creator>
      <dc:date>2021-04-27T14:36:36Z</dc:date>
    </item>
  </channel>
</rss>

