<?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 Field extraction for multiple types of values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-multiple-types-of-values/m-p/541709#M153375</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am trying to extract the data from the field &lt;U&gt;&lt;STRONG&gt;evtComponent&lt;/STRONG&gt;&lt;/U&gt; from the below event, and this has a multiple types of data that is coming in as below.&lt;/P&gt;&lt;P&gt;1)&amp;nbsp;ZENOSS-MIB::evtComponent = STRING: "&lt;U&gt;&lt;STRONG&gt;HostSystem_host-1240&lt;/STRONG&gt;&lt;/U&gt;" ZENOSS-MIB::evtClass = STRING: "/Status/Ping"&lt;/P&gt;&lt;P&gt;2)&amp;nbsp;ZENOSS-MIB::evtComponent = STRING: "\"&lt;U&gt;&lt;STRONG&gt;London&lt;/STRONG&gt;&lt;/U&gt;\"" ZENOSS-MIB::evtClass = STRING:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The highlighted fields needs to be extracted, however when I use the below extraction this only satisfies the correct extraction on example 1 but fails to just extract the field from example 2. Can you please suggest.&lt;/P&gt;&lt;P&gt;Below is the extraction that I am using.&lt;/P&gt;&lt;P&gt;ZENOSS-MIB::evtComponent = STRING: \"(?&amp;lt;component&amp;gt;.*)\"\s+ZENOSS-MIB::evtClass\s&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Mar 2021 07:12:19 GMT</pubDate>
    <dc:creator>srinivasgowda</dc:creator>
    <dc:date>2021-03-01T07:12:19Z</dc:date>
    <item>
      <title>Field extraction for multiple types of values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-multiple-types-of-values/m-p/541709#M153375</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am trying to extract the data from the field &lt;U&gt;&lt;STRONG&gt;evtComponent&lt;/STRONG&gt;&lt;/U&gt; from the below event, and this has a multiple types of data that is coming in as below.&lt;/P&gt;&lt;P&gt;1)&amp;nbsp;ZENOSS-MIB::evtComponent = STRING: "&lt;U&gt;&lt;STRONG&gt;HostSystem_host-1240&lt;/STRONG&gt;&lt;/U&gt;" ZENOSS-MIB::evtClass = STRING: "/Status/Ping"&lt;/P&gt;&lt;P&gt;2)&amp;nbsp;ZENOSS-MIB::evtComponent = STRING: "\"&lt;U&gt;&lt;STRONG&gt;London&lt;/STRONG&gt;&lt;/U&gt;\"" ZENOSS-MIB::evtClass = STRING:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The highlighted fields needs to be extracted, however when I use the below extraction this only satisfies the correct extraction on example 1 but fails to just extract the field from example 2. Can you please suggest.&lt;/P&gt;&lt;P&gt;Below is the extraction that I am using.&lt;/P&gt;&lt;P&gt;ZENOSS-MIB::evtComponent = STRING: \"(?&amp;lt;component&amp;gt;.*)\"\s+ZENOSS-MIB::evtClass\s&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 07:12:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-multiple-types-of-values/m-p/541709#M153375</guid>
      <dc:creator>srinivasgowda</dc:creator>
      <dc:date>2021-03-01T07:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction for multiple types of values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-multiple-types-of-values/m-p/541710#M153376</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231485"&gt;@srinivasgowda&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you should try to use two regexes:&lt;/P&gt;&lt;P&gt;the first&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "evtComponent\s+\=\s+STRING:\s+\"(?&amp;lt;evtComponent&amp;gt;[^\"]+)\"\s+"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/Ip8Vj2/1" target="_blank"&gt;https://regex101.com/r/Ip8Vj2/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;the second&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "evtComponent\s+\=\s+STRING:\s+\"\\\"(?&amp;lt;evtComponent&amp;gt;[^\\]+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/Ip8Vj2/2" target="_blank"&gt;https://regex101.com/r/Ip8Vj2/2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 07:34:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-multiple-types-of-values/m-p/541710#M153376</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-03-01T07:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction for multiple types of values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-multiple-types-of-values/m-p/542478#M153666</link>
      <description>&lt;P&gt;This worked. Thank you&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 07:49:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-multiple-types-of-values/m-p/542478#M153666</guid>
      <dc:creator>srinivasgowda</dc:creator>
      <dc:date>2021-03-05T07:49:13Z</dc:date>
    </item>
  </channel>
</rss>

