I'm not an expert in regular expression. But if I run into problems like this one, I always turn to this page: http://www.regexplanet.com/advanced/java/index.html Has always helped me.
Bernd > -----Ursprüngliche Nachricht----- > Von: puppet-users@googlegroups.com [mailto:puppet- > us...@googlegroups.com] Im Auftrag von James Fraser > Gesendet: Donnerstag, 9. August 2012 11:01 > An: puppet-users@googlegroups.com > Betreff: [Puppet Users] Using regex in Puppet node definition > > I have a nodes-operational.pp with various nodes defined. I would like > to define a node using a regular expression like so: > > /^dev-[^\s]*(?<!geoserver)$/ > > That is, I would like to use the above expression to resolve nodes > which are prefixed with 'dev', but do not end with 'geoserver'. This > results in the following error: > > Could not retrieve catalog from remote server: Error 400 on SERVER: > Could not parse for environment jf: undefined (?...) sequence: /^dev- > [^\s]*(?<!geoserver)$/ at /etc/puppet/environments/jf/manifests/nodes- > operational.pp:11 on node dev-jf... > > How can I achieve this? > > -- > You received this message because you are subscribed to the Google > Groups "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/1Jk57vLqJqwJ. > To post to this group, send email to puppet-users@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. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@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.