title: Groovy split on period and return only first value
body: <p>I have the input as </p>
  
  <p><code>var = primarynode.domain.local</code> </p>
  
  <p>and now I Need only <code>primarynode</code> from it. </p>
  
  <p>I was looking both split and tokenize but not able to do it in one line code. does anyone know how to do it in one line code?</p>