On Thursday, August 9, 2012 7:07:34 AM UTC-5, mawi wrote:
>
> Hi! 
>
> In addition to Bernds link. That page is applicable to Java, there is also 
> a page to test your Ruby regex: 
>
> I like this one: http://rubular.com/
>

Yes, I think that's more apropos in this context. To my knowledge, Puppet 
uses the underlying Ruby's regex syntax.  Rubular's tester, which appears 
to do the same, would probably give more applicable answers.

As to the OP's question, however, I don't think Ruby's regex syntax 
recognizes zero-width assertions.  This problem might be approachable via 
reliance on Puppet's node matching behavior: if only regex node 
declarations and maybe a default declaration match a given node, then the 
lexically first matching regex node is used.  Therefore, if all *geoserver 
nodes are matched by specific node declarations or earlier regex node 
declarations then the trailing assertion should not be needed.

Example:

node /.*geoserver$/ {
   # something
}

node /^dev-[^\s]*$/ {
   # something else
}


John

-- 
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/-/iSVn2_tWx34J.
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-users?hl=en.

Reply via email to