Skip to content

Instantly share code, notes, and snippets.

>>> import re
>>> array = ["1test", "2test", "notanumber", "3bananas"]
>>> re.match("^[1-9]", "1testing")
<_sre.SRE_Match object at 0x1004743d8>
#a synonym for [1-9] is \d
>>> re.match("^\d", "1testing")
<_sre.SRE_Match object at 0x100474440>