title: Splitting a string at every n-th character
body: <p>In JavaScript this is how we can split a string at every 3-rd character</p>
  
  <pre><code>"foobarspam".match(/.{1,3}/g)
  </code></pre>
  
  <p>I am trying to figure out how to do this in Java. Any pointers?</p>