<?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 command returns null despte the regular expression being correct in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Rex-command-returns-null-despte-the-regular-expression-being/m-p/498098#M84928</link>
    <description>&lt;P&gt;Try this one: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?&amp;lt;DistName&amp;gt;CN=|cn=.+)?\sGroup:
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 04 Oct 2019 19:10:27 GMT</pubDate>
    <dc:creator>ololdach</dc:creator>
    <dc:date>2019-10-04T19:10:27Z</dc:date>
    <item>
      <title>Rex command returns null despte the regular expression being correct</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Rex-command-returns-null-despte-the-regular-expression-being/m-p/498097#M84927</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;

&lt;P&gt;I am attempting to write a rex command that pulls the distinguished name from a windows event log. My regular expression claims to be working according to regex101.com, however, in Splunk the field DistName returns null every time when inside of a table. The specific info i am looking for is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;CN=John\, Doe,OU=K-O,OU=Reg,OU=Exit,OU=Heigh,DC=workbuilding,DC=treestump,DC=WalMart,DC=com
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is my regular expression:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?&amp;lt;DistName&amp;gt;(?=CN=|cn=).+?(?=.{6}:))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And here is a sample of a log that I am trying to parse:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;A member was added to a security-enabled global group. Subject: Security ID:    X-9-9-99-999999999-9999999999-999999999-999999 Account Name:    Windows10 Account Domain: Logon ID: Member: Security ID:     Account Name:  CN=John\, Doe,OU=K-O,OU=Reg,OU=Exit,OU=Heigh,DC=workbuilding,DC=treestump,DC=WalMart,DC=com Group: Security ID: 9-9-99-999999999-9999999999-999999999-9999999 Group Name: Raush - Bestie User Certificate Access Group Domain: Additional Information: Privileges:      
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help here would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 18:18:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Rex-command-returns-null-despte-the-regular-expression-being/m-p/498097#M84927</guid>
      <dc:creator>gynexcore</dc:creator>
      <dc:date>2019-10-04T18:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Rex command returns null despte the regular expression being correct</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Rex-command-returns-null-despte-the-regular-expression-being/m-p/498098#M84928</link>
      <description>&lt;P&gt;Try this one: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?&amp;lt;DistName&amp;gt;CN=|cn=.+)?\sGroup:
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Oct 2019 19:10:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Rex-command-returns-null-despte-the-regular-expression-being/m-p/498098#M84928</guid>
      <dc:creator>ololdach</dc:creator>
      <dc:date>2019-10-04T19:10:27Z</dc:date>
    </item>
  </channel>
</rss>

