String split issue

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
sriniraghavan
Posts: 1
Joined: 26 Jul 2010 14:25

String split issue

#1 Post by sriniraghavan » 26 Jul 2010 14:29

My problem is this..

I have a string, "uniqueMember=cn=HK ILP Group,ou=groups,dc=yyy,dc=com". I need to extract the string HK ILP Group from this. I have tried multiple delimiters but nothing gives this back. Help please!

!k
Expert
Posts: 378
Joined: 17 Oct 2009 08:30
Location: Russia

Re: String split issue

#2 Post by !k » 26 Jul 2010 14:55

Code: Select all

set "string=uniqueMember=cn=HK ILP Group,ou=groups,dc=yyy,dc=com"
for /f "tokens=3 delims==," %%a in ("%string%") do echo %%a

Post Reply