Cadeia de caracteres Regex não corresponde
Estou tendo problemas para corresponder um dígito em uma string com o Python, onde ele deve ser claramente combinado. Nem sequer corresponde[0-9]
[\d]
ou apenas0
sozinho. Onde está minha supervisão?
import re
file_without_extension = "/test/folder/something/file_0"
if re.match("[\d]+$", file_without_extension):
print "file matched!"