Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

regex - crossing the t and dotting the i

$
0
0

Hey,

So I am working on a script to remove groups from a user's memberof list. I have devised the following filtered regex:

* (^users|domain users$)|legal|litigation

The objective is to ignore the groups named "users" and "domain users" as well as any group that contains the key words "legal" or "litigation"

Can you validate that this is the right syntax for a powershell regular expression? I am not allowed to test it on the AD atm and I'd rather not end up in a litigation.

Thanks

Edit: baka, I can actually test it with made up strings, though I'll leave the message open :)



Viewing all articles
Browse latest Browse all 15028

Trending Articles



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