Groovy web console

subscribe to the feed Subscribe
to this
site

Artem

Published 2 months ago by Batman
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
class Example {
   static void main(String[] args) {
      def match = "barbaz" =~ /(ba)([rz])/;
      def ok1 = match[0][0] ? true : false;
      def ok2 = !!match[0][0];

      println(ok1);
      println(ok2);
   }
}