Title |
Test
Find
Pattern Title
|
Expression |
^((CN=(['\w\d\s\-\&\.]+(\\/)*(\\,)*)+,\s*)*(OU=(['\w\d\s\-\&\.]+(\\/)*(\\,)*)+,\s*)*(DC=['\w\d\s\-\&]+[,]*\s*){1,}(DC=['\w\d\s\-\&]+\s*){1})$ |
Description |
Matches LDAP path (AdsPath) in Active Directory. Modified version of regex which has been found in library.
Accepts spaces after , character. Also \/ and \, sequences (escapes) in CN or OU name are accepted. |
Matches |
CN=John Smith, OU=Acc, DC=acme, DC=com | CN=John\, Smith US\/EXT, OU=Acc, DC=acme ,DC=com |
Non-Matches |
CN=John Smith, OU=Acc, DC=acme | CN=John\, Smith\, OU=Acc, DC=acme, DC=com |
Author |
Rating:
Not yet rated.
Artur Faszczewski
|
Source |
|
Your Rating |
|
Title: Missing , in the regex
Name: Link
Date: 10/6/2023 8:26:16 PM
Comment:
I think the last part of this regex should be ...{1,})$ instead of ...{1})$