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

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

问题描述

是否可以使用正则表达式在LDAP上搜索LDAP?我正在使用 ldapsearch 或"Sun Java System Directory Server控制中心"进行搜索. /p>

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 ?

因为LDAP标准将LDAP-SEARCH描述为一种具有4个参数的功能:

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

  1. 从何处开始搜索,这是一个专有名称(DN)
  2. 您想带回的属性
  3. 搜索深度(基础,一级,子树)
  4. 过滤器.

您对过滤器感兴趣.

MSDN语法文档

LDAP资源管理器文档

超出语法

您必须了解的是,属性和值之间的运算符以及值内部的通配符会与匹配规则交互,后者是目录SCHEMA的一部分.在以前的Sun Directory(现在为oracle)中,可以使用三个匹配的规则(相等,排序,子字符串)来设置每个属性.

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天全站免登陆