I'm trying to get an int
from a String
. The String
will always come as:
"mombojumbomombojumbomombojumbomombojumbomombojumbomombojumbohello=1?fdjaslkd;fdsjaflkdjfdklsa;fjdklsa;djsfklsa;dfjklds;afj=124214fdsamf=352"
The only constant in all of this, is that I will have a "hello="
followed by a number. With just that, I can't figure out how to pull out the number after the "hello="
. This is what I have tried so far with no luck.
EDIT: The number will always be followed by a "?"
String[] tokens = s.split("hello=");
for (String t : tokens)
System.out.println(t);
I can't figure out how to isolate it from both sides of the int
.