title: Removing numbers at the end of a string C#
body: <p>I'm trying to remove numbers in the end of a given string.</p>
  
  <pre><code>AB123 -&gt; AB
  123ABC79 -&gt; 123ABC
  </code></pre>
  
  <p>I've tried something like this;</p>
  
  <pre><code>string input = "123ABC79";
  string pattern = @"^\\d+|\\d+$";
  string replacement = "";
  Regex rgx = new Regex(pattern);
  string result = rgx.Replace(input, replacement);
  </code></pre>
  
  <p>Yet the replacement string is same as the input. I'm not very familiar with regex.
  I can simply split the string into a character array, and loop over it to get it done, but it does not feel like a good solution. What is a good practice to remove numbers that are only in the end of a string?</p>
  
  <p>Thanks in advance.</p>