Skip to content

Commit

Permalink
Merge pull request #465 from igalic/patch-1
Browse files Browse the repository at this point in the history
simplify mac address regex
  • Loading branch information
DavidS committed May 30, 2015
2 parents 4a8c0a5 + 687600c commit 1ae9058
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet/parser/functions/is_mac_address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Puppet::Parser::Functions

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
Expand Down

0 comments on commit 1ae9058

Please sign in to comment.