<?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 can I remove some parenthesis from this log? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-remove-some-parenthesis-from-this-log/m-p/300636#M56845</link>
    <description>&lt;P&gt;have you tried below answer.. it will remove &lt;CODE&gt;(&lt;/CODE&gt; and &lt;CODE&gt;)&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Feb 2018 01:19:51 GMT</pubDate>
    <dc:creator>493669</dc:creator>
    <dc:date>2018-02-21T01:19:51Z</dc:date>
    <item>
      <title>How can I remove some parenthesis from this log?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-remove-some-parenthesis-from-this-log/m-p/300633#M56842</link>
      <description>&lt;P&gt;All, &lt;/P&gt;

&lt;P&gt;I am trying to convert some superfluous parenthesis from this log. Duration value can be up to 4 digits.&lt;/P&gt;

&lt;P&gt;Looks like&lt;BR /&gt;
1/2/2017 12:34 severity=INFO post call (duration=5)&lt;/P&gt;

&lt;P&gt;What I want&lt;BR /&gt;
1/2/2017 12:34 severity=INFO post call duration=5&lt;/P&gt;

&lt;P&gt;Here is what I got so far, but not clicking. &lt;BR /&gt;
  SEDCMD-log4jwild_fix_duration_parenth = s/((duration=(0-9)*))/\1/&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:08:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-remove-some-parenthesis-from-this-log/m-p/300633#M56842</guid>
      <dc:creator>daniel333</dc:creator>
      <dc:date>2020-09-29T18:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: How can I remove some parenthesis from this log?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-remove-some-parenthesis-from-this-log/m-p/300634#M56843</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-log4jwild_fix_duration_parenth = s/([^\(]+)\(([^\)]+)\)/\1\2/
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Feb 2018 01:14:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-remove-some-parenthesis-from-this-log/m-p/300634#M56843</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-21T01:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I remove some parenthesis from this log?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-remove-some-parenthesis-from-this-log/m-p/300635#M56844</link>
      <description>&lt;P&gt;What about a &lt;CODE&gt;sed&lt;/CODE&gt; command which would replace either &lt;CODE&gt;(&lt;/CODE&gt; or &lt;CODE&gt;)&lt;/CODE&gt; with nothing?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 01:14:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-remove-some-parenthesis-from-this-log/m-p/300635#M56844</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2018-02-21T01:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: How can I remove some parenthesis from this log?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-remove-some-parenthesis-from-this-log/m-p/300636#M56845</link>
      <description>&lt;P&gt;have you tried below answer.. it will remove &lt;CODE&gt;(&lt;/CODE&gt; and &lt;CODE&gt;)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 01:19:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-remove-some-parenthesis-from-this-log/m-p/300636#M56845</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-21T01:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I remove some parenthesis from this log?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-remove-some-parenthesis-from-this-log/m-p/300637#M56846</link>
      <description>&lt;P&gt;Try this run anywhere search, below will look only for &lt;CODE&gt;duration field&lt;/CODE&gt;and remove the brackets from duration field only.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval data="1/2/2017 12:34 severity=INFO post call (duration=5)" 
| rex field=data mode=sed "s/\((duration=[^\)]+)\)/\1/"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is what you should write in your environment:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-log4jwild_fix_duration_parenth = s/\((duration=[^\)]+)\)/\1/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 07:36:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-remove-some-parenthesis-from-this-log/m-p/300637#M56846</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-02-21T07:36:30Z</dc:date>
    </item>
  </channel>
</rss>

