From: Gene Yu <ge...@si...> - 2000-06-23 21:26:03
|
On Fri, 23 Jun 2000, Timothy Wilson wrote: > > [...] > > 1. How would I search objectclass=person and return all records for people > with sn=Wilson, but not givenName=Tim? Timothy, You're using prefix notation, so you have the operator followed by however many arguments. Your example #1 would look like this: (&(sn=Wilson)(!(givenName=Tim))) > 2. Search objectclass=person and return all records for people with st=MN OR > st=IA, but not givenName=Tim? (A rather useless search I realize.) You can just add terms forever: (&(a=1)(b=2)(c=3)(!(d=4)) ...) I suggest you take a look at RFC 2254 - The String Representation of LDAP Search Filters: http://www.ietf.org/rfc/rfc2254.txt It has many examples. Gene |