Groovy web console

subscribe to the feed Subscribe
to this
site

matcher-bool

Published 1 month ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def s = "zzzaaazzzaaa"
matcher = s =~ /zzz(aaa)/
if (matcher) {
    println 'ok'
    
} else {
    println 'nope'
    
}
print matcher[0]