title: Removing a sequence of characters from end of string using regex that contain a comma
body: <p>I have the following data:</p>
  <pre><code>I am BOB,FM testing
  I am BOB,FM
  I am BOB, FM
  I am BOB    , FM
  I am BOB , FM
  BOB, FM I am
  I am BOB , FM now
  </code></pre>
  <p>I would like to remove the sequence &quot;BOB,FM&quot; from the end of string only.  (With our without spaces in between the commas.)</p>
  <p>This would be the correct output:</p>
  <pre><code>I am BOB,FM testing
  I am
  I am
  I am
  I am
  BOB, FM I am
  I am BOB , FM now
  </code></pre>
  <p>This is what I have that is not working so far:</p>
  <pre><code>mystring = Regex.Replace(mystring, @&quot;[BOB,FM]*$&quot;, string.Empty);
  </code></pre>