<?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: Turning a search into a new field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Turning-a-search-into-a-new-field/m-p/39242#M178769</link>
    <description>&lt;P&gt;I'm not really sure what you mean. Where am I using this re? and what do I put in the regex expression if I only have a sed expression?&lt;/P&gt;</description>
    <pubDate>Tue, 20 Aug 2013 15:41:36 GMT</pubDate>
    <dc:creator>cpeteman</dc:creator>
    <dc:date>2013-08-20T15:41:36Z</dc:date>
    <item>
      <title>Turning a search into a new field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Turning-a-search-into-a-new-field/m-p/39238#M178765</link>
      <description>&lt;P&gt;The following search removes usernames, host names, all time information, any digits, and turns all strings of white space into a single "_" for the _raw message. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... |rex mode=sed "s/[a-z]+\d{1,4}//" |rex mode=sed "s/user\s[a-z]+/user /" 
|rex mode=sed "s/(user|USER)=[a-z]+/user=/" |rex mode=sed "s/\d+//g" 
|rex mode=sed "s/(Jan|January|Feb|Febuary|Mar|March|Apr|April|May|Jun|June|Jul|July|Aug|August|Sep|September|Oct|October|Nov|November|Dec|December|Mon|Tue|Wed|Thu|Fri|Sat|Sun|PM|AM|PDT|PST)//g" 
|rex mode=sed "s/\s+/_/g"| rename _raw AS msgdigest |stats count by msgdigest
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to be able to have this "digested" message available as a field does anyone know how to turn this into a field. Preferably with the transforms and extraction pages in manager as I'm currently having unrelated problems with props.conf and transforms.conf files. Please help!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2013 17:12:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Turning-a-search-into-a-new-field/m-p/39238#M178765</guid>
      <dc:creator>cpeteman</dc:creator>
      <dc:date>2013-08-19T17:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a search into a new field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Turning-a-search-into-a-new-field/m-p/39239#M178766</link>
      <description>&lt;P&gt;A workaround is to create a macro and call it after the search.&lt;/P&gt;

&lt;P&gt;For the automatic field extractions (rex command), please see&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles&lt;/A&gt;&lt;BR /&gt;
I never tried to use the mode=sed in the configuration file, I couldn't figure if it's possible. &lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2013 19:25:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Turning-a-search-into-a-new-field/m-p/39239#M178766</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-08-19T19:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a search into a new field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Turning-a-search-into-a-new-field/m-p/39240#M178767</link>
      <description>&lt;P&gt;A marco would take away the original _raw message, as I have my search now that is. Do you know if that can be avoided?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2013 20:53:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Turning-a-search-into-a-new-field/m-p/39240#M178767</guid>
      <dc:creator>cpeteman</dc:creator>
      <dc:date>2013-08-19T20:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a search into a new field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Turning-a-search-into-a-new-field/m-p/39241#M178768</link>
      <description>&lt;P&gt;Did this not work?&lt;BR /&gt;
Syntax &lt;BR /&gt;
rex &lt;A href="https://community.splunk.com/regex-expression%3E%20%5Bmax_match=%3Cint%3E%5D%20%7C%20mode=sed%20%3Csed-expression"&gt;field=&lt;FIELD&gt;&lt;/FIELD&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2013 22:51:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Turning-a-search-into-a-new-field/m-p/39241#M178768</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-08-19T22:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a search into a new field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Turning-a-search-into-a-new-field/m-p/39242#M178769</link>
      <description>&lt;P&gt;I'm not really sure what you mean. Where am I using this re? and what do I put in the regex expression if I only have a sed expression?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2013 15:41:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Turning-a-search-into-a-new-field/m-p/39242#M178769</guid>
      <dc:creator>cpeteman</dc:creator>
      <dc:date>2013-08-20T15:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a search into a new field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Turning-a-search-into-a-new-field/m-p/39243#M178770</link>
      <description>&lt;P&gt;For now a macro seems to be the only option I did manage to avoid my fear in the above comment.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2013 22:55:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Turning-a-search-into-a-new-field/m-p/39243#M178770</guid>
      <dc:creator>cpeteman</dc:creator>
      <dc:date>2013-08-26T22:55:23Z</dc:date>
    </item>
  </channel>
</rss>

