title: How to split String with some separator but without removing that separator in Java?
body: <p>I'm facing problem in splitting <code>String</code>.</p>
  
  <p>I want to split a <code>String</code> with some separator but without losing that separator.</p>
  
  <p>When we use <code>somestring.split(String separator)</code> method in Java it splits the <code>String</code> but removes the separator part from <code>String</code>. I don't want this to  happen.</p>
  
  <p>I want result like below:</p>
  
  <pre><code>String string1="Ram-sita-laxman";
  String seperator="-";
  string1.split(seperator);
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>[Ram, sita, laxman]
  </code></pre>
  
  <p>but I want the result like the one below instead:</p>
  
  <pre><code>[Ram, -sita, -laxman]
  </code></pre>
  
  <p>Is there a way to get output like this?</p>