title: Slice a string in groovy
body: <p>I have a 18 character string I want characters 2-8 from.  In python I can do this:</p>
  
  <pre><code>sliceMe = "nnYYYYYYnnnnnnnnnn"
  print sliceMe[2:8]
  </code></pre>
  
  <p>prints</p>
  
  <pre><code>YYYYYY
  </code></pre>
  
  <p>I am looking for a way to do this same thing in groovy, and every explanation is REALLY long.  Whats the elegant accepted way to do this in groovy (or java for that matter)?</p>