Created
June 24, 2015 20:17
-
-
Save ahpook/a1b9d97c83ae64e846b2 to your computer and use it in GitHub Desktop.
regexp backrefences in node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[vagrant@glitched sample_pp]$ FACTER_fqdn=des-bwq0t01 puppet apply ./hyphen_node.pp | |
Notice: Scope(Node[__node_regexp__des-bweqs0-9t0-9]): matched des-bwq | |
Notice: Compiled catalog for glitched.vmlocal in environment production in 0.30 seconds | |
Notice: Applied catalog in 0.01 seconds | |
[vagrant@glitched sample_pp]$ cat hyphen_node.pp | |
node /(des-bw[eqs])[0-9]t[0-9]+/ { | |
notice("matched $1") | |
} | |
node default { | |
notice("nope") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment