title: Java regex multiple tags and attributes
body: <p>This is how my xml looks like</p>
  
  <pre><code>&lt;xml&gt;
      &lt;tagA value="one"/&gt;
      &lt;tagB value="two"/&gt;
      &lt;tagA value="three"/&gt;
      &lt;tagC value="null"/&gt;
  &lt;/xml&gt;
  </code></pre>
  
  <p>I <strong>only</strong> have access to <code>String.split(regex)</code> thru this simplified API layer above Java  that <strong>I have to use</strong> (No Pattern). 
  The closest I have come to parse out all the tags:</p>
  
  <pre><code>String xmlContent = "&lt;xml&gt;&lt;tagA value=\"one\"/&gt;&lt;tagB value=\"two\"/&gt;&lt;tagA value=\"three\"/&gt;&lt;tagC value=\"null\"/&gt;&lt;/xml&gt;";
  String[] splitedTexts = xmlContent.split("(?=&lt;)(?&lt;=&gt;)");
  for (String string : splitedTexts) {            
      System.out.println(string);
  }
  </code></pre>
  
  <p>The result will be: </p>
  
  <pre><code>&lt;xml&gt;
  &lt;tagA value="one"/&gt;
  &lt;tagB value="two"/&gt;
  &lt;tagA value="three"/&gt;
  &lt;tagC value="null"/&gt;
  &lt;/xml&gt;
  </code></pre>
  
  <p>I'm just interested in tagA and tagB <code>(tagA|tagB)</code> but as soon as I try to add that I end up messing the regexp up. With JavaScript syntax it worked with this regex <code>&lt;(tagA|tagB) value([\S]*)\b(\s*?=\s*?")\S*\B</code>.
  Have not gotten that to work with Java. Expected output would be:</p>
  
  <pre><code>&lt;tagA value="one"/&gt;
  &lt;tagB value="two"/&gt;
  &lt;tagA value="three"/&gt;
  </code></pre>
  
  <p>The next step is to get the values in pair into a map</p>
  
  <pre><code>{"tagA", "one"}
  {"tagB", "two"}
  {"tagA", "three"}
  </code></pre>