<?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 'AND' operator in Regular Expressions in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/AND-operator-in-Regular-Expressions/m-p/44832#M10587</link>
    <description>&lt;P&gt;I am trying to only select the data that has Directory Administrators OR Master Web Resource Admins &lt;STRONG&gt;&lt;EM&gt;AND&lt;/EM&gt;&lt;/STRONG&gt; I want that data to have MOD in it. So the main part that i am missing here is what operator says &lt;STRONG&gt;&lt;EM&gt;AND&lt;/EM&gt;&lt;/STRONG&gt; in regular expressions and send all other data to nullQueue. The pipe between Master Web Resource Admins and the selection of the three numbers is wrong. I need to figure out how to get something that says AND in there. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#CID_LDAP
[setnullldap]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[setparsingldap]
REGEX = (?:Directory Administrators)|(?:Master Web Resource Admins)|([0-9][0-9][0-9]\s+(:?MOD)\W+)
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Below is an example of the raw data that is being passed into Splunk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[19/Nov/2012:11:37:10 -0500] conn=8813 op=416 MOD dn="obname=201211104775926,obname=20121011230424,obapp=PSC,o=Oblix,o=scope"

[19/Nov/2012:11:37:10 -0500] conn=8813 op=416 RESULT err=0 tag=103 nentries=0 etime=0 csn=50aa60ef00000

[19/Nov/2012:11:37:10 -0500] conn=883 op=417 SRCH base="obapp=PSC,o=Oblix,o=scope" scope=1 filter="(objectClass=oblixGSN)" attrs="obSeqNo"

[19/Nov/2012:11:37:10 -0500] conn=8813 op=417 RESULT err=0 tag=101 nentries=1 etime=0 Directory Administrators
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 26 Nov 2012 14:14:39 GMT</pubDate>
    <dc:creator>Michael_Schyma1</dc:creator>
    <dc:date>2012-11-26T14:14:39Z</dc:date>
    <item>
      <title>'AND' operator in Regular Expressions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AND-operator-in-Regular-Expressions/m-p/44832#M10587</link>
      <description>&lt;P&gt;I am trying to only select the data that has Directory Administrators OR Master Web Resource Admins &lt;STRONG&gt;&lt;EM&gt;AND&lt;/EM&gt;&lt;/STRONG&gt; I want that data to have MOD in it. So the main part that i am missing here is what operator says &lt;STRONG&gt;&lt;EM&gt;AND&lt;/EM&gt;&lt;/STRONG&gt; in regular expressions and send all other data to nullQueue. The pipe between Master Web Resource Admins and the selection of the three numbers is wrong. I need to figure out how to get something that says AND in there. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#CID_LDAP
[setnullldap]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[setparsingldap]
REGEX = (?:Directory Administrators)|(?:Master Web Resource Admins)|([0-9][0-9][0-9]\s+(:?MOD)\W+)
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Below is an example of the raw data that is being passed into Splunk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[19/Nov/2012:11:37:10 -0500] conn=8813 op=416 MOD dn="obname=201211104775926,obname=20121011230424,obapp=PSC,o=Oblix,o=scope"

[19/Nov/2012:11:37:10 -0500] conn=8813 op=416 RESULT err=0 tag=103 nentries=0 etime=0 csn=50aa60ef00000

[19/Nov/2012:11:37:10 -0500] conn=883 op=417 SRCH base="obapp=PSC,o=Oblix,o=scope" scope=1 filter="(objectClass=oblixGSN)" attrs="obSeqNo"

[19/Nov/2012:11:37:10 -0500] conn=8813 op=417 RESULT err=0 tag=101 nentries=1 etime=0 Directory Administrators
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Nov 2012 14:14:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AND-operator-in-Regular-Expressions/m-p/44832#M10587</guid>
      <dc:creator>Michael_Schyma1</dc:creator>
      <dc:date>2012-11-26T14:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: 'AND' operator in Regular Expressions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AND-operator-in-Regular-Expressions/m-p/44833#M10588</link>
      <description>&lt;P&gt;Can you provide a sample line that should be indexed? That is, it matches your stated criteria? The key bit will be the relative position of your selection strings vs. the MOD string (whether it comes before or after...).&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2012 14:42:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AND-operator-in-Regular-Expressions/m-p/44833#M10588</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-11-26T14:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: 'AND' operator in Regular Expressions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AND-operator-in-Regular-Expressions/m-p/44834#M10589</link>
      <description>&lt;P&gt;[19/Nov/2012:11:37:10 -0500] conn=8813713 op=416 MOD dn="obname=20121119T09404775926,obname=20121010T07001230424,obapp=PSC,o=Oblix,o= Directory Administrators" &lt;/P&gt;

&lt;P&gt;MOD will come first. If any additional information is needed, just let me know. Thank you so much&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2012 14:48:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AND-operator-in-Regular-Expressions/m-p/44834#M10589</guid>
      <dc:creator>Michael_Schyma1</dc:creator>
      <dc:date>2012-11-26T14:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: 'AND' operator in Regular Expressions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AND-operator-in-Regular-Expressions/m-p/44835#M10590</link>
      <description>&lt;P&gt;Would something like this work for you?&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;op=(?&amp;lt;Feild1&amp;gt;\d+)\sMOD\s.*(?:o=\sDirectory\sAdministrators|o=\sMaster\sWeb\sResource\sAdmins)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I'm using a capturing group for the digits and a non capturing group for the Admins search, but it's simple to change that to a capturing group if need to use it for field extraction.  Also, I'm not sure if the space in front of Directory Administrators (and by extension: Master Web Resource Admins) is intentional or not, so please remove it if it shouldn't be there.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2012 15:44:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AND-operator-in-Regular-Expressions/m-p/44835#M10590</guid>
      <dc:creator>wpreston</dc:creator>
      <dc:date>2012-11-26T15:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: 'AND' operator in Regular Expressions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AND-operator-in-Regular-Expressions/m-p/44836#M10591</link>
      <description>&lt;P&gt;You can an OR condition in REGEX&lt;BR /&gt;
REGEX = {something|differentthing)&lt;/P&gt;

&lt;P&gt;Or you can use multiple successive transforms to send to the parsing queue.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
[myldapsourcetype]&lt;BR /&gt;
TRANSFORMS-filterevents = setnullldap, setparsingldap_admin, setparsingldap_mod&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2014 19:07:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AND-operator-in-Regular-Expressions/m-p/44836#M10591</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-08-29T19:07:40Z</dc:date>
    </item>
  </channel>
</rss>

