<?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: More help with regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211858#M61960</link>
    <description>&lt;P&gt;See my answer here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/374092/how-to-write-the-regex-to-convert-an-entry-in-my-s.html"&gt;https://answers.splunk.com/answers/374092/how-to-write-the-regex-to-convert-an-entry-in-my-s.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Apr 2016 20:45:21 GMT</pubDate>
    <dc:creator>javiergn</dc:creator>
    <dc:date>2016-04-21T20:45:21Z</dc:date>
    <item>
      <title>More help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211857#M61959</link>
      <description>&lt;P&gt;I am again in need of help with regex. In a scrubbed example (there are thousands more lines) of the following dns log I have the following:&lt;/P&gt;

&lt;P&gt;4/13/2016 5:22:38 AM 062C PACKET  000000FE74EC0260 UDP Rcv 999.99.999.999  8088   Q [0001   D   NOERROR] A      (12)biggersearch(3)ent(4)john(5)local(0)&lt;/P&gt;

&lt;P&gt;4/13/2016 5:22:37 AM 062C PACKET  000000FE766DC0A0 UDP Rcv 999.99.999.999  635d   Q [0001   D   NOERROR] A      (3)dns(8)msftncsi(3)com(0)&lt;/P&gt;

&lt;P&gt;I need to strip out &lt;BR /&gt;
 (12)biggersearch(3)ent(4)john(5)local(0) &lt;BR /&gt;
to be &lt;BR /&gt;
biggersearch.ent.john.local&lt;BR /&gt;
and&lt;BR /&gt;
(3)dns(8)msftncsi(3)com(0)&lt;BR /&gt;&lt;BR /&gt;
to be&lt;BR /&gt;
dns.msftncs.com&lt;/P&gt;

&lt;P&gt;Please help and many thanks...&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 20:35:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211857#M61959</guid>
      <dc:creator>TheJagoff</dc:creator>
      <dc:date>2016-04-21T20:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: More help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211858#M61960</link>
      <description>&lt;P&gt;See my answer here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/374092/how-to-write-the-regex-to-convert-an-entry-in-my-s.html"&gt;https://answers.splunk.com/answers/374092/how-to-write-the-regex-to-convert-an-entry-in-my-s.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 20:45:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211858#M61960</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-04-21T20:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: More help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211859#M61961</link>
      <description>&lt;P&gt;Hi and thank you,&lt;/P&gt;

&lt;P&gt;I got the first part of this in my props.conf and I modified it a little and it works perfectly...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\[[^\]]+\]\s+\w*\s+\(\d+\)(?\S+?)\(\d+\)$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am unsure on how and where to place the remainder of this (I am assuming it goes into transforms.conf?):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;s/(\(\d+\))/./g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please help me finish this up and thank you again...&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 21:45:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211859#M61961</guid>
      <dc:creator>TheJagoff</dc:creator>
      <dc:date>2016-04-21T21:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: More help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211860#M61962</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Could you post your regex again but using the code button above (the one with 1s and 0s)? Otherwise special characters will be removed. &lt;/P&gt;

&lt;P&gt;With regards to your question about props and transforms, see the following links on how to use both files for advanced field extraction. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.0/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.0/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/132965/using-transforms-to-replace-raw-data-vs-sedcmd.html"&gt;https://answers.splunk.com/answers/132965/using-transforms-to-replace-raw-data-vs-sedcmd.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/210096/how-to-configure-sedcmd-in-propsconf.html"&gt;https://answers.splunk.com/answers/210096/how-to-configure-sedcmd-in-propsconf.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/119/what-is-role-of-transforms-conf-vs-props-conf-for-field-extraction.html"&gt;https://answers.splunk.com/answers/119/what-is-role-of-transforms-conf-vs-props-conf-for-field-extraction.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope that helps. &lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 22:05:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211860#M61962</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-04-21T22:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: More help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211861#M61963</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;EXTRACT-url = \[[^\]]+\]\s+\w*\s+\(\d+\)(?&amp;lt;url&amp;gt;\S+?)\(\d+\)$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and my url comes out as &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;biggersearch(3)ent(4)john(5)local
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am having difficulty getting it to be&lt;/P&gt;

&lt;P&gt;biggersearch.ent.john.local&lt;/P&gt;

&lt;P&gt;Just unsure as to how to finish it up via transforms.conf&lt;/P&gt;

&lt;P&gt;Many thanks and I apologize for being confused on this subject&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 22:21:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211861#M61963</guid>
      <dc:creator>TheJagoff</dc:creator>
      <dc:date>2016-04-21T22:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: More help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211862#M61964</link>
      <description>&lt;P&gt;If you're already extracting that in props, maybe just finish up there with an eval, something like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVAL-url = replace(url,"\(\d+\)",".")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The eval should be processed after the extract.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 02:12:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211862#M61964</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2016-04-22T02:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: More help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211863#M61965</link>
      <description>&lt;P&gt;Works like a charm! Thanks to you both for helping me put this all together.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 12:58:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/More-help-with-regex/m-p/211863#M61965</guid>
      <dc:creator>TheJagoff</dc:creator>
      <dc:date>2016-04-22T12:58:07Z</dc:date>
    </item>
  </channel>
</rss>

