title: Java regex replacing all the characters except few combination of characters
body: <p>Input String : <code>NNULL(EUR,VALUE)+SOMESTR</code></p>
  
  <p>Expected output:<code>NNULL(X,X)+X</code></p>
  
  <p>Expression tried: </p>
  
  <pre><code>String str = "NNULL(EUR,VALUE)+SOMESTR";
  str=str.replaceAll("[^(NNULL)\\+,]+","X");
  </code></pre>
  
  <p>Output getting: </p>
  
  <pre><code>NNULL(XUX,XLUX)+X
  </code></pre>