This needs a little cleanup but I think it works… but I’m assuming that results from that query always look like CN something OU something blah blah blah. I’m not sure if that’s actually the case…
Q: preceding text of first “OU=” of “CN=Bernard Test Jr.,OU=Standard Users,OU=Surgeon_EDSA,DC=smgd,DC=ph”
A: CN=Bernard Test Jr.,
Q: following text of first “CN=” of “CN=Bernard Test Jr.,”
A: Bernard Test Jr.,
T: 0.135 ms
and then you just combine the two of those…
Q: following text of first “CN=” of (preceding text of first “OU=” of “CN=Bernard Test Jr.,OU=Standard Users,OU=Surgeon_EDSA,DC=smgd,DC=ph”)