Javascript's String.indexOf
returns the index of the a search term within a string.
It returns the index of where the string is first found, from the beginning of the search string. example:
'abcdefghijklmnopqrstuvwxyz'.indexOf('def') = 3;
But I need to get it from the end of the search, for example:
'abcdefghijklmnopqrstuvwxyz'.indexOf('def') = 6; //essentially index + searchString.length
so that I can then String.substr
from the returned value to get the string after that point.