title: c# Regex replace punctuation with space and matching braces with comma
body: <p>I have an Form data with punctuation and matching parenthesis. I need to replace punctuation with space and matching braces with comma. Also need to make sure the final result doesn't have multiple spaces.</p>
  
  <p>For Example: </p>
  
  <pre><code>*fName   *   -sName!lName(London) 
  </code></pre>
  
  <p>should be</p>
  
  <pre><code>fName sName lName, London
  </code></pre>
  
  <p>Was trying to have three regex and replace them in order</p>
  
  <pre><code>static string BracePattern = @"[()]";
  static string PuncPattern = @"[^\w\,]";
  static string SpacePattern = @"\s+";
  res1 = Regex.Replace(formData, BracePattern, ",");
  res2 = Regex.Replace(res1, PuncPattern , ",");
  res3 = Regex.Replace(res2, SpacePattern , ",").trim();
  </code></pre>
  
  <p>My final result is : </p>
  
  <pre><code>fName sName lName,London,
  </code></pre>
  
  <p>Still cant get. I know there is one regex to solve this. But cant get it.</p>