Your line 6 splits the input
string into tokens based on a delimiter "any number of spaces (including 0), followed by fish, followed by any number of spaces".
This will split your string as follows:
"1/ fish /2/ fish /red/ fish /blue/ fish", which gives you the tokens: "1", "2", "red", "blue".
The commented out line 7 is very similar, but because the delimiter doesn't include spaces, it splits the string as:
"1 /fish/ 2 /fish/ red /fish/ blue /fish", which gives you the tokens: "1 ", " 2 ", " red ", " blue ". Note the spaces.
That
would work. But then on line 9 you are trying to read the next token as an int. "1" converts to an int with no difficulties. But " 1 " doesn't, so it'll throw an exception using the second delimiter.
Does that explain what you wanted?