LDAP search filter (I)
- Equality
- e.g.: (cn=Mister X) only entries with common name equals “Mister X”
- Negation operator
- e.g. (!(cn=Mister X)) all entries but the one with cn equals “Mister X”
- Substring
- e.g. (cn=Mister*) all entries with cn beginning with “Mister”
- Approximate
- e.g.: (cn~=Mister) all entries with cn sounding similiar to “Mister”
- Greater than or equal to and less than or equal to
- e.g. (sn<=Smith) all entries where sn equals “Smith” or is lexicographically above “Smith” (from sn=Adam to sn=smirnow)
- (ageᡍ) is not possible, use (!(age<=21)) instead
- Presence
- e.g. (telephoneNumber=*) all entries that contain a telephone number
- e.g. (objectclass=*) all entries, since every entry contains at least one objectclass