<?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: What end of anchor parameter to use for the Symantec event? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-end-of-anchor-parameter-to-use-for-the-Symantec-event/m-p/407793#M117769</link>
    <description>&lt;P&gt;The regex is not looking for the "Company name" field.  Also, It expects each field to end with &lt;CODE&gt;"&lt;/CODE&gt;, but there are no quotes in the sample data.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jul 2019 17:05:16 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2019-07-26T17:05:16Z</dc:date>
    <item>
      <title>What end of anchor parameter to use for the Symantec event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-end-of-anchor-parameter-to-use-for-the-Symantec-event/m-p/407792#M117768</link>
      <description>&lt;P&gt;I am trying to figure out what end of the anchor parameter to use for the Symantec event. &lt;/P&gt;

&lt;P&gt;Here is a snippet of the Symantec event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Application hash: 4a3c0caeaf4bef6a170e3d031f7181901464ff8271639bab1641465e6f97e000,Hash type: SHA2,Company name: ,Application name: Mac Cleanup Pro,Application version: ,Application type: -1,File size (bytes): 196640,Category set: Security risk,Category type: UNKNOWN,Location: ,Intensive Protection Level: 0,Certificate issuer: ,Certificate signer: ,Certificate thumbprint: ,Signing timestamp: 0,Certificate serial number:
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is my regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?:Application\shash:\s*(?&amp;lt;Application_Hash&amp;gt;[^"]+)),?(?:Hash\stype:\s*(?&amp;lt;Hash_type&amp;gt;[^"]+)),?(?:Application\sname:\s*(?&amp;lt;Application_name&amp;gt;[^"]+)),?(?:Application\sversion:\s*(?&amp;lt;Applciation_version&amp;gt;[^"]+)),?(?:File\ssize\s\(bytes\)\s*(?&amp;lt;File_size&amp;gt;[^"]+)),?(?:Category\sset:\s*(?&amp;lt;Category_set&amp;gt;[^"]+)),?(?:Category\stype:\s*(?&amp;lt;Category_type&amp;gt;[^"]+)),?(?:Location:\s*(?&amp;lt;Location&amp;gt;[^"]+)),?(?:Intensive\sProtection\sLevel:\s*(?&amp;lt;Intensive_Protection_Level&amp;gt;[^"]+)),?(?:Certificate\sissuer:\s*(?&amp;lt;Certificate_Issuer&amp;gt;[^"]+)),?(?:Certificate\ssigner:\s*(?&amp;lt;Certificate_Signer&amp;gt;[^"]+)),?(?:Certificate\sthumbprint:\s*(?&amp;lt;Certificate_Thumbprint&amp;gt;[^"]+)),?(?:Signing\stimestamp:\s*(?&amp;lt;Signing_Timestamp&amp;gt;[^"]+)),?(?:Certificate\sserial\snumber:\s*(?&amp;lt;Certificate_Serial_Number&amp;gt;[^"]+))\z
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried '$' and '\Z', but no luck getting the entire regex to match. If I leave the end of my regex as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;?(?:Certificate\sserial\snumber:\s*(?&amp;lt;Certificate_Serial_Number&amp;gt;[^"]+))?
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The Group &lt;CODE&gt;Signing_Timestamp&lt;/CODE&gt; is &lt;CODE&gt;0,Certificate serial number:&lt;/CODE&gt; so I know the regex is working up till the very end&lt;/P&gt;

&lt;P&gt;Any help would be appreciated.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 14:37:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-end-of-anchor-parameter-to-use-for-the-Symantec-event/m-p/407792#M117768</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2019-07-26T14:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: What end of anchor parameter to use for the Symantec event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-end-of-anchor-parameter-to-use-for-the-Symantec-event/m-p/407793#M117769</link>
      <description>&lt;P&gt;The regex is not looking for the "Company name" field.  Also, It expects each field to end with &lt;CODE&gt;"&lt;/CODE&gt;, but there are no quotes in the sample data.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 17:05:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-end-of-anchor-parameter-to-use-for-the-Symantec-event/m-p/407793#M117769</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-07-26T17:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: What end of anchor parameter to use for the Symantec event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-end-of-anchor-parameter-to-use-for-the-Symantec-event/m-p/407794#M117770</link>
      <description>&lt;P&gt;Hey Jwalzerpitt!&lt;/P&gt;

&lt;P&gt;I can't remember why, but I've worked with this same symantec extraction before. I went ahead and found it and made it work for your data. &lt;/P&gt;

&lt;P&gt;This should work for the dataset you provided:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?:Application\shash:\s*(?&amp;lt;Application_Hash&amp;gt;[^%\,]+))?,\s*(?:Hash\stype:\s*(?&amp;lt;Hash_Type&amp;gt;[^%\,]+))?,\s*(?:Company\sname:\s*(?&amp;lt;Company_Name&amp;gt;[^\,]+))?,\s*(?:Application\sname:(?&amp;lt;Application_Name&amp;gt;[^%\,]+))?,(?:Application\sversion:\s*(?P&amp;lt;Application_Version&amp;gt;[^\,]+))?,\s*(?:Application\stype:\s*(?&amp;lt;Application_Type&amp;gt;[^%\,]+))?,\s*(?:File\ssize\s\(bytes\):\s*(?&amp;lt;File_Size&amp;gt;[^%\,]+))?(?:,\s*Category\sset:\s*(?&amp;lt;Category_Set&amp;gt;[^%\,]+),\s*Category\stype:\s*(?&amp;lt;Category_Type&amp;gt;[^%\,]+))?,?\s*(?:Location:\s*(?&amp;lt;Location&amp;gt;[^%\,]+))?\,(?:Intensive\sProtection\sLevel:\s*(?&amp;lt;Intensive_Protection_Level&amp;gt;[^%\,]+))?,?\s*(?:Certificate\sissuer:\s*(?&amp;lt;Certificate_Issuer&amp;gt;[^%\,]+))?,?\s*(?:Certificate\ssigner:\s*(?&amp;lt;Certificate_Signer&amp;gt;[^%\,]+))?,?\s*(?:Certificate\sthumbprint:\s*(?&amp;lt;Certificate_Thumbprint&amp;gt;[^%\,]+))?,?\s*(?:Signing\stimestamp:\s*(?&amp;lt;Signing_Timestamp&amp;gt;[^%\,]+))?,?\s*(?:Certificate\sserial\snumber:\s*(?&amp;lt;Certificate_Serial_Number&amp;gt;.*?(?:[^%\,]+|$|\z)))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, you might find some use out of the &lt;CODE&gt;extract&lt;/CODE&gt; command. The dataset you provided is consistantly in a "FIELD:VALUE," format. &lt;/P&gt;

&lt;P&gt;Give the &lt;CODE&gt;extract&lt;/CODE&gt; command a try to see if it works to accomplish your goal like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...BASE SEARCH...
| extract kvdelim=":" pairdelim=","
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you run into any problems let me know and I'm happy to help.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 20:48:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-end-of-anchor-parameter-to-use-for-the-Symantec-event/m-p/407794#M117770</guid>
      <dc:creator>rbechtold</dc:creator>
      <dc:date>2019-07-26T20:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: What end of anchor parameter to use for the Symantec event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-end-of-anchor-parameter-to-use-for-the-Symantec-event/m-p/407795#M117771</link>
      <description>&lt;P&gt;Thx a million for the regex help, and even better, the &lt;CODE&gt;extract&lt;/CODE&gt; command as that worked perfectly!&lt;/P&gt;

&lt;P&gt;Thx again&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2019 18:41:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-end-of-anchor-parameter-to-use-for-the-Symantec-event/m-p/407795#M117771</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2019-07-29T18:41:32Z</dc:date>
    </item>
  </channel>
</rss>

