Merge pull request #465 from igalic/patch-1

simplify mac address regex
This commit is contained in:
David Schmitt 2015-05-30 14:33:27 +01:00
commit 1ae9058518

View file

@ -15,7 +15,7 @@ Returns true if the string passed to this function is a valid mac address.
mac = arguments[0]
if /^[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}$/.match(mac) then
if /^[a-f0-9]{1,2}(:[a-f0-9]{1,2}){5}$/i.match(mac) then
return true
else
return false