FAQ Database Discussion Community


Regex Negate non-contiguous Pattern

regex,regex-lookarounds,negation
I want to match the word fleece where it is NOT followed (either immediately, or further on) by the word snow Input data: Mary had a little lamb, its fleece was white as snow balls The following regex's don't work as they all match, and shouldn't. I'm sure I have...

Goal satisfaction with negated variable in Prolog

prolog,negation
I've started learning PROLOG and I have a problem with a very basic example. I'm using SWI PROLOG and the code is as follows: is_true(a). is_true(c). is_true(d). is_false(b). is_false(e). and(A,B) :- is_true(A),is_true(B). nand(A,B) :- \+(and(A,B)). Then: [[email protected] prolog]$ swipl Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 6.6.4) Copyright (c) 1990-2013...

Logical Boolean Negation Operator Precedence and Association

php,boolean-logic,negation,boolean-algebra
here's my first question(s) on StackOverflow, and as such I imagine it has been asked here before, but everything I type into the search bar gives me different questions. (Or sometimes "no" results at all!) I am learning on w3Schools, but I saw this seemingly simple code snippet which stirred...

LDAP More than one negation operators in filter

filter,ldap,negation
I try to write a LDAP filter with two negations. I need all users who are not disabled AND don't belong to OU=Abt99 . This is my filter at the moment: (&(objectClass=user)(objectCategory=person)(samaccountname={USERNAME})(!(userAccountControl:1.2.840.113556.1.4.803:=2))) I tried (&(objectClass=user)(objectCategory=person)(samaccountname={USERNAME})(!(userAccountControl:1.2.840.113556.1.4.803:=2)(OU=Abt99))) and...