If you don't want to use regular expressions in any way shape or form Isuggest you check out StringTokenizer and just token jump though thestring, with your delimeters set to @ and .Regular expressions would be neeter though.