ServiceNow interview question

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