<?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 Need help in extracting different format of fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-help-in-extracting-different-format-of-fields/m-p/570168#M198723</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am extracting a field which is coming in multiple formats, however I found that once of the format is not working as expected. Details below. Please help me in extracting all of these formats without affecting others.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example 1:(highlighted is the field I am trying to extract)&lt;/P&gt;&lt;P&gt;APPLICATION-MIB::evtDevice = STRING: "&lt;U&gt;&lt;STRONG&gt;Server2&lt;/STRONG&gt;&lt;/U&gt;.Application.APP.INTRANET" APPLICATION-MIB::evtComponent =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example 2:(highlighted is the field I am trying to extract)&lt;/P&gt;&lt;P&gt;APPLICATION-MIB::evtDevice = STRING: "&lt;U&gt;&lt;STRONG&gt;Server1&lt;/STRONG&gt;&lt;/U&gt;" APPLICATION-MIB::evtComponent =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example 3:(highlighted is the field I am trying to extract)&lt;/P&gt;&lt;P&gt;APPLICATION-MIB::evtDevice = STRING: "&lt;STRONG&gt;&lt;U&gt;SG2-SWMGMT&lt;/U&gt;-CAT-001&lt;/STRONG&gt;" APPLICATION-MIB::evtComponent =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regex used :&amp;nbsp;&lt;STRONG&gt;APPLICATION-MIB::evtDevice\s+=\sSTRING:\s\"(?&amp;lt;source_host&amp;gt;\w+[a-zA-Z0-9-_]\w+)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The above regex is working for both example 1 and 2. However, for example 3 this is working only for the underlined fields and not everything highlighted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help in getting this worked.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Oct 2021 07:18:47 GMT</pubDate>
    <dc:creator>srinivas_gowda</dc:creator>
    <dc:date>2021-10-08T07:18:47Z</dc:date>
    <item>
      <title>Need help in extracting different format of fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-in-extracting-different-format-of-fields/m-p/570168#M198723</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am extracting a field which is coming in multiple formats, however I found that once of the format is not working as expected. Details below. Please help me in extracting all of these formats without affecting others.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example 1:(highlighted is the field I am trying to extract)&lt;/P&gt;&lt;P&gt;APPLICATION-MIB::evtDevice = STRING: "&lt;U&gt;&lt;STRONG&gt;Server2&lt;/STRONG&gt;&lt;/U&gt;.Application.APP.INTRANET" APPLICATION-MIB::evtComponent =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example 2:(highlighted is the field I am trying to extract)&lt;/P&gt;&lt;P&gt;APPLICATION-MIB::evtDevice = STRING: "&lt;U&gt;&lt;STRONG&gt;Server1&lt;/STRONG&gt;&lt;/U&gt;" APPLICATION-MIB::evtComponent =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example 3:(highlighted is the field I am trying to extract)&lt;/P&gt;&lt;P&gt;APPLICATION-MIB::evtDevice = STRING: "&lt;STRONG&gt;&lt;U&gt;SG2-SWMGMT&lt;/U&gt;-CAT-001&lt;/STRONG&gt;" APPLICATION-MIB::evtComponent =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regex used :&amp;nbsp;&lt;STRONG&gt;APPLICATION-MIB::evtDevice\s+=\sSTRING:\s\"(?&amp;lt;source_host&amp;gt;\w+[a-zA-Z0-9-_]\w+)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The above regex is working for both example 1 and 2. However, for example 3 this is working only for the underlined fields and not everything highlighted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help in getting this worked.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 07:18:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-in-extracting-different-format-of-fields/m-p/570168#M198723</guid>
      <dc:creator>srinivas_gowda</dc:creator>
      <dc:date>2021-10-08T07:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in extracting different format of fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-in-extracting-different-format-of-fields/m-p/570174#M198728</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/30894"&gt;@srinivas_gowda&lt;/a&gt;&amp;nbsp;, I would simply replace your regex with this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;APPLICATION-MIB::evtDevice\s+=\sSTRING:\s\"(?&amp;lt;source_host&amp;gt;[\w\-]+)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 07:50:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-in-extracting-different-format-of-fields/m-p/570174#M198728</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2021-10-08T07:50:37Z</dc:date>
    </item>
  </channel>
</rss>

