title: Get a number with exactly x digits from string
body: <p>im looking for a regex pattern, which matches a number with a length of exactly x (say x is 2-4) and nothing else.</p>
  
  <p>Examples:</p>
  
  <p><code>"foo.bar 123 456789"</code>, <code>"foo.bar 456789 123"</code>, <code>" 123"</code>, <code>"foo.bar123 "</code> has to match only "123"</p>
  
  <p>So. Only digits, no spaces, letters or other stuff.</p>
  
  <p>How do I have to do it?</p>
  
  <p>EDIT: I want to use the Regex.Matches() function in c# to extract this 2-4 digit number and use it in additional code.</p>