For my application, I require a RegEx which can find out if a string is at least partially a MAC address, but so far I have only found the following RegEx which only finds if something is a complete MAC address
^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$
What would be a RegEx (possibly derived from the one stated above) which returns a full match for these 3 strings:
93:31:13:E1:D3:1A
3E-EB-47-8
84:0C:
while not returning a match for these 2 strings:
6B-90-8Y-31-D1-7K
37-4H-31
Note: I would not say this is a "practical" duplicate of THIS question as
- That question was never answered successfully despite it being ~6 years old
- That question is directed towards a specific engine
- None of the answers provided to that question work in all/any of the cases above