Domanda di colloquio di ServiceNow

given a string find least distance between two given substrings within the string