<?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: Regex - DNS formatting in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-DNS-formatting/m-p/248913#M74334</link>
    <description>&lt;P&gt;the first one worked well. Thank you sir! &lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2016 20:19:26 GMT</pubDate>
    <dc:creator>tmarlette</dc:creator>
    <dc:date>2016-03-15T20:19:26Z</dc:date>
    <item>
      <title>Regex - DNS formatting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-DNS-formatting/m-p/248911#M74332</link>
      <description>&lt;P&gt;I am attempting to format my DNS data to a standard format. I'm thinking I can use REGEX / SED for the this formatting. &lt;/P&gt;

&lt;P&gt;This is my current field value:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(19)espnfivethirtyeight(5)files(9)wordpress(3)com(0)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is the value that I would like to see:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;espnfivethirtyeight.files.wordpress.com
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've used eval to replace the pattern &lt;CODE&gt;eval myField=replace(src_domain,"\(\d+\)",".")&lt;/CODE&gt; and that replaces the values to the following, and the first and last '.' are adjusting my search results&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.espnfivethirtyeight.files.wordpress.com.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there anything I can use in order to make the desired adjustment? &lt;/P&gt;

&lt;P&gt;Thank you so much!! &lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2016 18:37:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-DNS-formatting/m-p/248911#M74332</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2016-03-15T18:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regex - DNS formatting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-DNS-formatting/m-p/248912#M74333</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval myField=replace(replace(src_domain,"\(\d+\)","."),"\.(.*)\.","\1")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Option 2&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval myField=substr(replace(src_domain,"(\w*)(\(\d+\))",".\1"),3)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Mar 2016 19:01:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-DNS-formatting/m-p/248912#M74333</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-15T19:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Regex - DNS formatting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-DNS-formatting/m-p/248913#M74334</link>
      <description>&lt;P&gt;the first one worked well. Thank you sir! &lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2016 20:19:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-DNS-formatting/m-p/248913#M74334</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2016-03-15T20:19:26Z</dc:date>
    </item>
  </channel>
</rss>

