<?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 field extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/450754#M127647</link>
    <description>&lt;P&gt;This still returns the errors that there is an unmatched closing parenthesis.  &lt;/P&gt;

&lt;P&gt;I'll open up a ticket with support and update this with the results. &lt;/P&gt;</description>
    <pubDate>Mon, 25 Mar 2019 14:01:12 GMT</pubDate>
    <dc:creator>saulverde</dc:creator>
    <dc:date>2019-03-25T14:01:12Z</dc:date>
    <item>
      <title>Regex field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/450752#M127645</link>
      <description>&lt;P&gt;I am having trouble with field extraction. I have a regex which works in a pcre regex tester but when I attempt to use this regex in splunk I  get an "unmatched closing parenthesis" error&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;SPL:&lt;/STRONG&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=mysourcetype | rex field=_raw max_match=0  "(?&amp;lt;_KEY_1&amp;gt;(?:[A-Z]\w+\s){0,1}+[A-Z]\w+):[^\S\t\n\r](?&amp;lt;_VAL_1&amp;gt;(?:\d+\/\d+\/\d+\s\d+:\d+:\d+\s\w+|(?:\w:)?[\w\(\).\/\\]*(?:[^\S\t\n\r][\w.\/\\\(\)-]+)*))\s"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Event text:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Mar 15 09:47:27  Agent: Desc: normalized    Agent ID: pbw   Agent Ver:  Category:   Source Host:    Event Desc: Custom Rule Applied Event Name: 28693   OS:     Event Severity: 0   Source IP:  Event Subject:  Event Type: 0   User: Domain\user   Workgroup Desc:     Workgroup ID:   Workgroup Location:     TimeCreated: 3/15/2019 2:47:00 PM   AssetId: 38282  AssetName: computername EventMessage: Custom Rule Applied   SystemType: WINDOWS Application:    RuleName: VS2017 - Publisher Rule (new) EventTypeID: 28693  Hash:   FirstOccurence: 3/15/2019 2:47:00 PM    LastOccurence: 3/15/2019 2:47:00 PM EventId1: 112618911 HasRule: TRUE   Vendor:     Arguments: /d /s /c tasklist /fi imagename eq devenv.exe /fi pid eq 16100 /fo table /nh Excluded: FALSE Application1:   RuleType: PUBLISHER RuleName1: VS2017 - Publisher Rule (new)    Justification:  Path: C:\Windows\system32\cmd.exe   UserName: domain\user   UserType: Administrator 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I initially built the regex into a transform for my searchheads.  When that didn't work I started trying to test it in SPL to troubleshoot why it works in the online tester but not in Splunk.  I'm missing whatever it is that's breaking my regex. &lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 13:31:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/450752#M127645</guid>
      <dc:creator>saulverde</dc:creator>
      <dc:date>2019-03-20T13:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Regex field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/450753#M127646</link>
      <description>&lt;P&gt;Try putting the statements on either side of the "or" in parenthesis. &lt;BR /&gt;
sourcetype=mysourcetype | rex field=_raw max_match=0 "(?&amp;lt;_KEY_1&amp;gt;((?:[A-Z]\w+\s){0,1}+[A-Z]\w+):&lt;A href="https://community.splunk.com/?%3C_VAL_1%3E(?:d+/d+/d+sd+:d+:d+sw+)%7C((?:w:)?%5Bw()./%5C%5D*(?:%5B%5EStnr%5D%5Bw./%5C()-%5D+)*)" target="_blank"&gt;^\S\t\n\r&lt;/A&gt;\s)"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:44:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/450753#M127646</guid>
      <dc:creator>mydog8it</dc:creator>
      <dc:date>2020-09-29T23:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Regex field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/450754#M127647</link>
      <description>&lt;P&gt;This still returns the errors that there is an unmatched closing parenthesis.  &lt;/P&gt;

&lt;P&gt;I'll open up a ticket with support and update this with the results. &lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 14:01:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/450754#M127647</guid>
      <dc:creator>saulverde</dc:creator>
      <dc:date>2019-03-25T14:01:12Z</dc:date>
    </item>
  </channel>
</rss>

