I have a 18 character string I want characters 2-8 from. In python I can do this:
sliceMe = \"nnYYYYYYnnnnnnnnnn\" print sliceMe[2:8]
prin
groovy:000> sliceMe = "nnYYYYYYnnnnnnnnnn" ===> nnYYYYYYnnnnnnnnnn groovy:000> sliceMe[2..7] ===> YYYYYY
Note the difference in the length being 1 less.