<?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: subpattern name expected in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-subpattern-name-expected/m-p/395459#M114813</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;org_name="myOrg" index="myIndex" app_name="myAppName" space_name="Staging"
| rex field=msg "(?&amp;lt;stack&amp;gt;java.lang.Exception.\S+)"
| eval earliest=_time-1
| eval latest=_time+1
| cluster t=0.9 showcount=t 
| head 20 
| spath msg
| table timestamp,_time,stack,msg 
| sort -timestamp
| reverse
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 22 Feb 2019 19:29:06 GMT</pubDate>
    <dc:creator>chrisyounger</dc:creator>
    <dc:date>2019-02-22T19:29:06Z</dc:date>
    <item>
      <title>Regex: subpattern name expected</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-subpattern-name-expected/m-p/395458#M114812</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;org_name="myOrg" index="myIndex" app_name="myAppName" space_name="Staging"
| rex field=msg "stack:(?&amp;lt;.*java\.lang.*Exception.*&amp;gt;\S+) "
| eval earliest=_time-1
| eval latest=_time+1
| cluster t=0.9 showcount=t 
| head 20 
| spath msg
| table timestamp,_time,stack,msg 
| sort -timestamp
| reverse
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the error: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error in 'rex' command: Encountered the following error while compiling the regex 'stack:(?&amp;lt;.*java\.lang.*Exception.*&amp;gt;\S+) ': Regex: subpattern name expected
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can someone help?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 18:56:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-subpattern-name-expected/m-p/395458#M114812</guid>
      <dc:creator>robprice797</dc:creator>
      <dc:date>2019-02-22T18:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Regex: subpattern name expected</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-subpattern-name-expected/m-p/395459#M114813</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;org_name="myOrg" index="myIndex" app_name="myAppName" space_name="Staging"
| rex field=msg "(?&amp;lt;stack&amp;gt;java.lang.Exception.\S+)"
| eval earliest=_time-1
| eval latest=_time+1
| cluster t=0.9 showcount=t 
| head 20 
| spath msg
| table timestamp,_time,stack,msg 
| sort -timestamp
| reverse
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Feb 2019 19:29:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-subpattern-name-expected/m-p/395459#M114813</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-02-22T19:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Regex: subpattern name expected</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-subpattern-name-expected/m-p/395460#M114814</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="myIndex" org_name="myOrg" app_name="myAppName" space_name="Staging"
| rex field=msg "(?&amp;lt;stack&amp;gt;.*java\.lang.*Exception.*\S+)"
| eval earliest=_time-1
| eval latest=_time+1
| cluster t=0.9 showcount=t 
| head 20 
| spath msg
| table timestamp,_time,stack,msg 
| sort -timestamp
| reverse
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am assuming that you are trying to create a field called &lt;CODE&gt;stack&lt;/CODE&gt; but I have no idea what the rest of the RegEx should be.  If this is not correct, expand on this:&lt;BR /&gt;
&lt;A href="https://regex101.com/r/HdGXie/1"&gt;https://regex101.com/r/HdGXie/1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 03:57:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-subpattern-name-expected/m-p/395460#M114814</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-03-06T03:57:29Z</dc:date>
    </item>
  </channel>
</rss>

