Stephan van Hulst wrote:That's a poor solution Praveen. It will only solve the problem for one specific case, and it's very verbose.
You should be able to implement a method like this in one line of no more than 80 characters:
I am thinking the same thing thanks for making me sure stephan,even it needs lots of effort if string grows its length somewhat around 100,1000 or more.i think using regex will be far better than this which i adviced initially.
Thanks! again Stephan for your opinion.
kind regards,
praveen.