Contact: aviboots(AT)netvision.net.il
39,907 questions
51,839 answers
573 users
import re s = 'xyxxxyyyxyxxyy' pattern = 'xy+' # 'x' followed by one or more 'y' for match in re.findall(pattern, s): print('Found: {!r}'.format(match)) ''' run: Found: 'xy' Found: 'xyyy' Found: 'xy' Found: 'xyy' '''