<?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 Remove brackets and its content? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-Remove-brackets-and-its-content/m-p/151227#M185535</link>
    <description>&lt;P&gt;Hi all,&lt;BR /&gt;
I have a field named count2 with the following values :&lt;BR /&gt;
count2&lt;BR /&gt;
12&lt;BR /&gt;
32(30)&lt;BR /&gt;
14&lt;BR /&gt;
76(23)&lt;BR /&gt;
3&lt;/P&gt;

&lt;P&gt;As mentioned in the title, I'd like to remove the brackets as well as their contents so it would look like this:&lt;/P&gt;

&lt;P&gt;count2&lt;BR /&gt;
12&lt;BR /&gt;
32&lt;BR /&gt;
14&lt;BR /&gt;
76&lt;BR /&gt;
3&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 20 Apr 2015 10:29:50 GMT</pubDate>
    <dc:creator>cedmarjls32</dc:creator>
    <dc:date>2015-04-20T10:29:50Z</dc:date>
    <item>
      <title>How to Remove brackets and its content?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Remove-brackets-and-its-content/m-p/151227#M185535</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;
I have a field named count2 with the following values :&lt;BR /&gt;
count2&lt;BR /&gt;
12&lt;BR /&gt;
32(30)&lt;BR /&gt;
14&lt;BR /&gt;
76(23)&lt;BR /&gt;
3&lt;/P&gt;

&lt;P&gt;As mentioned in the title, I'd like to remove the brackets as well as their contents so it would look like this:&lt;/P&gt;

&lt;P&gt;count2&lt;BR /&gt;
12&lt;BR /&gt;
32&lt;BR /&gt;
14&lt;BR /&gt;
76&lt;BR /&gt;
3&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 10:29:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Remove-brackets-and-its-content/m-p/151227#M185535</guid>
      <dc:creator>cedmarjls32</dc:creator>
      <dc:date>2015-04-20T10:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Remove brackets and its content?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Remove-brackets-and-its-content/m-p/151228#M185536</link>
      <description>&lt;P&gt;Try regular expression or &lt;STRONG&gt;substr&lt;/STRONG&gt; command&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  .............  |rex field=count2 "(?&amp;lt;count&amp;gt;[^(])"|table count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Apr 2015 10:44:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Remove-brackets-and-its-content/m-p/151228#M185536</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-04-20T10:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to Remove brackets and its content?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Remove-brackets-and-its-content/m-p/151229#M185537</link>
      <description>&lt;P&gt;Thanks for your feedback but it looks like the rex command only returns the first digit of all values&lt;/P&gt;

&lt;P&gt;count&lt;BR /&gt;
1 instead of 12&lt;BR /&gt;
3 instead of 32&lt;BR /&gt;
1 instead of 14&lt;BR /&gt;
7 instead of 76&lt;BR /&gt;
etc..&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 11:09:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Remove-brackets-and-its-content/m-p/151229#M185537</guid>
      <dc:creator>cedmarjls32</dc:creator>
      <dc:date>2015-04-20T11:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to Remove brackets and its content?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Remove-brackets-and-its-content/m-p/151230#M185538</link>
      <description>&lt;P&gt;Ok try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   .............  |rex field=count2 "(?&amp;lt;count&amp;gt;\d+)"|table count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; .............  |rex field=count2 "(?&amp;lt;count&amp;gt;\d+)\("|table count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Apr 2015 11:46:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Remove-brackets-and-its-content/m-p/151230#M185538</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-04-20T11:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to Remove brackets and its content?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Remove-brackets-and-its-content/m-p/151231#M185539</link>
      <description>&lt;P&gt;Thanks a lot! It's working great!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 11:48:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Remove-brackets-and-its-content/m-p/151231#M185539</guid>
      <dc:creator>cedmarjls32</dc:creator>
      <dc:date>2015-04-20T11:48:37Z</dc:date>
    </item>
  </channel>
</rss>

