<?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 for CEF in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Regex-for-CEF/m-p/576932#M10475</link>
    <description>&lt;P&gt;Bunch of different ways. Here's one:&lt;/P&gt;&lt;P&gt;| makeresults&lt;BR /&gt;| eval _raw="CEF:0|vendor|product|1.1|1234|PolicyAssetUpdated|1|cn1label=EventUserId cn1=-3 cs1label=EventUserDisplayName cs1=Automated System cs2label=EventUserDomainName cs2= cn2label=AssetId cn2=20888 cs3label=AssetName cs3=ABCDPQRS.domain.com cn3label=DirectoryId cn3=856 cs4label=DirectoryName cs4=Active Directory cs5label=DomainName cs5=domain.com"&lt;BR /&gt;| rex field=_raw "^.*?\|(?&amp;lt;_raw&amp;gt;cn1label.*)"&lt;BR /&gt;| rex field=_raw mode=sed "s/\s?c[n|s]\d+label\=/;/g"&lt;BR /&gt;| rex field=_raw mode=sed "s/\s?c[n|s]\d+\=/:/g"&lt;BR /&gt;| extract pairdelim=";",kvdelim=":"&lt;BR /&gt;| table AssetId AssetName DirectoryId DirectoryName DomainName EventUserId EventUserDisplayName EventUserDomainName&lt;/P&gt;</description>
    <pubDate>Wed, 01 Dec 2021 18:26:35 GMT</pubDate>
    <dc:creator>johnhuang</dc:creator>
    <dc:date>2021-12-01T18:26:35Z</dc:date>
    <item>
      <title>Regex for CEF</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Regex-for-CEF/m-p/576930#M10474</link>
      <description>&lt;P&gt;Hi SMEs,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to write regex to parse/map CEF format fields as below. so that all corresponding fieldname can capture values, i am not able to capture values having spaces in between. Seeking suggestion. Attached snap shot for ref.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="regex101" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/17078i49EE595337064B90/image-size/large?v=v2&amp;amp;px=999" role="button" title="CEF Regex.JPG" alt="regex101" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;regex101&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;c[n|s]\dlabel\=(\w+).*?c[n|s]\d\=([\.a-zA-Z0-9_-]+)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CEF:0|vendor|product|1.1|1234|PolicyAssetUpdated|1|cn1label=EventUserId cn1=-3 cs1label=EventUserDisplayName cs1=Automated System cs2label=EventUserDomainName cs2= cn2label=AssetId cn2=20888 cs3label=AssetName cs3=ABCDPQRS.domain.com cn3label=DirectoryId cn3=856 cs4label=DirectoryName cs4=Active Directory cs5label=DomainName cs5=domain.com&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 18:02:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Regex-for-CEF/m-p/576930#M10474</guid>
      <dc:creator>pavanbmishra</dc:creator>
      <dc:date>2021-12-01T18:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for CEF</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Regex-for-CEF/m-p/576932#M10475</link>
      <description>&lt;P&gt;Bunch of different ways. Here's one:&lt;/P&gt;&lt;P&gt;| makeresults&lt;BR /&gt;| eval _raw="CEF:0|vendor|product|1.1|1234|PolicyAssetUpdated|1|cn1label=EventUserId cn1=-3 cs1label=EventUserDisplayName cs1=Automated System cs2label=EventUserDomainName cs2= cn2label=AssetId cn2=20888 cs3label=AssetName cs3=ABCDPQRS.domain.com cn3label=DirectoryId cn3=856 cs4label=DirectoryName cs4=Active Directory cs5label=DomainName cs5=domain.com"&lt;BR /&gt;| rex field=_raw "^.*?\|(?&amp;lt;_raw&amp;gt;cn1label.*)"&lt;BR /&gt;| rex field=_raw mode=sed "s/\s?c[n|s]\d+label\=/;/g"&lt;BR /&gt;| rex field=_raw mode=sed "s/\s?c[n|s]\d+\=/:/g"&lt;BR /&gt;| extract pairdelim=";",kvdelim=":"&lt;BR /&gt;| table AssetId AssetName DirectoryId DirectoryName DomainName EventUserId EventUserDisplayName EventUserDomainName&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 18:26:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Regex-for-CEF/m-p/576932#M10475</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2021-12-01T18:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for CEF</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Regex-for-CEF/m-p/576971#M10476</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN&gt;johnhua,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Could you please suggest me how this can be called out in props.conf &amp;amp; transforms.conf please&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 03:58:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Regex-for-CEF/m-p/576971#M10476</guid>
      <dc:creator>pavanbmishra</dc:creator>
      <dc:date>2021-12-02T03:58:53Z</dc:date>
    </item>
  </channel>
</rss>

