0

I have such a string :

CN=whatevername,OU=whatever1,OU=whatever2,DC=domain,DC=com

And I'm trying to get which is following "OU" until next comma. So in my example, I would like to receive "whatever1" and "whatever2".

I have tried this but it returns me the rest of the string until last comma.

(?<=OU=).*(?=,)

Thank you.

Benjamin Ghenne
  • 91
  • 1
  • 1
  • 10

0 Answers0