import algorithm, os, osproc, sequtils, strutils proc cutBetween(str, a, b: string): string = let cutA = str.find(a) cutB = str.find(b) if cutA == -1 or cutB == -1: return "" return str[cutA + a.len..