Multiples Integers from a String
I'm working on an interesting project that requires the user to input psuedo-java commands into the console, and things happen according to what they enter. However, I'm having a bit of trouble getting the parameters out of the input String.
Say I have this input:
command(1, 2, 3, 4)
I need to get "command", which is easy (String.startsWith("Command")).
But, the 1, 2, 3, and 4 aren't so easy. How would I go about extracting these individual numbers from the String? I was hoping there was a String.nextInt() method, but I wasn't so lucky. :P