Question d’entretien chez ServiceNow

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