<?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: How do I edit my &amp;quot;rex mode=sed&amp;quot; search to extract this field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-quot-rex-mode-sed-quot-search-to-extract-this/m-p/201854#M58527</link>
    <description>&lt;P&gt;Providing a sample events and highlighting the value you need to extract as a field will help here. The rex with sed is just to update an existing field value. To create/extract a new field, use regular rex, something like this  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=mystuff | rex field=yourfield(default is _raw) "(?&amp;lt;datacenter&amp;gt;MYDCname)" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 11 Feb 2016 18:08:06 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-02-11T18:08:06Z</dc:date>
    <item>
      <title>How do I edit my "rex mode=sed" search to extract this field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-quot-rex-mode-sed-quot-search-to-extract-this/m-p/201853#M58526</link>
      <description>&lt;P&gt;Just playing with rex sed a bit here. I had load balancer log which pops out the data center name. Just thought I would SED the event so that it was in key value format, but it doesn't look like Splunk will extract it as a field. Is there an option I am missing or this normal? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=mystuff | rex mode=sed "s/MYDCname/datacenter=MYDCname /g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Feb 2016 18:04:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-quot-rex-mode-sed-quot-search-to-extract-this/m-p/201853#M58526</guid>
      <dc:creator>daniel333</dc:creator>
      <dc:date>2016-02-11T18:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my "rex mode=sed" search to extract this field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-quot-rex-mode-sed-quot-search-to-extract-this/m-p/201854#M58527</link>
      <description>&lt;P&gt;Providing a sample events and highlighting the value you need to extract as a field will help here. The rex with sed is just to update an existing field value. To create/extract a new field, use regular rex, something like this  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=mystuff | rex field=yourfield(default is _raw) "(?&amp;lt;datacenter&amp;gt;MYDCname)" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Feb 2016 18:08:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-quot-rex-mode-sed-quot-search-to-extract-this/m-p/201854#M58527</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-11T18:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my "rex mode=sed" search to extract this field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-quot-rex-mode-sed-quot-search-to-extract-this/m-p/201855#M58528</link>
      <description>&lt;P&gt;If you are trying to modify it BEFORE it gets indexed, you need to put a &lt;CODE&gt;SEDCMD&lt;/CODE&gt; in a props.conf on your HF or Indexers:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.8/Data/Anonymizedatausingconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.8/Data/Anonymizedatausingconfigurationfiles&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 22:59:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-quot-rex-mode-sed-quot-search-to-extract-this/m-p/201855#M58528</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-02-15T22:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my "rex mode=sed" search to extract this field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-quot-rex-mode-sed-quot-search-to-extract-this/m-p/201856#M58529</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
just escape = character like below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=mystuff | rex mode=sed "s/MYDCname/datacenter\=MYDCname /g"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;verify that MYDCname string is present in a _raw field&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2016 08:52:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-quot-rex-mode-sed-quot-search-to-extract-this/m-p/201856#M58529</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2016-02-16T08:52:33Z</dc:date>
    </item>
  </channel>
</rss>

