Run
import re pattern = 'abc' string = 'abcdefabcab' result = re.findall(pattern, string) print(result)
Output