Groovy web console

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

ajp

Published 5 months ago by ajp
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def regex = /.*Read timed out.*(?!I_AM_THE_GUY)$/

//match here
assert '''Error 'I/O error on GET request for "http://---": Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out' occurred from (blah...). Retrying.''' ==~ regex

//do not match here'
assert !('''Error 'I/O error on POST request for "https://---": Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out' occurred from (I_AM_THE_GUY) esize the script view by sliding down the bottom of the line number gutter.''' ==~ regex)