Groovy supports regular expressions natively using the ~"..." expression. Plus Groovy supports the =~ (create Matcher) and ==~ (matches regex) operators. e.g.
Error rendering macro 'code' : Invalid value specified for parameter lang
Labels