package macaddr import "regexp" const rxValidMac = `^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$` func IsValid(mac string) bool { return regexp.MustCompile(rxValidMac).MatchString(mac) }