使用正则表达式的 LDAP 搜索 [英] LDAP search using regular expression

查看:28
本文介绍了使用正则表达式的 LDAP 搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

is there a way I could search on LDAP using a regular expression for a field? I am using ldapsearch or "Sun Java System Directory Server control center" for the search.

解决方案

The answer is NO you can't. Why ?

Because the LDAP standard describes an LDAP-SEARCH as kind of function with 4 parameters :

  1. The nod where to begin the search which is a Distinguished Name (DN)
  2. The attributes you want to be brought back
  3. The depth of the search (base, one-level, subtree)
  4. The filter.

You are interested in the filter.

MSDN Syntax Documentation

LDAP Explorer Documentation

Beyond the syntax

The thing you must understand, is that operators between attributes and values and wildcard inside values, interact with the matching rules which are part of the SCHEMA of your Directory. In ex Sun Directory (now oracle) each attribute can be setup with three matching rules (equality, ordering, substring).

这篇关于使用正则表达式的 LDAP 搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆