title: Extract value from a string using Regex C#
body: <p>I will know if it's possible to extract value(int) from a string with regex in C#.</p>
  
  <p>For example, i have some datas like :</p>
  
  <blockquote>
    <p>"124521test45125 100KG10 fdfdfdf"</p>
    
    <p>"9856745test123456 60ML450 fdfdfdf"</p>
  </blockquote>
  
  <p>I will like to extract value which contain caracters "KG" and "ML" with numbers which are before and after this caracters. </p>
  
  <p>The result will be "100KG10" and "60ML450".</p>
  
  <p>It is possible that they don't have numbers after like this : </p>
  
  <blockquote>
    <p>"124521test45125 100KG fdfdfdf"</p>
  </blockquote>
  
  <p>The result for this case will be "100KG".</p>
  
  <p>I use this method to extract value : </p>
  
  <pre><code>public static string Test(string str)
          {
              Regex regex = new Regex(@"???REGEX??");
              Match match = regex.Match(str);
              if (match.Success)
                  return match.Value;
  
              return match;
          }
  </code></pre>
  
  <p>The problem is i just start to learn Regex and i don't know  how i can extract only this value. </p>
  
  <p>Could any one help me.</p>
  
  <p>Thanks in advance</p>