im looking for a regex pattern, which matches a number with a length of exactly x (say x is 2-4) and nothing else.

Examples:

`"foo.bar 123 456789"`, `"foo.bar 456789 123"`, `" 123"`, `"foo.bar123 "` has to match only "123"

So. Only digits, no spaces, letters or other stuff.

How do I have to do it?

EDIT: I want to use the Regex.Matches() function in c# to extract this 2-4 digit number and use it in additional code.