Groovy web console

subscribe to the feed Subscribe
to this
site
IOQSXZ (via #groovywebconsole)
tweet this snippet Tweet
this
script

IOQSXZ

Published 5 months ago by jharring
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
String myString

badString = "I'm not okay!" 
goodString = "Me am okay!"

println badString=~'[I|O|Q|S|X|Z]'? "this is bad" : "this is good"  
println goodString=~'[I|O|Q|S|X|Z]'? "this is bad" : "this is good" 

// prints out:
// this is bad 
// this is good