<?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 Split and display in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Split-and-display/m-p/519842#M146398</link>
    <description>&lt;P&gt;My requirement is to display just domain (eg Corp)&lt;/P&gt;&lt;P&gt;From below Computername&lt;/P&gt;&lt;P&gt;Computername - &amp;lt;host&amp;gt;. Corp. &amp;lt;Domain&amp;gt;. Com&lt;/P&gt;</description>
    <pubDate>Wed, 16 Sep 2020 07:27:30 GMT</pubDate>
    <dc:creator>priya0709</dc:creator>
    <dc:date>2020-09-16T07:27:30Z</dc:date>
    <item>
      <title>Split and display</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-and-display/m-p/519842#M146398</link>
      <description>&lt;P&gt;My requirement is to display just domain (eg Corp)&lt;/P&gt;&lt;P&gt;From below Computername&lt;/P&gt;&lt;P&gt;Computername - &amp;lt;host&amp;gt;. Corp. &amp;lt;Domain&amp;gt;. Com&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 07:27:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-and-display/m-p/519842#M146398</guid>
      <dc:creator>priya0709</dc:creator>
      <dc:date>2020-09-16T07:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Split and display</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-and-display/m-p/519844#M146399</link>
      <description>&lt;P&gt;You can use either split or rex&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=Computername "[^\.]*\.(?&amp;lt;Corp&amp;gt;[^\.]*)"

OR 

| eval Corp=mvindex(split(Computername,"."),1,1)&lt;/LI-CODE&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 07:43:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-and-display/m-p/519844#M146399</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-09-16T07:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Split and display</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-and-display/m-p/519845#M146400</link>
      <description>&lt;P&gt;It isn't clear if "Computername" is part of the field you are trying to extract from or the name of the field. If it is part of the field (assuming _raw)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "Computername - \w+\.(?&amp;lt;Corp&amp;gt;[^\.]+)\.Com"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;If it is the field name&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=Computername "^\w+\.(?&amp;lt;Corp&amp;gt;[^\.]+)\.Com"&lt;/LI-CODE&gt;&lt;P&gt;This assume &amp;lt;host&amp;gt; is at the beginning of Computername. If not, just remove the ^ from the beginning&lt;/P&gt;&lt;P&gt;Both of these assume that there are only two dots in the computername&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 07:46:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-and-display/m-p/519845#M146400</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-16T07:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Split and display</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-and-display/m-p/519860#M146403</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Thanks for your reply&lt;/P&gt;&lt;P&gt;Computername is from raw dat&lt;/P&gt;&lt;P&gt;But actual field is 'Hostdomain' under which I want to display 'corp' from computername&lt;/P&gt;&lt;P&gt;Computername format - -&lt;/P&gt;&lt;P&gt;&amp;lt;HOST&amp;gt;. Corp. &amp;lt;domain&amp;gt;. com&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 08:58:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-and-display/m-p/519860#M146403</guid>
      <dc:creator>priya0709</dc:creator>
      <dc:date>2020-09-16T08:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Split and display</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-and-display/m-p/519861#M146404</link>
      <description>&lt;P&gt;In that case&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=Hostdomain "^[^\.]+\.(?&amp;lt;Corp&amp;gt;[^\.]+)"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 16 Sep 2020 09:05:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-and-display/m-p/519861#M146404</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-16T09:05:48Z</dc:date>
    </item>
  </channel>
</rss>

