In your first example opening bracket is missing and \.
is incorrect (read help for explanations), in both a-F
matches nothing, due to 'a' > 'F'
.
The correct answer you can find in the comment of kenrogers
, but I'll duplicate it for you:
([0-9A-F]{2}[:-]){5}([0-9A-F]{2})
If you want to match .
you should use:
([0-9A-F]{2}[:-\\.]){5}([0-9A-F]{2})
If you also want to match lower case characters, you should use:
([0-9A-Fa-f]{2}[:-\\.]){5}([0-9A-Fa-f]{2})