Hi all im trying to return a sub String from a String. I have a small String saved as "myText" that contains lots of characters but just two numbers. The numbers are inbetween two markers, "start" & "finish". so the String would read: hello,goodbye(start) 35 (finish) hello,goodbye.
i need to return just the numbers (the characters inbetween the markers)
the way I have tried to do this is as follows:
return myText.substring(myText.lastIndexOf(start), myText.indexOf(finish));
however when I run the code it returns goodbye 35.
Can anyone see what im doing wrong?