There are several ways you can do this.

You could split the String using the the .split() method or you could use indexOf(int); method..