hi

i want to break the following string..

{ok,[{operators,'sri','mob',45,45,45,45},{operators,'sri','dia',45,45,45,45}]}


by using {operators, this point..

i used the StringTokenizer class to do this by giving the {operators, as Delimiter.

But when it runs it gives completely different result than I expected
that is it was matched any character that the delimiter include..


So please anyone can help me to do this


Can you please provide code.... <== was my original message

LOL iamthwee beaten me for faster response, good link which you provided

public void tokenize(){
    StringTokenizer tokenizer = new StringTokenizer("{ok,[{operators,'sri','mob',45,45,45,45},{operators,'sri','dia',45,45,45,45}]}"
                                                    ,"[COLOR=Red]{operators,[/COLOR]");
   while(tokenizer.hasMoreTokens()){
     System.out.println(tokenizer.nextToken());
   }

  }

the above is the cord

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.