I have String that can be for example 3D-F2-C9-A6-B3
This is my regex and I've validated it by an online regex tester:
^([0-9A-Fa-f]{2}[-]){0,}$
The problem is, that the example string 3D-F2-C9-A6-B3-4F is not valid. I have to add a minus at the end like 3D-F2-C9-A6-B3-4F-
How can I change the regex that the separators in the middle have to be set but no one at the end?