<?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 REGEX pattern to extract the hostname in transforms.conf in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/REGEX-pattern-to-extract-the-hostname-in-transforms-conf/m-p/167851#M47805</link>
    <description>&lt;P&gt;Please provide the REGEX pattern to extract from host and assign the value to index name, In the below example, we need to extract the value ABC and assign this to Index..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[generic_idx_routing]
SOURCE_KEY = MetaData:Host
REGEX = (ABC)\\.zxy\\.1a1\\.com
DEST_KEY = _MetaData:Index
FORMAT = $1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 01 Aug 2014 19:58:02 GMT</pubDate>
    <dc:creator>dhavamanis</dc:creator>
    <dc:date>2014-08-01T19:58:02Z</dc:date>
    <item>
      <title>REGEX pattern to extract the hostname in transforms.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-pattern-to-extract-the-hostname-in-transforms-conf/m-p/167851#M47805</link>
      <description>&lt;P&gt;Please provide the REGEX pattern to extract from host and assign the value to index name, In the below example, we need to extract the value ABC and assign this to Index..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[generic_idx_routing]
SOURCE_KEY = MetaData:Host
REGEX = (ABC)\\.zxy\\.1a1\\.com
DEST_KEY = _MetaData:Index
FORMAT = $1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Aug 2014 19:58:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-pattern-to-extract-the-hostname-in-transforms-conf/m-p/167851#M47805</guid>
      <dc:creator>dhavamanis</dc:creator>
      <dc:date>2014-08-01T19:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX pattern to extract the hostname in transforms.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-pattern-to-extract-the-hostname-in-transforms-conf/m-p/167852#M47806</link>
      <description>&lt;P&gt;Have a look at the similar question.&lt;BR /&gt;
&lt;A href="http://answers.splunk.com/answers/1026/route-data-to-index-based-on-host"&gt;http://answers.splunk.com/answers/1026/route-data-to-index-based-on-host&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2014 20:16:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-pattern-to-extract-the-hostname-in-transforms-conf/m-p/167852#M47806</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-01T20:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX pattern to extract the hostname in transforms.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-pattern-to-extract-the-hostname-in-transforms-conf/m-p/167853#M47807</link>
      <description>&lt;P&gt;Are you trying to extract the first part of an hostname ?&lt;/P&gt;

&lt;P&gt;host.domain.com -&amp;gt; host&lt;BR /&gt;
host.subdomain.domain.com -&amp;gt; host&lt;BR /&gt;
host -&amp;gt; host&lt;BR /&gt;
host.com -&amp;gt; host&lt;BR /&gt;
192.168.5.2 -&amp;gt; 192&lt;/P&gt;

&lt;P&gt;please try&lt;BR /&gt;
&lt;CODE&gt;REGEX= ^([^\.]*)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2014 20:29:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-pattern-to-extract-the-hostname-in-transforms-conf/m-p/167853#M47807</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-08-01T20:29:35Z</dc:date>
    </item>
  </channel>
</rss>

