Issue #9450 has been updated by Steve Shipway.

Have tried:

/$foo/
/${foo}/
/#{foo}/
/"$foo"/

None work.  We're using Puppet 2.6.8 though so possibly this is corrected in a 
later version?
----------------------------------------
Bug #9450: variables embedded in regexps are not expanded
https://projects.puppetlabs.com/issues/9450

Author: Steve Shipway
Status: Needs More Information
Priority: Normal
Assignee: 
Category: language
Target version: 
Affected Puppet version: 2.6.8
Keywords: regexp
regular expression
variable
Branch: 


This doesn't define the notify resource:

<pre>
$foo = "bar"
$bar = "bar"
if $bar =~ /$foo/ {
   notify { bar: message=>"BAR"; }
}
</pre>

It seems that variables within regexps are not being expanded.  This is a 
problem for us as we're trying to define new resources that check facts for 
parameterised content via a regexp.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to