Hi, John -
Have you looked into regular expressions (regex)? A regular expression can
test for the presence (or absence) of any one or more of a list of characters.
Even if you don't use regex, you can store the invalid characters in a char array, then loop through the array testing to make sure indexOf the test character is not greater than zero.
[ November 16, 2004: Message edited by: Jeff Bosch ]
Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4 all those years ago...)