title: Replace char if not between "\'" char
body: <p>I have a string that represent an action,
  each arg in the action is seporated by the char ';',
  for each arg I want to replace the char ',' with the char '.' but only if the ',' is not between ' char using Regex replace</p>
  
  <p>For example:</p>
  
  <pre><code>1- "ActionName('1,b';1,2)"
  2- "ActionName('a,b';1,2;1.2;'1,3')"
  </code></pre>
  
  <p>Desire result:</p>
  
  <pre><code>1- "ActionName('1,b';1.2)"
  2- "ActionName('a,b';1.2;1.2;'1,3')
  </code></pre>
  
  <p>Conditions:</p>
  
  <p>The ',' can appear multiple times inside a string.</p>
  
  <p>Currntly I split the string for ';' loop over all the parts and each part I split for '\''.</p>
  
  <p>Example Code:</p>
  
  <pre><code>public string Transform(string expression)
  {
      string newExpression = string.Empty;
      string[] expParts = expression.Split(';');
      for (int i = 0; i &lt; expParts.Length; i++)
      {
          string newSubExpression = string.Empty;
          string[] subExpParts = expParts[i].Split(new char[] { '\'' });
          for (int subIndex = 0; subIndex &lt; subExpParts.Length; subIndex += 2)
          {
              newSubExpression += subExpParts[subIndex].Replace(',', ".");
              if (subIndex &lt; subExpParts.Length - 1)
                  newSubExpression += "\'" + subExpParts[subIndex + 1] + "\'";
          }
          newExpression += newSubExpression;
  
          if (i &lt; expParts.Length - 1)
              newExpression = newExpression + ",";
      }
      return newExpression;
   }
  </code></pre>