title: Regex to split the string by first slash & comma with condition
body: <p>I need two different Regex, to split the strings, For the following scenarios.
  Using <strong><em>Java</em></strong> platform.</p>
  
  <p><strong>1. Needs to Split by only first "/"  and if the slash comes within "{}" braces then its wont be consider 
     And also I need to truncate starting and ending braces "{}" only if it comes like example c).</strong></p>
  
  <h2>a)</h2>
  
  <pre><code>input: "Response/CartResponse/{StatusData/ResponseCode,RespMessage,{ArrivalMethods/AvailableArrivalMethod/AvailableArrivalMethodName,AvailableFFMCenter}},{ServiceHeaders/clientSessionKey},{Shoppingcart/OrderId,CatalogId}";
  
  output: 
  "Response"
  "CartResponse/{StatusData/ResponseCode,RespMessage,{ArrivalMethods/AvailableArrivalMethod/AvailableArrivalMethodName,AvailableFFMCenter}},{ServiceHeaders/clientSessionKey},{Shoppingcart/OrderId,CatalogId}";
  -------------
  </code></pre>
  
  <h2>b)</h2>
  
  <pre><code>input: "CartResponse/{StatusData/ResponseCode,RespMessage,{ArrivalMethods/AvailableArrivalMethod/AvailableArrivalMethodName,AvailableFFMCenter}},{ServiceHeaders/clientSessionKey},{Shoppingcart/OrderId,CatalogId}";
  
  output: 
  "CartResponse"
  "{StatusData/ResponseCode,RespMessage,{ArrivalMethods/AvailableArrivalMethod/AvailableArrivalMethodName,AvailableFFMCenter}},{ServiceHeaders/clientSessionKey},{Shoppingcart/OrderId,CatalogId}";
  -------------
  </code></pre>
  
  <h2>c)</h2>
  
  <pre><code>input: "ArrivalMethods/{AvailableArrivalMethod/AvailableArrivalMethodName,AvailableFFMCenter}";
  
  output: 
  "ArrivalMethods"
  "AvailableArrivalMethod/AvailableArrivalMethodName,AvailableFFMCenter"
  </code></pre>
  
  <p><strong>2. Split by comma and if the comma comes within "{}" braces then it wont be consider
     And also I need to remove "{}" as in the following examples.</strong></p>
  
  <pre><code>input: "{StatusData/ResponseCode,RespMessage,{ArrivalMethods/AvailableArrivalMethod /AvailableArrivalMethodName,AvailableFFMCenter}},{ServiceHeaders/clientSessionKey},{Shoppingcart/OrderId,CatalogId}";  
  
  output: 
  "StatusData/ResponseCode,RespMessage,{ArrivalMethods/AvailableArrivalMethod/AvailableArrivalMethodName,AvailableFFMCenter}"
  "ServiceHeaders/clientSessionKey"
  "Shoppingcart/OrderId,CatalogId"
  
  
  
  input: "ResponseCode,RespMessage,{ArrivalMethods/AvailableArrivalMethod/AvailableArrivalMethodName,AvailableFFMCenter}";
  
  output: 
  "ResponseCode"
  "RespMessage"
  "ArrivalMethods/AvailableArrivalMethod/AvailableArrivalMethodName,AvailableFFMCenter";
  </code></pre>
  
  <p>Truncating  braces is different in both cases.</p>