title: How to split string but keep delimiters in java?
body: <p>I'm trying to recreate the way discord parses messages with emoji's inside of it.</p>
  
  <p>For example, I want the message <code>Hello, :smile::hearth: world!</code> to split into the following array:</p>
  
  <pre><code>["Hello, ", ":smile:", ":hearth:", " world!"]
  </code></pre>
  
  <p>I've already tried to split the array with the following code:</p>
  
  <pre><code>Arrays.toString(message.split("(:[A-Za-z]+:)"))
  </code></pre>
  
  <p>However, the split method removes the delimiters found. So the end result looks like this:</p>
  
  <pre><code>["Hello", , , " world!"]
  </code></pre>