This might just be a style nitpick, but why anchor the start and then .* match? Just start your regexp where you want the match to start. You have a nice anchor at the end so the regexp will optimize backwards from there. Compare readability:
On Mar 3, 2010, at 9:09 AM, James Cammarata wrote: > package { "kernel-development": > ensure => "present", > name => $kernelrelease ? { > /^.*\.(EL|el)largesmp$/ => "kernel-largesmp-devel", > /^.*\.(EL|el)hugemem$/ => "kernel-hugemem-devel", > /^.*\.(EL|el)smp$/ => "kernel-smp-devel", > default => undef, > }, > } vs > package { "kernel-development": > ensure => "present", > name => $kernelrelease ? { > /(EL|el)largesmp$/ => "kernel-largesmp-devel", > /(EL|el)hugemem$/ => "kernel-hugemem-devel", > /(EL|el)smp$/ => "kernel-smp-devel", > default => undef, > }, > } -=Eric0 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.