Regular Expressions 101

Community Patterns

Community Library Entry

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 - 9 years ago