I have been trying to construct a while loop for looping through a string when it contains a \'pattern\' i\'m looking for. The string is a local variable, declared just above th
Strings are immutable. That means that substring does not modify the string itself, but returns a new string object. So you should use:
substring
modifiedOnlineList = modifiedOnlineList.substring(tempFirstOccurence + 2);