<?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 Re: extract field from MetaData:Source in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/extract-field-from-MetaData-Source/m-p/163160#M46300</link>
    <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;P&gt;placing &lt;/P&gt;

&lt;P&gt;SOURCE_KEY=MetaData:Source with&lt;BR /&gt;
SOURCE_KEY=source&lt;/P&gt;

&lt;P&gt;in transforms.conf seems to work.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Andreas&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 20:17:53 GMT</pubDate>
    <dc:creator>schose</dc:creator>
    <dc:date>2020-09-28T20:17:53Z</dc:date>
    <item>
      <title>extract field from MetaData:Source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-field-from-MetaData-Source/m-p/163159#M46299</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I'm trying to extract the field "vservice" from Source as the last two characters (after &lt;CODE&gt;_&lt;/CODE&gt;) from sourcetype "catalina".&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[catalina]
REPORT-vservice=vservice
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[vservice]
REGEX=_(\w\w)$
FORMAT=vservice::$1
SOURCE_KEY=MetaData:Source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I don't see why it's not working... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="myindex" | rex field=source _(?&amp;lt;vservice&amp;gt;\w\w)$ 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which should be the same is working fine for me.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2015 12:36:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-field-from-MetaData-Source/m-p/163159#M46299</guid>
      <dc:creator>schose</dc:creator>
      <dc:date>2015-06-22T12:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: extract field from MetaData:Source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-field-from-MetaData-Source/m-p/163160#M46300</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;P&gt;placing &lt;/P&gt;

&lt;P&gt;SOURCE_KEY=MetaData:Source with&lt;BR /&gt;
SOURCE_KEY=source&lt;/P&gt;

&lt;P&gt;in transforms.conf seems to work.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:17:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-field-from-MetaData-Source/m-p/163160#M46300</guid>
      <dc:creator>schose</dc:creator>
      <dc:date>2020-09-28T20:17:53Z</dc:date>
    </item>
  </channel>
</rss>

