Skip to content

Commit 1ae9058

Browse files
committed
Merge pull request #465 from igalic/patch-1
simplify mac address regex
2 parents 4a8c0a5 + 687600c commit 1ae9058

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/parser/functions/is_mac_address.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module Puppet::Parser::Functions
1515

1616
mac = arguments[0]
1717

18-
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
18+
if /^[a-f0-9]{1,2}(:[a-f0-9]{1,2}){5}$/i.match(mac) then
1919
return true
2020
else
2121
return false

0 commit comments

Comments
 (0)