Contact: aviboots(AT)netvision.net.il
43,970 questions
57,412 answers
573 users
import re s = "jdh 123 32 sd 987 gsha 1 3 788" print(re.findall(r"\b\d{3}\b", s)) ''' run: ['123', '987', '788'] '''
import re s = "php 123 32 c++ 987 python 1 3 788 9999 999" lst = re.findall(r"\b\d{3}\b", s) print(lst) ''' run: ['123', '987', '788', '999'] '''