I upgrade python to 3.12.3, below code report a warning: SyntaxWarning: invalid escape sequence '\d' Does python still support \d to match numbers? import re s = "hello 123" m = re.search("(?P<val>[\d]+)",s) if m: print(m['val']) Continue reading...