The specification currently states that Puppet supports Ruby regexp. We should consider specifying in detail what the Puppet regexp handles. This because other implementations of the Puppet Language are otherwise required to be based on the native implementation of the Ruby regexp package.
The main problem is that the current puppet runtime allows constructs such as posix groups e.g. [[:blank:]] to be used in Ruby > 1.9.3, The ^ and $ are slightly different than in other regexp implementations and the use of escapes A and Z/z are required.
We also do not support any modifiers to the regexp (which in a way is good as it reduces the number of incompatibilities because options are quite different between implementations), but they can be entered with inline flag settings inside the regexp delimiters.
To be 100% accurate a validating regexp parser is required that is specific to Puppet - or we need to tie the regexp implementation to a particular implementation (which has consequences).
This is a long term concern that impacts the ability to have an agent/compiler implementation in a language other than Ruby. (It may be solvable in C by simply using the same C-regexp library that is used by Ruby - but it is unknown how Ruby specific it is and if it can be used separately.