I need to check if a variable is a regular expression match object.
print(type(m)) returns something like that: <_sre.SRE_Match object at 0x000
print(type(m))
<_sre.SRE_Match object at 0x000
You can do
SRE_MATCH_TYPE = type(re.match("", ""))
at the start of the program, and then
type(m) is SRE_MATCH_TYPE
each time you want to make the comparison.