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

Editing my existing Regex

$
0
0
Hi,
im relatively new to regex and im trying to match OU from the Distinguished Name in ActiveDirectory.

This is my existing regex:
(((OU=.*?))?)OU=(?<ouname>.*?(?=,))

CN=Muster\, Max,[OU=AAD-Sync,OU=IT-Abteilung],[OU=FD] 10,DC=landkreis-Musterstadt,DC=local

So far this would match the OU I marked with [] as two separate Matches, does anyone know ow to edit my existing regex that it matches every OU as one Match instead of two separates?

Would be lovely if I could get some Help Smile | :)

Viewing all articles
Browse latest Browse all 224

Trending Articles



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