Следующий код на Python:
Код: Выделить всё
pattern = r'(0|1|2|3|4|5|6|7|8|9)+'
text = "Here are some numbers: 10, 201."
matches = re.findall(pattern, text)
print(matches)
Код: Выделить всё
['0', '1']
Источник: https://stackoverflow.com/questions/781 ... s-expected