Skip to content

Instantly share code, notes, and snippets.

@csarrazi
Created November 17, 2016 00:46
Show Gist options
  • Save csarrazi/7f8b266d8e90d51df526821596baa493 to your computer and use it in GitHub Desktop.
Save csarrazi/7f8b266d8e90d51df526821596baa493 to your computer and use it in GitHub Desktop.
LDAP URL
#^((?P<scheme>[^:/?]+):)?(//(?P<host>[^:/?]*)(:(?P<port>[^/?]*))?)?/(?P<dn>[^?\n]*)(\?(?P<attributes>[^?\n]*)(\?(?P<scope>[^?\n]*)(\?(?P<filter>[^?\n]*)(\?(?P<extensions>[^?\n]*))?)?)?)?$#
ldap://symfony.com:1234/cn=fabien,o=symfony
ldap://symfony.com:1234/cn=fabien,o=symfony?hello
ldap://symfony.com:1234/cn=fabien,o=symfony?hello?base
ldap://symfony.com:1234/cn=fabien,o=symfony?hello,world?one
ldap://symfony.com:1234/cn=fabien,o=symfony?foo,bar,baz?sub
ldap://symfony.com:1234/cn=fabien,o=symfony?foo,bar,baz??(&(objectclass=person)(ou=Maintainers))
ldap://symfony.com:1234/cn=fabien,o=symfony?foo,bar,baz??test?bindname=cn=Fabien%20Potencier,dc=symfony,dc=com
ldap://symfony.com:1234/cn=fabien,o=symfony????bindname=cn=Fabien%20Potencier,dc=symfony,dc=com
ldap://symfony.com:1234/cn=fabien,o=symfony???test?!bindname=cn=Fabien%20Potencier,dc=symfony,dc=com,test=12
ldap://symfony.com:1234/cn=fabien,o=symfony????
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment