What is the matching result of the python regular expression re.compile?

the code is as follows:


re.compile("[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}")
re.compile("[0-9a-fA-F]{4}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}.[0-9a-fA-F]{1}")

Please help parse the logic of this regular expression. Thank you.

The one above

should match a string similar to Mac address. For example, the one behind A0:44:1A:E2:87:25
cannot see the intention, because there is a period in the middle to match any character, which is a bit strange.

Menu