import re
text = 'ABC 123 xYZ 456 @$! 100'
PATTERN = re.compile(r'\d\d\d')
#matches = PATTERN.search(text) #searches 1st instance of the match
matches = PATTERN.finditer(text) #iteratively matches every instance of the match
for i in matches:
#print(i)
print(i.group()) #returns the match value
To embed this project on your website, copy the following code and paste it into your website's HTML: