title: How to split String but retain the delimiter while it is inside a bracket?
body: <p>I have a string,</p>
  
  <pre><code>String str = "(A,B),C,D,(E,F,G)";
  String[] parts = str.split(",");
  </code></pre>
  
  <p>I want to split by the comma, but I need the comma inside the bracket</p>
  
  <pre><code>parts[0] = "(A,B)";
  parts[1] = "C";
  parts[2] = "D";
  parts[3] = "(E,F,G)";
  </code></pre>