title: regular expression to cut text
body: <p>I want to cut this text</p>
  
  <pre><code>UNIT=1111,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),DSN=UUU.AAAAA.BBBBB
  </code></pre>
  
  <p>Result :</p>
  
  <pre><code>UNIT=1111
  SPACE=(TRK,0)
  DISP=(MOD,DELETE,DELETE)
  DSN=UUU.AAAAA.BBBBB
  </code></pre>
  
  <p>I tried myself but I m so noob with regular expression, I used <code>(\S+)=(\S+)</code> to cut it but it not work correct.</p>
  
  <p>Someone could help me ?</p>
  
  <p>Here is my java code </p>
  
  <pre><code>import java.util.regex.Matcher;
  import java.util.regex.Pattern;
  
  final String regex = "(\\S+)=(\\S+)";
  final String string = "UNIT=1111,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),DSN=UUU.AAAAA.BBBBB"
  
  final Pattern pattern = Pattern.compile(regex);
  final Matcher matcher = pattern.matcher(string);
  
  while (matcher.find()) {
      System.out.println("Full match: " + matcher.group(0));
      for (int i = 1; i &lt;= matcher.groupCount(); i++) {
          System.out.println("Group " + i + ": " + matcher.group(i));
      }
  }
  </code></pre>