StringTokenizer or String.split() will split a string on some delimiter. You could replaceAll() commas with spaces and use a space delimiter to process the words one at a time:
Try that and see how it works. Then we can talk about regular expressions. If you don't know them they are significantly trickier and could "capture" all the text between "select" and "from" and probably even capture one word at a time.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
but for time bieng i did as follow --------------****************--------------------------- int pos = str.indexOf( "select"); int pos1 = str.indexOf( "from"); String str1 = str.substring(6,pos1);
---------------************--------------------
but i am not happy with the logic .
I will look to yr logic thanks a lot
Raj
I wasn't selected to go to mars. This tiny ad got in ahead of me:
a bit of art, as a gift, the permaculture playing cards