<?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: Need help with regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-regex/m-p/410379#M118399</link>
    <description>&lt;P&gt;Hi @ppanchal&lt;/P&gt;

&lt;P&gt;Please try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults |eval message="CommonAsyncGETController.execute() : scope :S01234"| rex field=message "scope\s:(?P&amp;lt;scope&amp;gt;.+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 16 Jan 2019 21:42:11 GMT</pubDate>
    <dc:creator>vnravikumar</dc:creator>
    <dc:date>2019-01-16T21:42:11Z</dc:date>
    <item>
      <title>Need help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-regex/m-p/410377#M118397</link>
      <description>&lt;P&gt;index=...| search MESSAGE="CommonAsyncGETController.execute() : scope :S01234"| Table MESSAGE&lt;/P&gt;

&lt;P&gt;Above is my string, I want to extract S01234 from MESSAGE="CommonAsyncGETController.execute() : scope :S01234" and have a new column called scope and output as below,&lt;/P&gt;

&lt;P&gt;Scope&lt;BR /&gt;
S01234&lt;/P&gt;

&lt;P&gt;Please help.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 21:32:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-regex/m-p/410377#M118397</guid>
      <dc:creator>ppanchal</dc:creator>
      <dc:date>2019-01-16T21:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-regex/m-p/410378#M118398</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=...| search MESSAGE="CommonAsyncGETController.execute() : scope :S01234"| rex field=MESSAGE "(?:.+scope\s\:)(?P&amp;lt;Scope&amp;gt;\S+)" | Table MESSAGE Scope
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;At least, assuming that your original search is correct, that should give you a whole new field at search time called Scope, and S01234 will be the value.  That being said, your search isn't going to find anything where the scope field would have a different value other than S01234...  But that's a different question...&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 21:40:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-regex/m-p/410378#M118398</guid>
      <dc:creator>michael_schmidt</dc:creator>
      <dc:date>2019-01-16T21:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-regex/m-p/410379#M118399</link>
      <description>&lt;P&gt;Hi @ppanchal&lt;/P&gt;

&lt;P&gt;Please try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults |eval message="CommonAsyncGETController.execute() : scope :S01234"| rex field=message "scope\s:(?P&amp;lt;scope&amp;gt;.+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 21:42:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-regex/m-p/410379#M118399</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-01-16T21:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-regex/m-p/410380#M118400</link>
      <description>&lt;P&gt;It only took me like three edits to realize that I wasn't messing up my typing but that I needed to put the named capture group in a code box...  Jeezz....&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 21:55:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-regex/m-p/410380#M118400</guid>
      <dc:creator>michael_schmidt</dc:creator>
      <dc:date>2019-01-16T21:55:32Z</dc:date>
    </item>
  </channel>
</rss>

