<?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: Rex removing a sub string is not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Rex-removing-a-sub-string-is-not-working/m-p/621529#M216042</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225399"&gt;@johnnybillyd&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;sorry, please try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| rex field=Value max_match=0 "(?&amp;lt;MicGainText&amp;gt;\d+)\sdB"
| table Value MicGainText&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/y9tTUs/1" target="_blank"&gt;https://regex101.com/r/y9tTUs/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 21 Nov 2022 08:06:11 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-11-21T08:06:11Z</dc:date>
    <item>
      <title>Rex removing a sub string is not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-removing-a-sub-string-is-not-working/m-p/621504#M216036</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Been banging my head on this brick wall for a while so reaching out for some of expertise. Seems pretty straightforward and regex101 says my expression should work, but I am not getting any data returned in the new field.&lt;/P&gt;
&lt;P&gt;Original data&amp;nbsp; is:&lt;/P&gt;
&lt;P&gt;18 dB, 16 dB, 12 dB, 12 dB, 12 dB, 13 dB, 4 dB, 8 dB, 9 dB, 9 dB&lt;BR /&gt;9 dB, 9 dB, 9 dB, 9 dB&lt;BR /&gt;9 dB&lt;BR /&gt;9 dB, 9 dB, 9 dB, 9 dB, 9 dB&lt;BR /&gt;7 dB, 9 dB&lt;/P&gt;
&lt;P&gt;I'm trying to remove the space and the text dB after any number. So the results for the 4th event would read as 9, 9, 9, 9, 9 and the 5th event would be 7, 9&lt;/P&gt;
&lt;P&gt;My search returns&amp;nbsp; the events, but no values for the new field:&lt;/P&gt;
&lt;P&gt;|rex field=Value "\ dB(?&amp;lt;MicGainText&amp;gt;)"&lt;BR /&gt;|table Value MicGainText&lt;/P&gt;
&lt;P&gt;If anyone could assist, it would be greatly appreciated. Thanks in advance&lt;/P&gt;
&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 12:06:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-removing-a-sub-string-is-not-working/m-p/621504#M216036</guid>
      <dc:creator>johnnybillyd</dc:creator>
      <dc:date>2022-11-21T12:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Rex removing a sub string is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-removing-a-sub-string-is-not-working/m-p/621526#M216040</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225399"&gt;@johnnybillyd&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;probably the regex you shared isn't complete, but it should be:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| rex field=Value max_match=0 "dB(?&amp;lt;MicGainText&amp;gt;\d+)"
| table Value MicGainText&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 07:06:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-removing-a-sub-string-is-not-working/m-p/621526#M216040</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-21T07:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Rex removing a sub string is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-removing-a-sub-string-is-not-working/m-p/621527#M216041</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Thanks for responding.&lt;/P&gt;&lt;P&gt;Unfortunately, that's still not returning any results for the MicGainText field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 07:33:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-removing-a-sub-string-is-not-working/m-p/621527#M216041</guid>
      <dc:creator>johnnybillyd</dc:creator>
      <dc:date>2022-11-21T07:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Rex removing a sub string is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-removing-a-sub-string-is-not-working/m-p/621529#M216042</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225399"&gt;@johnnybillyd&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;sorry, please try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| rex field=Value max_match=0 "(?&amp;lt;MicGainText&amp;gt;\d+)\sdB"
| table Value MicGainText&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/y9tTUs/1" target="_blank"&gt;https://regex101.com/r/y9tTUs/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 08:06:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-removing-a-sub-string-is-not-working/m-p/621529#M216042</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-21T08:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Rex removing a sub string is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-removing-a-sub-string-is-not-working/m-p/621544#M216048</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much, that is now working!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is stripping the comma delimiter, and stacking the values in the table, but I think I will be able to sort that out now&amp;nbsp; you have helped me get the basic rex working though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;Kudos,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 09:54:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-removing-a-sub-string-is-not-working/m-p/621544#M216048</guid>
      <dc:creator>johnnybillyd</dc:creator>
      <dc:date>2022-11-21T09:54:45Z</dc:date>
    </item>
  </channel>
</rss>

