So erlauben Sie eine Reihe von Zahlen zum Beispiel 1 bis 14 auf dem regulären Ausdruck Python

#if you wanted to allow numbers from 1 to 12
import re
input = input("type a number")
matches = re.search("^([1-9]|1[0-2])$",input)
Inquisitive Ibex