Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
CN=Vijay Kumar,OU=Standard,OU=Users,OU=Madras,OU=Sites,OU=iWay,DC=ap,DC=corp |
Hi Friends,
In the above line we multiple OU=
I would like to extract Madras from OU=Madras.
How can I do this?
Try
TextBetween(BigLine, 'OU=', ',', 3)
Where 3 points to the 3rd occurrence of 'OU='
Try
TextBetween(BigLine, 'OU=', ',', 3)
Where 3 points to the 3rd occurrence of 'OU='
if it just madras you can use
=mid('CN=Vijay Kumar,OU=Standard,OU=Users,OU=Madras,OU=Sites,OU=iWay,DC=ap,DC=corp' ,index('CN=Vijay Kumar,OU=Standard,OU=Users,OU=Madras,OU=Sites,OU=iWay,DC=ap,DC=corp','OU',3)+3,6)
you may need to apply other string function if you have other states name here .
Thanks
BKC
PS : the expression is in single line
CN=vk1234,OU=Restricted,OU=Users,OU=ABC,OU=Sites,OU=Norm,DC=mx,DC=net |
CN=Tony,OU=Admins,OU=Administration,OU=Norm,DC=ru,DC=org |
Hi Michael, I am getting the result for the second line but not for the first line. What might be the Issue. I have the column name as adstate
Works for me, returns ABC... Here is the exact expression:
=TextBetween('CN=vk1234,OU=Restricted,OU=Users,OU=ABC,OU=Sites,OU=Norm,DC=mx,DC=net', 'OU=', ',', 3)