$LDAP = ldap://sspdir.managed.entrust.com/ou=Entrust Managed Services SSP CA,ou=Certification Authorities,o=Entrust,c=US?cACertificate;binary,crossCertificatePair;binary
我正在尝试从此代码 ldap 目录中提取 2 个字符串。我想要的第一个:
$LDAP_host = sspdir.managed.entrust.com
第二...
$LDAP_base = ou=Entrust Managed Services SSP CA,ou=Certification Authorities,o=Entrust,c=US
我的代码如下,它在我的输出中产生持续的不匹配,我不知道为什么:
my $LDAP_host = $LDAP;
my $LDAP_base = $LDAP;
$LDAP_host =~ s|^ldap:\/\/(.*)\/|$1|i;
$LDAP_base =~ s|"\/"(.*)\?|$1|i;