<?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 How to edit my eval replace / trim statement to format domain information? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-eval-replace-trim-statement-to-format-domain/m-p/246437#M73474</link>
    <description>&lt;P&gt;So I have some domain information that i'm attempting to format appropriately with EVAL functions either replace, or rtrim, and I seem to be having some difficulty. &lt;/P&gt;

&lt;P&gt;I'm attempting to shave off the periods before and after the value. Here is the type of values that I'm getting:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;query=".www.google.com."
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and this is my eval statement so far:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval aaa=replace(query, "\".([^\.]+).\", "\1"")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It doesn't seem to be taking, so I was wondering if I'm typoing something somewhere?  I simply assume my syntax is wrong. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Thank you! &lt;/P&gt;</description>
    <pubDate>Wed, 11 May 2016 19:31:44 GMT</pubDate>
    <dc:creator>tmarlette</dc:creator>
    <dc:date>2016-05-11T19:31:44Z</dc:date>
    <item>
      <title>How to edit my eval replace / trim statement to format domain information?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-eval-replace-trim-statement-to-format-domain/m-p/246437#M73474</link>
      <description>&lt;P&gt;So I have some domain information that i'm attempting to format appropriately with EVAL functions either replace, or rtrim, and I seem to be having some difficulty. &lt;/P&gt;

&lt;P&gt;I'm attempting to shave off the periods before and after the value. Here is the type of values that I'm getting:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;query=".www.google.com."
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and this is my eval statement so far:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval aaa=replace(query, "\".([^\.]+).\", "\1"")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It doesn't seem to be taking, so I was wondering if I'm typoing something somewhere?  I simply assume my syntax is wrong. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Thank you! &lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 19:31:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-eval-replace-trim-statement-to-format-domain/m-p/246437#M73474</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2016-05-11T19:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my eval replace / trim statement to format domain information?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-eval-replace-trim-statement-to-format-domain/m-p/246438#M73475</link>
      <description>&lt;P&gt;Try `trim(query, "\."). If you prefer replace, then you need to escape the . (period) characters with a \ (backslash)&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 19:36:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-eval-replace-trim-statement-to-format-domain/m-p/246438#M73475</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-05-11T19:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my eval replace / trim statement to format domain information?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-eval-replace-trim-statement-to-format-domain/m-p/246439#M73476</link>
      <description>&lt;P&gt;Worked like a charm, thankyou sir! Here was my final eval statement &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval query=trim(query, "\.\"")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 May 2016 20:40:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-eval-replace-trim-statement-to-format-domain/m-p/246439#M73476</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2016-05-11T20:40:57Z</dc:date>
    </item>
  </channel>
</rss>

