<?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 help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/433345#M123740</link>
    <description>&lt;P&gt;Something like this should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\((?&amp;lt;my_field&amp;gt;.*)\sB\ssent\)$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Explanation:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\( matches the '(' character
(?&amp;lt;my_field&amp;gt;.*) is the capture group
\s matches a space
B matches 'B'
\s matches a space
\) matches the ')' character 
$ anchors the regex to the end of the line
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Similarly, this should work for your other example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\((?&amp;lt;my_field&amp;gt;.*)\sB\sreceived\)$
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 31 May 2018 22:45:53 GMT</pubDate>
    <dc:creator>jconger</dc:creator>
    <dc:date>2018-05-31T22:45:53Z</dc:date>
    <item>
      <title>Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/433344#M123739</link>
      <description>&lt;P&gt;Hey Guys,&lt;/P&gt;

&lt;P&gt;I need help to write a regex with the name upload to pull the number 3712 from the below log where 'B Sent' is ending string for all the logs.&lt;/P&gt;

&lt;P&gt;Upload log:  Successfully sent file '\servername\Projects\Cdfad\Prod\51327426.xml' (3712 B sent)&lt;/P&gt;

&lt;P&gt;Similarly regex with the name Download to pull the number 152 from the below log (152 B received) where B received is ending &lt;/P&gt;

&lt;P&gt;Download log: Successfully stored file at '\servername\Projects\FOI\QA\MassUpdates\F000' (152 B received)&lt;/P&gt;

&lt;P&gt;Thank you in advance for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 21:23:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/433344#M123739</guid>
      <dc:creator>khajaforu</dc:creator>
      <dc:date>2018-05-31T21:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/433345#M123740</link>
      <description>&lt;P&gt;Something like this should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\((?&amp;lt;my_field&amp;gt;.*)\sB\ssent\)$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Explanation:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\( matches the '(' character
(?&amp;lt;my_field&amp;gt;.*) is the capture group
\s matches a space
B matches 'B'
\s matches a space
\) matches the ')' character 
$ anchors the regex to the end of the line
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Similarly, this should work for your other example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\((?&amp;lt;my_field&amp;gt;.*)\sB\sreceived\)$
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 May 2018 22:45:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/433345#M123740</guid>
      <dc:creator>jconger</dc:creator>
      <dc:date>2018-05-31T22:45:53Z</dc:date>
    </item>
  </channel>
</rss>

