Painless equivalent of simple groovy script (substring issues?)

Thanks, Nik! Feel dumb for just assuming that groovy's slick notation and substring were the same.