You could try creating a String array and then look through the input(possibly in a JTextField or JTextArea) and have it not put symbols or spaces in the array.

Then you could search through the...