Regular Expressions 101

Community Patterns

LDAP basedn check

1

Regular Expression
PCRE (PHP <7.3)

/
(LDAP:\/\/)((?<SERVER>[a-zA-Z0-9.-_]+)\/)?(?<DN>DC=[a-z0-9-_]+[,]*)+
/
gm

Description

Check a given LDAP base DN with or without a hostname

Submitted by Daywalker - 8 years ago