pattern = re.compile('match here')
input = "don't match here, but do match here"
start = input.find(',')
print(pattern.search(input, start).span())
Applying a Regex to a Substring Without using String Slice