<?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 operation -- Regex: syntax error in subpattern name (missing terminator) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/rex-operation-Regex-syntax-error-in-subpattern-name-missing/m-p/572869#M199651</link>
    <description>&lt;P&gt;The hyphen (-) character is not allowed in field names.&amp;nbsp; Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=_raw "Method: (?&amp;lt;HttpMethod&amp;gt;\w*)"&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 28 Oct 2021 19:38:11 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-10-28T19:38:11Z</dc:date>
    <item>
      <title>rex operation -- Regex: syntax error in subpattern name (missing terminator)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-operation-Regex-syntax-error-in-subpattern-name-missing/m-p/572866#M199649</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm continuously receiving the error &lt;EM&gt;Regex: syntax error in subpattern name (missing terminator)&lt;/EM&gt; when attempting to search with a 'rex' operation.&amp;nbsp; I've gone through several different message boards and nothing seems to resolve the issue.&amp;nbsp; Any help would be greatly appreciated!&lt;BR /&gt;&lt;BR /&gt;My intention is to grab the "Http-Method" value from the raw event.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Search:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[Search...]&lt;/EM&gt; | &lt;STRONG&gt;rex field=_raw "Method: (?&amp;lt;Http-Method&amp;gt;.*)"&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Sample Event:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;2021-10-28&lt;/SPAN&gt; &lt;SPAN class=""&gt;10:55:39&lt;/SPAN&gt;,&lt;SPAN class=""&gt;505&lt;/SPAN&gt; &lt;SPAN class=""&gt;1109468116&lt;/SPAN&gt; [&lt;SPAN class=""&gt;http-bio-8443-exec-9&lt;/SPAN&gt;] &lt;SPAN class=""&gt;INFO&lt;/SPAN&gt; &lt;SPAN class=""&gt;o.a.c.i.LoggingInInterceptor&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Inbound&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;Message&lt;/SPAN&gt; ----------------------------&lt;BR /&gt;&lt;SPAN class=""&gt;ID:&lt;/SPAN&gt; &lt;SPAN class=""&gt;41087&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Address:&lt;/SPAN&gt; &lt;EM&gt;[...Sensitive Information Removed...]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Encoding:&lt;/SPAN&gt; &lt;SPAN class=""&gt;ISO-8859-1&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Http-Method:&lt;/SPAN&gt; &lt;SPAN class=""&gt;POST&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Content-Type: application-xml&lt;/P&gt;&lt;P&gt;Headers: [...Sensitive&lt;EM&gt; Information Removed...]&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 19:08:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-operation-Regex-syntax-error-in-subpattern-name-missing/m-p/572866#M199649</guid>
      <dc:creator>apalmier</dc:creator>
      <dc:date>2021-10-28T19:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: rex operation -- Regex: syntax error in subpattern name (missing terminator)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-operation-Regex-syntax-error-in-subpattern-name-missing/m-p/572868#M199650</link>
      <description>&lt;P&gt;&lt;A href="https://www.pcre.org/current/doc/html/pcre2pattern.html#SEC16" target="_blank"&gt;https://www.pcre.org/current/doc/html/pcre2pattern.html#SEC16&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In PCRE2, a capture group can be named in one of three ways: (?&amp;lt;name&amp;gt;...) or (?'name'...) as in Perl, or (?P&amp;lt;name&amp;gt;...) as in Python. Names may be up to 32 code units long. When PCRE2_UTF is not set, they may contain only ASCII alphanumeric characters and underscores, but must start with a non-digit. When PCRE2_UTF is set, the syntax of group names is extended to allow any Unicode letter or Unicode decimal digit. In other words, group names must match one of these patterns:&lt;/P&gt;&lt;PRE&gt;  ^[_A-Za-z][_A-Za-z0-9]*\z   when PCRE2_UTF is not set
  ^[_\p{L}][_\p{L}\p{Nd}]*\z  when PCRE2_UTF is set&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 19:36:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-operation-Regex-syntax-error-in-subpattern-name-missing/m-p/572868#M199650</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-10-28T19:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: rex operation -- Regex: syntax error in subpattern name (missing terminator)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-operation-Regex-syntax-error-in-subpattern-name-missing/m-p/572869#M199651</link>
      <description>&lt;P&gt;The hyphen (-) character is not allowed in field names.&amp;nbsp; Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=_raw "Method: (?&amp;lt;HttpMethod&amp;gt;\w*)"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 28 Oct 2021 19:38:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-operation-Regex-syntax-error-in-subpattern-name-missing/m-p/572869#M199651</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-10-28T19:38:11Z</dc:date>
    </item>
  </channel>
</rss>

