title: Replace commas in string C#
body: <p>I have a string like this:</p>
  
  <pre><code>select name,lastname,email from contacts
  </code></pre>
  
  <p>I want to replace the commas for <strong>+"|"+</strong>
   and get something like this</p>
  
  <pre><code>select name+"|"+lastname+"|"+email from contacts
  </code></pre>
  
  <p>thats easy with  string.Replace(",",+"|"+);</p>
  
  <p>but the problem is when i face a string like this:</p>
  
  <pre><code>select name,lastname,isnull(email,0) from contacts
  </code></pre>
  
  <p>How i cant detect to avoid the commas inside the isnull()?
  with the replace i get a string like this</p>
  
  <pre><code>select name+"|"+lastname+"|"+isnull(email+"|"+0) from contacts
  </code></pre>
  
  <p>and thats wrong!</p>
  
  <p>thanks .</p>