title: How to split a string, but also keep the delimiters?
body: <p>I have a multiline string which is delimited by a set of different delimiters:</p>
  
  <pre><code>(Text1)(DelimiterA)(Text2)(DelimiterC)(Text3)(DelimiterB)(Text4)
  </code></pre>
  
  <p>I can split this string into its parts, using <code>String.split</code>, but it seems that I can't get the actual string, which matched the delimiter regex.</p>
  
  <p>In other words, this is what I get:</p>
  
  <ul>
  <li><code>Text1</code></li>
  <li><code>Text2</code></li>
  <li><code>Text3</code></li>
  <li><code>Text4</code></li>
  </ul>
  
  <p>This is what I want</p>
  
  <ul>
  <li><code>Text1</code></li>
  <li><code>DelimiterA</code></li>
  <li><code>Text2</code></li>
  <li><code>DelimiterC</code></li>
  <li><code>Text3</code></li>
  <li><code>DelimiterB</code></li>
  <li><code>Text4</code></li>
  </ul>
  
  <p>Is there any JDK way to split the string using a delimiter regex but also keep the delimiters?</p>