
I don't work a lot with RegEx but when I do, I use tools like PowerRegex from Sapien, RegExr, the technet help for about_Regular_Expressions or RegExlib.com. And to be honest, most of the time I'm trying to avoid it...trying to find a solution the "PowerShell Way" before trying with Regex...
Problem
So here is what he asked meOut of the following string "OU=MTL1,OU=CORP,DC=FX,DC=LAB" (Which is a Distinguished Name), he wanted to get the name "MTL1", (SiteCode for Montreal).