Quantcast
Channel: CodeProject Latest postings for Regular Expressions
Viewing all articles
Browse latest Browse all 224

get parent LDAP DN - regex

$
0
0
hi!
I'm trying to write regex to get the parent DN. it looks like that:
$rx=[regex]'^CN=.*,((?:(?:OU|CN=).*,)*DC=domain,DC=name)$'


that part which is not working is of course '
((?:(?:OU|CN=).*,)*
' - i don't know how to define all parts that can be 'OU=whatever,' or 'CN=whatever,'

help plz ):

Viewing all articles
Browse latest Browse all 224

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>